Memory leak when scrolling a group

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
yuzutake
Posts: 10
Joined: Mon Feb 27, 2017 5:36 pm

Memory leak when scrolling a group

Post by yuzutake » Mon Feb 27, 2017 5:46 pm

My project is a small stack that opens another stack from a separate stackfile. In this second stack I have a group with 20 subgroups and some datagrids inside them. When I open the 2nd stack the memory footprint goes from 50MB to more than 600MB (in IDE - in standalone 15MB to 600), but the stack alone only uses 80MB in IDE.
I deleted some controls inside the big group and readded them: the stack is lighter. I don't know why because there were no custom properties... The biggest problem I still have is when I scroll the group: memory usage keeps increasing... to crash. This occurs even with messages locked!
I tried to merge the stackfiles into one, but the problem remains.

I know it could help if you had a sample, but unfortunately, I'm unable to reproduce it in a small project that I could share.

What can cause this behavior?

I also add that as Livecode IDE for Windows crashes a lot, it sometimes generate a .livecode~ that I rename to .livecode to then use it (too many changes to redo them). Can there be trash associated with the group in the file?
I'd prefer not to have to remake the entire hierarchy in an empty project by hand.

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: Memory leak when scrolling a group

Post by capellan » Tue Feb 28, 2017 3:25 am

Hi yuzutake,

Which LiveCode version are you using?

If my memory serves well, there is some script that converts
your stack in a xml text file (editable in any text editor)
and convert back to a binary stack.

Could you use this script in this project?

yuzutake
Posts: 10
Joined: Mon Feb 27, 2017 5:36 pm

Re: Memory leak when scrolling a group

Post by yuzutake » Tue Feb 28, 2017 10:18 am

Hi,

I'm using 8.1.3 Indy.

I can't find the script (only one for HyperCard), but would it work when images are imported as controls in the stack?

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: Memory leak when scrolling a group

Post by capellan » Wed Mar 01, 2017 2:55 am

Surely, Binary data (like images, midi files or executable programs) is encoded as base64

This is the forum thread:
http://forums.livecode.com/viewtopic.ph ... 85&start=0

Download from:
https://github.com/trevordevore/levure

Post Reply

Return to “Talking LiveCode”