LiveCode 5.5.0 Linux Memory leak... Again!

Deploying to Linux? Get penguinated here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

X
Posts: 18
Joined: Mon Jan 05, 2009 12:20 pm
Location: London, UK

LiveCode 5.5.0 Linux Memory leak... Again!

Post by X » Thu Apr 05, 2012 5:03 pm

LiveCode 5.5.0 (incl. GM3) on Linux (tested on various Ubuntu installations) causes rapid memory leak to Xorg X server.
Create new stack, move it around, or better create a text field, bigger the better, move it around the stack, watch (top) Xorg process eating all system memory very rapidly, until it's all gone and system freezes.
Similar bug was once in older Rev (I think v 3.0), but this time it is more memory hungry.
Tested on various hardware with various graphic cards and noted that this bug affects all installations with proprietary graphic drivers such as NVidia, ATI, Matrox ... The bug seems not affecting the same systems with Linux open-source drivers and graphics such as Intel which uses open source drivers.
With majority of modern Linux Desktop installations come with heavy-weight 3D Desktop effects which require proprietary drivers to run, this bug is deal breaker :(

Bug Report#: 10141

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Location: Thailand
Contact:

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by dave_probertGA6e24 » Fri Apr 06, 2012 6:53 am

I can also reproduce this - every time I use LC (5.0.2 to 5.5) on Ubuntu. Especially fails if the dictionary is opened.

LC under Ubuntu Linux is virtually impossible to use for anything that will take more than 10 mins. I constantly have to remember to close it every 5 mins and restart it. In fact the older 5.0.2 seemed to work slightly better than the new version - though that might be a subjective view. If I forget to close LC before it happens then I often have to reboot the machine to get access again - definitely not an ideal requirement!

I have not looked into the details of what is actually happening on there because I don't actually do my main development on the Linux box (or for Linux distribution), but it is still extremely annoying.
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by mwieder » Fri Apr 06, 2012 5:33 pm

May be an Ubuntu thing. I use Fedora Core 16 xfce spin as my main OS at work and haven't seen any memory leaks. Granted I don't use the dictionary much on that OS because user notes in the dictionary crash the IDE, but it's otherwise stable.

Unless I do something weird in my code and crash it myself, but that's a different story <g>

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by ghettocottage » Tue Apr 10, 2012 9:33 am

LiveCode 5.5.0 works fine for me in Ubuntu 12.04 using latest Nvidia graphics drivers. No noticable memory leaks. I opened dictionary, dragged 20 fields in, re-sized and dragged them around. LiveCode stays steady and system RAM and CPUs are all stable.

Unfortunatley that is a trial-version I just installed to test if LiveCode would work at all, since I cannot seem to get 4.6 running. If I fire it up it Exits with "exiting on signal 11" whatever that means.

I was able to get the same version running on a different computer also running Ubuntu 12.04, so I am at a loss? Could it be graphics drivers not playing well with 4.6

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by mwieder » Tue Apr 10, 2012 5:58 pm

I remember having that problem with Ubuntu earlier - one reason I switched to Fedora. IIRC (not guaranteed) it has to do with linking with the graphics libraries, in particular the KDE-GTK theme library bridge. Do you get more information if you launch the LC executable from a command line?

I haven't looked at Ubuntu lately, so things may have changed.

X
Posts: 18
Joined: Mon Jan 05, 2009 12:20 pm
Location: London, UK

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by X » Tue Apr 10, 2012 6:08 pm

ghettocottage wrote:LiveCode 5.5.0 works fine for me in Ubuntu 12.04 using latest Nvidia graphics drivers. No noticable memory leaks.
"No noticable"?
If you do top in terminal, compare Xorg memory usage before and after dragging some large object (like text field) around your maximised stack for a while.
This number should NOT change - otherwise it is called "Memory leak" - a critical bug in software.

X
Posts: 18
Joined: Mon Jan 05, 2009 12:20 pm
Location: London, UK

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by X » Tue Apr 10, 2012 6:11 pm

Update.
Same problem even with open-source ATI driver (older ATI cards). Tested on Ubuntu 11.04 32bit

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by mwieder » Tue Apr 10, 2012 7:04 pm

Fedora Core 16 xfce spin running on a Thinkpad t410 with an additional 24" external monitor: I can see a *very* slight memory leak if I continually drag around a text field full of lots of text (pasted several k worth into a large scrolling list field with a maximized stack). Nothing to write home about, although any memory leak should be plugged. But it doesn't interfere with any work, and I really had to work at it to see any difference at all.

X
Posts: 18
Joined: Mon Jan 05, 2009 12:20 pm
Location: London, UK

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by X » Tue Apr 10, 2012 9:31 pm

Update
Tested on openSuSE 12.1 64bit on a system with nVidia graphics, all default install, and guess what? Same problem.
I knew that distribution should not matter, they (mostly) all use same drivers, same X server and so on.
Please, anyone, run top in terminal, select memory usage column (Shift + >) and watch Xorg process, then compare memory usage before and after you drag/resize large object (like text field) on maximised stack.
And please let us know what graphic card/chip you have and what driver, additionally to the distribution name/version.

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by ghettocottage » Wed Apr 11, 2012 3:39 am

Ubuntu 12.04 x64
Dual Monitors
Nvidia geforce 8400 card
Nvidia Driver Version 295.33
LiveCode 5.5.0

I have the same experience as mwieder, in that if I work very hard at it I can get a slight memory leak...i.e. I maximised the stack, dragged in about 20 to 30 text fields and drag/resize them around. It has been running for around half an hour like that and the memory (slowly) went up from .6 to 26.7% and has hung there ever after. I cannot seem to get it to go any higher than that. My system still works fine and no NOTICABLE slow down in other applications. I even launched a Windows VirtualBox session that uses loads of RAM and video mem. and it works fine as well. I will keep LiveCode open to see what happens.

X
Posts: 18
Joined: Mon Jan 05, 2009 12:20 pm
Location: London, UK

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by X » Wed Apr 11, 2012 11:19 am

ghettocottage wrote:Ubuntu 12.04 x64
Dual Monitors
Nvidia geforce 8400 card
Nvidia Driver Version 295.33
LiveCode 5.5.0

... and the memory (slowly) went up from .6 to 26.7% ...
Yep. That is it. The memory leak. It should not have happened. .6 to 26.7% is huge number, you lost 20% of your RAM in few moves. 20% on, say, 2GB RAM system = 400MB of leak! Please don't confuse memory leak with performance or anything else. It won't slow-down your system, not a bit, but until all your RAM is consumed - then your system will freeze. Of course if you have several gigabytes of swap space, then it will take a while. Never the less this is critical bug in LiveCode. It was once in RunRev v3.0...
and it got recognised and fixed. I guess these days there are not many Linux users left who uses LiveCode and/or care much.
Last edited by X on Wed Apr 11, 2012 5:02 pm, edited 1 time in total.

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by ghettocottage » Wed Apr 11, 2012 4:07 pm

Just to follow up, I left that stack open all night, and checked this morning. The memory usage went up to 32%, I have 8gb of RAM, so that is quite the usage, I agree. Still not unusable to me, but it does slow my system down a tad.

You said you don't think there are many Linux people using LiveCode. I wonder why that is?

I do wish they would take down the "Coming Soon" for the browser plugin and just say "Not Supported". It has become a bit of a joke having it up for years and saying "Coming Soon"

X
Posts: 18
Joined: Mon Jan 05, 2009 12:20 pm
Location: London, UK

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by X » Wed Apr 11, 2012 4:57 pm

ghettocottage wrote:Just to follow up, I left that stack open all night, and checked this morning. The memory usage went up to 32%, I have 8gb of RAM, so that is quite the usage...
8GB x 0.32 = 2.56GB!

But larger the screen resolution, larger the stack and the object you resize - heavier the leak. On my 2056x1600 30" monitor I'm experiencing quarter gigabyte leak every resize stroke!
Now you see the problem? How do you expect your LC application to run on a system with 1GB of RAM? It will crash the system in minutes. And as you know, for Linux, 1GB RAM is quite a lot and there are many happy Linux system with 512MB...2GB of RAM in use today.

If this issue is not going to be fixed in upcoming 5.5.1 release, I'm done with LiveCode. I had enough patience waiting for RunRev to work on Linux reasonably since v 1.1, yeah since 2001. There are alternative IDEs anyway.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by mwieder » Wed Apr 11, 2012 5:35 pm

Well, I wasted another half hour on this and managed to get a reported leakage of 5MB after some severe stressing. That's 5 megabytes of private storage and a matching 5 megabytes of virtual storage. On a 4GB system that doesn't even register in the total current usage of 16%. I'm pretty much done testing this.

X - if you launch LC from a commandline, are there errors thrown into the terminal? Anything having to do with GTK libraries and such?

X
Posts: 18
Joined: Mon Jan 05, 2009 12:20 pm
Location: London, UK

Re: LiveCode 5.5.0 Linux Memory leak... Again!

Post by X » Wed Apr 11, 2012 7:27 pm

mwieder wrote:Well, I wasted another half hour on this and managed to get a reported leakage of 5MB after some severe stressing. That's 5 megabytes of private storage and a matching 5 megabytes of virtual storage. On a 4GB system that doesn't even register in the total current usage of 16%. I'm pretty much done testing this.
Well, I wasted a week testing it on 7 different hardware architectures with various distros/versions, (with Intel, NVidia, ATi and Matrox graphic cards) so I'm done with it too.

The only systems (that I know for sure) where LC 5.5.* has no memory leak issue are those with Intel graphics, Ubuntu 10.04 32bit with ATi Open source driver and open source nvidia driver in some set-ups. NVidia, Matrox, ATi on Ubuntu 11...12 - all have this problem, Linux distribution, Ubuntu 10...12, OpenSuSE 12.1, Fedora 16. KDE, Gnome, Unity, XFCE, Enlightenment...
Some say LC-5.5 has no leak on newer AMD Radeon / Catalyst on Kubuntu 12.04, but have not tried it myself.

mwieder, it would help the judgement if you could tell us what graphic card and driver in your system.

Also, to everyone else, run this command in terminal to watch Xorg Memory usage (%MEM column):

Code: Select all

top -p $(pgrep Xorg)
enlarge your stack and put there one text field, then start resizing it as far as you can few times, watch the %MEM column - it MUST NOT CHANGE, otherwise you're witnessing the memory leak.
mwieder wrote: X - if you launch LC from a commandline, are there errors thrown into the terminal? Anything having to do with GTK libraries and such?
No, there are no errors or warnings, LC starts fine. There is irrelevant warning only on some setups (including those without the problem) about missing GTK-2 lib (libappmenu.so) on Ubuntu with Unity Desktop, which is no surprise either.

Happy LiveCoding to everyone ;-)

Post Reply

Return to “Linux”