Page 1 of 1
How I recovered scripts from a corrupt stack
Posted: Sat Jul 19, 2014 10:22 pm
by kaveh1000
Hi folks. I had a stack that had not been backed up for 3 days. All of a sudden every time I launched it LiveCode (latest version on Mac) crashed. Luckily almost all my handlers were in the stack script. I opened the stack in a text editor (BBedit) and very easily found the script, and copied and pasted into an old backup. So this is just a pointer to people who might have a similar problem.
Having said that,
• Is there a way to have regular backups saved thro' LiveCode?
• Any other tricks to recover a corrupted stack?
Re: How I recovered scripts from a corrupt stack
Posted: Sat Jul 19, 2014 11:50 pm
by Simon
Hi Kaveh,
In Development > Plugins > revSmartSav
I think that ships with the product.
Simon
Re: How I recovered scripts from a corrupt stack
Posted: Sun Jul 20, 2014 1:25 am
by FourthWorld
File corruption is very rare with LiveCode. The most common symptom is the IDE reporting that the file is corrupted; other symptoms may mean other causes.
When you say "crash", what exactly is happening? Does the OS report an error? Or is LiveCode simply quitting? Or something else?
Re: How I recovered scripts from a corrupt stack
Posted: Sun Jul 20, 2014 10:54 am
by kaveh1000
I open the stack and it shows up for a split second (sometimes for 2-3 seconds) and the whole card seems to be selected, with selection marks around the card. Then app quits and I get "the application unexpected quits".
After your question I tried something...
My LiveCode always opens with the pointer tool selected. I don't know how to have it on browse tool by default. (I asked this question elsewhere.) When I open LiveCode, then choose browse tool before opening the stack, it does not crash, and it seems to operate normally, except that the 8 selection markers as visible, as if the card was selected – markers at the extreme edges of the card. But as soon as I select the pointer tool (sometimes pointer then browse again) it quits again.
The problem is solved as I have salvaged the scripts, but be good to know for future. Thanks all.
Re: How I recovered scripts from a corrupt stack
Posted: Sun Jul 20, 2014 5:30 pm
by jacque
This sounds very similar to a crash I got in a stack with many large images. The amount of RAM required was more than LiveCode could handle. Since you're seeing selection handles around the card borders, it sounds like you have a card size background image.
If the stack contains many large images, it isn't enough to just hide the ones not in use because even hidden images will be cached. If that fits your situation, use referenced files on disk instead of imported images. Images on disk aren't loaded into memory until they are displayed.