Page 1 of 1

Cannot open stack anymore after crash

Posted: Fri Nov 27, 2020 5:42 pm
by Gurki
One of my students was working on a stack. When he tried to save it, livecode crashed. Now the stack can't be opened anymore.
- Double-clicking on the stack will open livecode, but the stack will not open.
- Open from Livecode via the menu - it does not open.

The file itself is there, and with 1477 KB not empty.
I tried it from another PC - without success.
I opened the file with a text editor. We can see the different parts of code inside.

Is there a way to open this stack again?

(I cannot attach the file, as ".livecode" is an invalid file extension for the forum software.)

Re: Cannot open stack anymore after crash

Posted: Fri Nov 27, 2020 5:55 pm
by dunbarx
Not sure about your issue. But you have to zip a file in order to attach it to a post.

Craig

Re: Cannot open stack anymore after crash

Posted: Fri Nov 27, 2020 7:15 pm
by jmburnod
Hi,
You may try this:
Open LC, lockmessages, open your stack from menu open of LC
Best regards
Jean-Marc

Re: Cannot open stack anymore after crash

Posted: Fri Nov 27, 2020 7:35 pm
by FourthWorld
You can zip the file for posting here.

Re: Cannot open stack anymore after crash

Posted: Sat Nov 28, 2020 7:13 pm
by jacque
Before doing a save, LC makes a copy of the stack as a backup in case something goes wrong. It names the backup with a leading tilde (~) before the original name. See if you can find a stack like that in the folder with the corrupted one. If so, you can remove the tillde from the name and the backup should open.

Re: Cannot open stack anymore after crash

Posted: Wed Dec 02, 2020 3:02 pm
by Gurki
Thank you for all this inputs.

Unfortunately, I could not find a file with a tilde.

I didn't understand, how to open with 'lockmessage'.

This is the file: https://www.swisstransfer.com/d/72754ea ... 1673e0f02b (it is bigger than the size limit of the forum, the link works for 30 days)

Re: Cannot open stack anymore after crash

Posted: Wed Dec 02, 2020 8:25 pm
by jacque
I looked at the stack, it is definitely corrupted. Locking messages doesn't help, and if there is no tilde backup then I'm afraid it's gone. You have two choices:

1. Create a new stack and reconstruct the stack cards and layout. Open the corrupted stack in a text editor and copy/paste the scripts into the new stack.
2. Ask LC support if they can fix it. There's a good probability they can, but you will probably have to pay a fee.

Re: Cannot open stack anymore after crash

Posted: Wed Dec 02, 2020 9:18 pm
by FourthWorld
Was the file stored on a networked drive, or in a folder synced with a cloud service like DropBox, iCloud, or Google Drive?

Re: Cannot open stack anymore after crash

Posted: Wed Dec 02, 2020 9:38 pm
by FourthWorld
FWIW, the engine confirms what Jacque says, that the file is corrupted:

Code: Select all

lock messages;open stack "/home/User/Path/To/File/Warships live code.livecode"; put the result
...yields: "stack is corrupted, check for ~ backup file"

When I try to open here, the IDE reports that in a warning dialog. Does that not happen for you?

Looking at the file in a binary editor, I see the header marking noting the file format is intact ("REVO07000"), and the scripts are visible. While there's a lot of JPEGs in there which would need to be imported again if remaking it, the scripts themselves are few and short, so at least that part of rebuilding would be a snap.

Re: Cannot open stack anymore after crash

Posted: Thu Dec 03, 2020 5:25 pm
by golife
Always backup your work

I am using the plugin stack "Auto backups" and it has saved my life more than once.
Check: http://livecodeshare.runrev.com/stack/799/Auto-backups

I back up the whole stack every 10 minutes.

When working in the script editor, I back up scripts after finishing one part with my own backup routing as text files appended with the date and time (with seconds).

Never do any serious development without backup. And to do it automatically using such plugin just saves you and you may even forget about it.

If you need to use a backed up stack, close LiveCode, rename the back up file to the current file name, start from there.

Golife

Re: Cannot open stack anymore after crash

Posted: Mon Dec 07, 2020 5:01 pm
by Gurki
Thank you for all help.
FourthWorld wrote:
Wed Dec 02, 2020 9:38 pm
While there's a lot of JPEGs in there which would need to be imported again if remaking it, the scripts themselves are few and short, so at least that part of rebuilding would be a snap.
That is was the student did.
golife wrote:
Thu Dec 03, 2020 5:25 pm
I am using the plugin stack "Auto backups" and it has saved my life more than once.
Check: http://livecodeshare.runrev.com/stack/799/Auto-backups
We will look to that plugin next Friday and install it on the computers in the computer room.

Re: Cannot open stack anymore after crash

Posted: Mon Dec 07, 2020 5:29 pm
by FourthWorld
Please also send the corrupt file to support AT LiveCode.com.

True file format corruption is very rare with LiveCode. Submitting that example may make it even rarer if they can pin down the cause.