Copying many cds to a stack causes standalone to hang

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
outThere
Posts: 3
Joined: Tue Oct 17, 2006 4:19 am

Copying many cds to a stack causes standalone to hang

Post by outThere » Sat Nov 25, 2006 11:27 pm

I'm writing a product catalog application (for windows).
The standalone is a splashscreen.
A .rev file contains the main body of the application.
Product pages (cards) are copied to the main body on start up (so pages can be added, edited, deleted). Product pages are between 200 - 750 KB (text + pics).
This worked fine until my client added many more product pages.
Now the standalone hangs after 50 or so cds have been added.
I just copy the cds, but here's the script (well most of it) to show exactly how it's done... (sorry i don't know how to insert tabs or indent)

repeat for each line tCatalogPage in tFileNameStore
start using stack tCatalogPage
go cd 1 of stack tCatalogPage
setProdPgRez -- catalogPage stack script, matches cd appearence to screen rez (just resizes & moves things around on the cd)
put the number of cds of stack mainBodyinto tLastCd
go cd tLastCd of stack mainBody
copy cd 1 of stack tCatalogPage to stack mainBody
close stack tCatalogPage -- destroyStack & purgeWindow
go cd 1 of stack splashScreen
set lockMessages to false -- advance progress bar
set lockMessages to true
end repeat

Potentially the number of catalog pages could run into the 100's. I wanted them within the one open stack to speed up product searches and travel between pages.

Does anybody have any suggestions? Thanks in advance.
Steve Denney
Out There Solutions

outThere
Posts: 3
Joined: Tue Oct 17, 2006 4:19 am

Still can't get it to work

Post by outThere » Sun Nov 26, 2006 6:42 am

More info on the above...

It successfully copies all 80+ cds in the development environment (before being made into a standalone).

It fails (as a standalone) even if i create a new copy of the 'main body' stack before starting the repeat loop, set its alwaysBuffer to false, destroyStack to true and save and close the new mainBody stack after copying each cd (and it fails after copying the same number of cds). How is this possible? It generates a bug report (standalone setting ticked) but there's no info visible (and the program has frozen).
Oh please release me from this nightmare.
S. Denney

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Sun Nov 26, 2006 9:37 am

Hi,

I *think* it might be related to the "start using" part of your script. If you run in standalone mode the number of allowed library stacks is limited (If I recall correctly to 50). Try inserting stop using stack tCatalgPage before you close the stack.

hope that helps,

Malte

outThere
Posts: 3
Joined: Tue Oct 17, 2006 4:19 am

Copying many cds to a stack causes standalone to hang fixed

Post by outThere » Mon Nov 27, 2006 1:36 am

Thanks Malte, you are 100% right and your suggestion has fixed the problem.
Many thanks,
Steve Denney

Post Reply