image question (for everyone)

J. Landman Gay jacque at
Thu Apr 10 13:56:09 EDT 2014

On 4/10/14, 11:41 AM, larry at wrote:
> I changed the drive to which I build apps and both built just fine.
> Don't know why.

Me either, that's pretty odd. I wonder if the standalone builder is 
looking for resources in the wrong place. Now that you've narrowed it 
down, it would be worth a bug report to save others some trouble.

> Anyway, my new question is this:  Since you asked about a lot of images,
> does LC have some kind of limit on how many images can be used in a
> stack? I have over 20 images in the stack that are primarily being used
> as custom designed buttons.

There's no limit outside of what your computer can handle, and 20 button 
icons is tiny. The issue isn't the number of images but rather the size 
of all of them combined (after expanding any jpgs.) I was bitten by this 
in a project where I was storing a whole lot of large images in the 
stack (moving images to external files wasn't possible in this case.) 
LiveCode's image caching scheme, which I wasn't used to yet at the time, 
means it loads all of those into RAM at once, and in my case that came 
out to a couple of gigs of memory. I was crashing every few minutes and 
decided that the new version was too buggy for use. No one else had any 
trouble but I couldn't run it at all. I reverted back to the previous 
version, which didn't have image caching, but I didn't put the two 
together at the time.

I went through support channels and it turns out it was because I was 
storing all these huge images in a hidden group. The actual visibility 
of the images doesn't matter, if the group is placed on a card they will 
load into RAM in preparation for being shown. I was exceeding the amount 
of RAM available by a large margin and LiveCode just shut down 
unexpectedly after a couple of card changes. In my case, the solution 
was to unplace the group from any cards; an unplaced group can still 
serve as a storage repository but won't be loaded into the image cache 
because it isn't potentially viewable. Immediately after that, LiveCode 
because quite stable.

So it was all my own doing. I get so used to the reliability of LiveCode 
that I forget sometimes that I need to be responsible myself for the 
consequences of my actions.

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |

More information about the Use-livecode mailing list