Desperately need help - infinite loop!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Desperately need help - infinite loop!
Hi guys,
I made a very silly mistake and I am afraid I may be stuck. I have a wait x milliseconds inside of an infinite main loop that gets called from my preOpenStack. Of course, in hind sight, I should have done wait x milliseconds with messages, but I had a lapse of judgement. To make matters worse, I haven't saved in two hours, and I think everyone here knows how much you get done with LiveCode in that time!
Now, if there was any good news at all, I was able to frantically hit the close enough times to actually catch it before I was executing the wait. I pressed save, and I think I actually saved it! But I can obviously not reopen the file without getting into the loop again.
So, my question is:
Am I out of luck, or is there a way I can open livecode and subsequently the file so I can fix my mistake before preOpenStack gets called?
File is attached out of desperation!
Thanks,
Tom
I made a very silly mistake and I am afraid I may be stuck. I have a wait x milliseconds inside of an infinite main loop that gets called from my preOpenStack. Of course, in hind sight, I should have done wait x milliseconds with messages, but I had a lapse of judgement. To make matters worse, I haven't saved in two hours, and I think everyone here knows how much you get done with LiveCode in that time!
Now, if there was any good news at all, I was able to frantically hit the close enough times to actually catch it before I was executing the wait. I pressed save, and I think I actually saved it! But I can obviously not reopen the file without getting into the loop again.
So, my question is:
Am I out of luck, or is there a way I can open livecode and subsequently the file so I can fix my mistake before preOpenStack gets called?
File is attached out of desperation!
Thanks,
Tom
- Attachments
-
- Traffic Light FSM.zip
- (2.29 KiB) Downloaded 223 times
Re: Desperately need help - infinite loop!
Hi.
Welcome to our world.
I always put a line: "if the optionKey is down exit to top" in every loop I throw together that may not have a way out.
When I say every time, I mean I do it after I get caught like you did.
Make another stack, or in the msg box, and do this:
Get in there and dig out the offending line, or lack of line.
Craig Newman
Welcome to our world.
I always put a line: "if the optionKey is down exit to top" in every loop I throw together that may not have a way out.
When I say every time, I mean I do it after I get caught like you did.
Make another stack, or in the msg box, and do this:
Code: Select all
edit the script of stack "yourInfiniteLoopStack"
Craig Newman
Re: Desperately need help - infinite loop!
If it is still running, then hit cmd-period several times (on win and linux ctrl-period).
p.s. Hi Craig, did you change your name (to Nemwan)?
See 'shorten strings...'.
All teh bset , Hremann
p.s. Hi Craig, did you change your name (to Nemwan)?
See 'shorten strings...'.
All teh bset , Hremann

shiftLock happens
Re: Desperately need help - infinite loop!
If it is closed, then use the "envelope" icon in the menu bar of the ide to disable messages. Then you can open the stack again and it will not fire up the script in preOpenStack, so you can make edits and restore sanity.
Re: Desperately need help - infinite loop!
Craig,
THANK YOU, I was able to recover what I thought I lost - PHEW, lesson learned!
To add onto what was probably clear to everyone but myself, you have to include the file path of the file you are interested in since the stack is not currently open. So for me, I typed the following into the message box:
THANK YOU, I was able to recover what I thought I lost - PHEW, lesson learned!
To add onto what was probably clear to everyone but myself, you have to include the file path of the file you are interested in since the stack is not currently open. So for me, I typed the following into the message box:
Code: Select all
edit the script of stack "C:\Users\tom\Desktop\Traffic Light FSM.livecode"
Re: Desperately need help - infinite loop!
Hermann.
Criag
That's mighty tough talk from a negative square.p.s. Hi Craig, did you change your name (to Nemwan)?
Criag