!!! Stack File Corrupt?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm
Location: Heidelberg, Germany

!!! Stack File Corrupt?

Post by Gage » Tue Dec 22, 2015 10:21 pm

Hello,

I may have an emergency on my hands... I had two separate stacks open, and both happened to have a substack named "Resources". I got a warning that LiveCode doesn't discern the difference, and that data may be lost. Knowing I had just saved before opening the second stack, I felt secure, and clicked "OK".

I did not save, but when I went to quit LiveCode, it hung up, so I had to Force Quit.

Now, when I go to open my original stack, LiveCode just freezes, and nothing opens. Is my file corrupt? Pretty scared right now, it's been a long time since I backed it up.

The second file I opened (which has the similarly-named substack seems to be intact...

Hoping someone knows what I can do to recover my file without having to do a few dozen hours of work to attempt to reproduce it. :cry: :cry: :cry:

Happy Holidays if you do, and Happy Whatever-You'd-Like if you don't,
Phil E.

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm
Location: Heidelberg, Germany

Re: !!! Stack File Corrupt?

Post by Gage » Wed Dec 23, 2015 3:58 am

Well, this was kind of a disaster, but I managed to salvage the script by opening the bad LC file in Text Wrangler. It had a smorgasbord of jibber jabber, but also nestled in there somehow was most of (if not all of) the script.

I spent the last few hours recreating the objects I lost, and the majority of the disaster was averted.

Still scratching my head about what happened, though.

A word to the wise: DO NOT NAME YOUR RESOURCES STACK "RESOURCES"!!! Go for something unique, like "My Stack Name Resources: :D You don't want this heartache.

Cheers!
Phil E.

SomDude
Posts: 6
Joined: Tue Dec 22, 2015 5:24 pm

Re: !!! Stack File Corrupt?

Post by SomDude » Wed Dec 23, 2015 6:23 am

yeah, also remember to not open a Livecode stack with anything other than Livecode, I did it once with another application and when I opened it with Livecode again, it said my stack was corrupted despite me not doing anything to it at all.

Hope you got it all under control :)
- SomDude

klvs2001
Posts: 13
Joined: Wed Nov 11, 2015 6:27 pm
Location: Hendersonville TN

Re: !!! Stack File Corrupt?

Post by klvs2001 » Mon Jan 18, 2016 8:47 pm

I am having this same sort of issue. I opened the stack in Notepad++ and recreated the work but now it has happened again. All that I can figure is that it is related to the laptop going to sleep with LiveCode open at the time. I am really getting weary of recreating this work. :evil:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: !!! Stack File Corrupt?

Post by jacque » Tue Jan 19, 2016 5:39 pm

It's more likely to be the LC version you're using. Stay with LC 7.1.1 for now.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Rob van der Sloot
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 78
Joined: Sat Apr 17, 2010 9:21 am

Re: !!! Stack File Corrupt?

Post by Rob van der Sloot » Fri Jan 22, 2016 9:58 am

Yesterday I had same problem. Worked all day on a stack, saved it many times, but when I quit LiveCode, the substack I had been working on did not close. So I had to force close it.
I fortunately had a backup, which I could continue with, only 4 hours work loss.
But what I would like to have is a insight how and why a (sub)stack can get corrupt.
Is there any explanation somewhere? I could not find any in lessons, user guide or developers guide.

Thanks
Rob van der Sloot

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: !!! Stack File Corrupt?

Post by jacque » Fri Jan 22, 2016 5:17 pm

It isn't clear whether you mean a substack of the mainstack or just a separate mainstack that a launcher stack opens. But in either case, stack corruption is very rare. The one exception may be if you're using the latest LC 8 where changes were made to how stacks are saved. LC 8 is still in development and should not be used for production work. The team warns us to only use it for testing and to work on backups.

That said, the refusal to close on quit is not usually a sign of corruption. Generally it means that a process is still open and running. This can be pending messages, open drivers, or anything else that hasn't been cleared from RAM.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 365
Joined: Mon Jun 10, 2013 1:32 pm

Re: !!! Stack File Corrupt?

Post by Lagi Pittas » Fri Jan 22, 2016 5:29 pm

I was having MANY problems with crashing and a few stack corruptions way back when i was using 7.xx - I only use the latest 6.xx stable now. I wrote a script that ran in the background and saved the stack file with a different name and a timestamp - it became unwieldy but I digress.

But to mitigate this problem get yourselves a free dropbox account (2g)

The free version keeps previous versions of any file saved there for upto a month (I paid for the pro version that keeps them forever.... you never know :lol: ).

If you get into the habit of not just pressing apply but pressing CTRL-S to apply , you will have a month's worth of get out of jail cards.

On top of that I can access my code from a customer site, my mac, pc or laptop home or away ,op - Oh yes and I backup the dropbox on Hard Drives, USBs and CDs .... you never know :wink:

If you don't save at least every 15 minutes ... well you lose more than 15 minutes of work :wink:

Lagi

klvs2001
Posts: 13
Joined: Wed Nov 11, 2015 6:27 pm
Location: Hendersonville TN

Re: !!! Stack File Corrupt?

Post by klvs2001 » Sat Jan 30, 2016 3:41 pm

Thanks to all the more experienced folks for advice. I filed a bug report and it's on the list for a fix. The advice on a service which saves versions was well taken. I use the Mozy Service BUT I had saved versions which could not be opened subsequently. There was a good starter stack which I could open. So I tried that one, brought that stack up to the proper features, saved it, came back the next day and still that NEW stack refused to open. It seems that it has something to do with UniCode parsing of strings in the stack. So that was very disappointing. And all of this was done on 7.1.1. I thought it might be related to just sloppy coding...I have a large Case statement with slight changes to the code for each of the cases. It's a long bit of "cut and paste" which I am considering making into a function. However I am of course anxious about the stability of the solution IF somehow I manage to reproduce the situation which caused the original challenge. I am trying to make a stack which could ultimately be commercially viable but my confidence in the platform stability is not very high right now. Cie le vie!

A postscript: I recreated the stack in LC6 and it performs properly...Now this is a mystery to me.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”