Can't save stack issue

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Can't save stack issue

Post by dunbarx »

This started when I upgraded from v.6 to v.8, months ago.

Every so often, a stack I am working on will fail to save, I get a dialog telling me so, and the reason being that it "cannot open stack file". I dismiss the dialog, and nothing changes, except no save.

The first couple of times I lost all my work with a forced quit. Then I tried saving the stack with another name via "Save as...". That worked fine, and I just renamed the new stack file. Then I got really smart and simply saved it with the same name, whereupon I was asked if I wanted to replace the original. I said "OK", it did its thing, and all is good.

Anyone see this?

Craig Newman
MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Can't save stack issue

Post by MaxV »

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Can't save stack issue

Post by dunbarx »

Max.

Thanks.

But this still leaves the issue: "What is going on", or, as I am fond of saying, "What am I doing wrong", or, as I am even fonder of saying, "Why me?"

Craig
bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Can't save stack issue

Post by bogs »

dunbarx wrote: Tue May 15, 2018 2:46 pm ...or, as I am even fonder of saying, "Why me?"
If not you, then I :wink:
Image
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Can't save stack issue

Post by jacque »

Did you move the stack in the Finder while it was open? It sounds like the filename is no longer accurate when it fails to save.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Can't save stack issue

Post by dunbarx »

Jacque.
Did you move the stack in the Finder while it was open?
Nope.

On this project I am always working on a stack who's stack file sits on the desktop. That was a sensible observation, though.

This only started happening a few months ago. I have been fooling around with this stack for two years. I am not sure it has anything to do with migrating to v.8.

Craig
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Can't save stack issue

Post by jacque »

Maybe insert "answer the filename of this stack" before saving and see if anything changed behind your back.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Can't save stack issue

Post by dunbarx »

Jacque.

Well.

This is what the "fileName of this stack" gives normally.
/Users/craignewman/Desktop/ledWorker356.livecode
And this is what I get, per your astute suggestion, when I cannot save any longer, and before I have to "Save as", with the same name, and agree to replace the existing stack.
/Users/craignewman/Desktop/LEDSplash356/MacOSX/LEDSplash356.app/Contents/MacOS/ledWorker356.livecode
In all instances, the stack file is on the desktop along with the stack itself, and so is the splash stack and its file that I use to make standalones. So all four are on the desktop, always, and about every 20th time I try to save the main working stack, I get the dialog that LC "cannot open stack file".

The workaround has never failed, but it makes me nervous. The long pathname above points to the most recent copy of the standalone executable ("LEDSplash356"), located in its own folder on the desktop. When I make a standalone, I place it in that folder along with its earlier cousins. In that folder is a windows version as well, since everyone that uses this runs windows. But it is the Mac "app" that seems to be insinuating itself into play.

Craig
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Can't save stack issue

Post by jacque »

Yes, it does seem to be finding the embedded copy in the app instead of the working copy on the desktop. I don't have an explanation for that, unless for some reason you opened the embedded copy by accident. Is there a reason to embed a copy of the stack? Maybe taking it out would fix things.

That doesn't explain why LC switched its default folder to inside the app bundle though. That appears to be what it's doing.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Can't save stack issue

Post by dunbarx »

Jacque.

How could it decide to go into the app just now and then? I am not really expecting an answer, only laying out the situation. I do not ever access the app in that folder while I am fooling around with the stack. It just does it haphazardly.

I cannot reproduce, and I doubt that the stack is at fault. If nobody else has ever seen this, I will live with it.

Craig
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Can't save stack issue

Post by jacque »

Does the error only happen after you've built a standalone and before you've reopened the independent stack? LC does close and reopen stacks after a build. If your build process includes the problem stack then its new file path could be the filename.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Can't save stack issue

Post by dunbarx »

Jacque.
Does the error only happen after you've built a standalone and before you've reopened the independent stack?
No, I make standalones, each uniquely numbered, for this internal app regularly, as either bugs are found or features added. I keep a copy of all versions in a folder on my desktop. I will eventually start working on a new variant. The most recent standalone build is safely in its folder, perhaps having been made days before. The working mainstack is open from the desktop.

Most times, since I save often, I never see the dialog. But now and then I do, and it is always in the middle of a working session. I will "save as", using the proffered (identical) stack name, take the suggestion to replace, and all is well. Thereafter I can always save in the ordinary way.

I just have the feeling I am skirting some sort of corruption, since nobody else seems ever to have seen this.

Again, I cannot reproduce the process; it happens randomly. I have not simply tried to repeatedly save the mainstack until it happens. Maybe I will try that for several minutes. In that case I could send the most recent standalone build along with the mainstack and see what they say.

Craig
karmacomposer
Posts: 361
Joined: Wed Apr 27, 2011 2:12 pm

Re: Can't save stack issue

Post by karmacomposer »

I've not had this issue on the Windows version. Saves are fine.

Mike
CAsba
Posts: 452
Joined: Fri Sep 30, 2022 12:11 pm

Re: Can't save stack issue

Post by CAsba »

Hi,
I've got the same problem. So, I 'save as' to desktop, before close down. Before start up, I copy the desktop file to the LC defined path,
C:\program files\runrev\livecode 9.6.11.
Then I select the LC path file in the start centre. A bit of a chore, but functional...
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Can't save stack issue

Post by Klaus »

Hi CAsba,

a "regular" user has no permission to save files in the "programm files" folder!
(Same on macOS with the "Applications" folder)
Create a folder somewhere else on your hd to save your projects in!


Best

Klaus
Post Reply