escape infinite loop [Solved]

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
antrax13
Posts: 39
Joined: Mon Jun 01, 2015 11:38 am

escape infinite loop [Solved]

Post by antrax13 » Fri Jun 19, 2015 11:51 am

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.
Last edited by antrax13 on Fri Jun 19, 2015 12:42 pm, edited 1 time in total.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: escape infinite loop

Post by LCNeil » Fri Jun 19, 2015 12:03 pm

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
-

antrax13
Posts: 39
Joined: Mon Jun 01, 2015 11:38 am

Re: escape infinite loop

Post by antrax13 » Fri Jun 19, 2015 12:41 pm

nice this has worked thank you very much

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

Re: escape infinite loop [Solved]

Post by jacque » Fri Jun 19, 2015 4:20 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: escape infinite loop

Post by FourthWorld » Fri Jun 19, 2015 4:23 pm

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?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: escape infinite loop [Solved]

Post by LCNeil » Fri Jun 26, 2015 9:55 am

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
-

Post Reply