Page 1 of 1

escape infinite loop [Solved]

Posted: Fri Jun 19, 2015 11:51 am
by antrax13
Ok this seems to be funny but I have created infinite loop on openStack.

I have an infinite loop on open stack like

Code: Select all

on openStack
put 1 into counter
repeat while counter <= 10 
 -- do stuff
answer "test"
end repeat
end openStack
obviously I forgot to add 1 to counter but How to escape it? Application start to get not responding after I click on OK after answer dialog box is showed.
Because it is straight after load stack I am lost ...
I can not do anything because livecode is not responding as soon as I open that stack.... message box is not responding, tools bar not responding ffs.

PS: No I can not start from scratch again its work worth of a 2 weeks.

Re: escape infinite loop

Posted: Fri Jun 19, 2015 12:03 pm
by LCNeil
Hi Antrax,

If you still have the IDE up and running you can try "CMD+period" (macOSX) or "CTRL+period" (Win) to try abort the repeat loop.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-

Re: escape infinite loop

Posted: Fri Jun 19, 2015 12:41 pm
by antrax13
nice this has worked thank you very much

Re: escape infinite loop [Solved]

Posted: Fri Jun 19, 2015 4:20 pm
by jacque
Another way is to click the Messages button in the toolbar before opening the stack. That prevents scripts from running. Remember to turn messages on again after you fix the problem.

Re: escape infinite loop

Posted: Fri Jun 19, 2015 4:23 pm
by FourthWorld
LCNeil wrote:If you still have the IDE up and running you can try "CMD+period" (macOSX) or "CTRL+period" (Win) to try abort the repeat loop.
Neil, I've never had any luck with that when an answer dialog is in the loop. Does that work for you?

Re: escape infinite loop [Solved]

Posted: Fri Jun 26, 2015 9:55 am
by LCNeil
Hi Richard,

I beleive the answer dialog is blocking within the IDE until its dismissed so the CTRL+period & CMD+period methods would not work in this instance

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-