abort scripts

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

abort scripts

Post by billworld » Tue Oct 28, 2008 7:02 pm

As a new user, one is bound to cause problems "clicking around" and/or inserting scripts which may not be altogether proper (e.g. until one learns the correct way). I've been locking things up quite a bit as I'm learning. For example, I've received the following errors.

Code: Select all

button "Button": execution error at line n/a (Object: can't set script while it is executing)

card id 1002: execution error at line n/a (Object: can't set script while it is executing)
I thought I read that command-period would abort the currently running script. But, I've had "frozen cards" even after doing this. On some occasions I can close out of the card by selecting the Close menu option. But, the last time this occurred this didn't work, I had to force quit out of the app.

Is there no way to explicitly abort all rogue scripts?

The scripts in question didn't have any option to NOT allow the script to be aborted.[/img]

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Re: abort scripts

Post by billworld » Sun Nov 02, 2008 5:58 pm

Okay. No responses on this one. Let me clarify by saying the problem isn't just me clicking around. There's an issue with the platform, or there's a feature I'm not award of which allows you to globally abort any rogue script/event that is currently stuck in memory.

Here's another example. I'm trying to learn this stuff, but, not all of the resources are helpful. In fact, some of them just plain FAIL. So, follow the steps below. All I did was click on a URL in the author's bio (before even reading the darn thing) and got stuck!

Is there no routine in RR to globally abort all rogue scripts? And, is the problem in the stack referenced below the "< >" surrounding the URL in question? If so, why is this posted as a learning tutorial if it contains not only defective code, but, code which locks up your IDE?

Seriously folks, this doesn't help newbies one bit... Easy to get turned off with this platform. Comes across as a non-professional tool...

1. go to http://support.runrev.com/scriptingconferences/

2. click and download the topic named "controls"

3. open the file "20050528controls.rev" in RR

4. click the "next" button 4 times to go to the Author Bio page

5. look on bottom of card and click on www.techietours.com url

6. you are taken to the script editor with the line of code referencing the www.techietours.com url highlighted

7. you are stuck in this card; you either need to quit (if lucky) or force quit (more often than not)
Last edited by billworld on Mon Nov 03, 2008 3:41 pm, edited 1 time in total.

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm

Post by paul_gr » Sun Nov 02, 2008 7:51 pm

There's a spelling mistake.
an extra "r" in revgourl

revgorurl "http://www.techietours.com"
should be
revgourl "http://www.techietours.com"


Paul

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Sun Nov 02, 2008 11:10 pm

How does one get out of the "locked" state of the card (or whatever term is proper to refer to it being frozen) when such an error is triggered?

I've tried com-. and esc to get out, but, that doesn't work.
paul_gr wrote:There's a spelling mistake.
an extra "r" in revgourl

revgorurl "http://www.techietours.com"
should be
revgourl "http://www.techietours.com"


Paul

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm

Post by paul_gr » Mon Nov 03, 2008 12:21 am

Shift + F5 stops the debugger for me so far.
You can also do it by using the menu bar.
debug >> stop

Paul

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Nov 03, 2008 10:29 am

Hi,

To get out of debugging mode, you can press the green square button on top of the screen. This button is visible if you haven't collapsed the area of the screen containing that button (I'd rather not call it a toolbar).

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Mon Nov 03, 2008 3:07 pm

Thanks, but, the issue isn't just stopping the debugger. Either entire RR environment gets locked up or one of the cards itself gets locked up.

Hasn't this occurred to anyone? Again, I've had this occur trying one of the incorrectly coded Tutorial scripts WITHOUT any modification on my part.
Mark wrote:Hi,

To get out of debugging mode, you can press the green square button on top of the screen. This button is visible if you haven't collapsed the area of the screen containing that button (I'd rather not call it a toolbar).

Best,

Mark

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Nov 03, 2008 3:17 pm

Hi BIll,

Yes, I believe I have seen it too, but it is difficult to determined whether it is my own fault or Rev's. Which tutorial were you trying and what did you do, exactly, to run into this problem?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Mon Nov 03, 2008 3:39 pm

I provide the step-by-step above in this thread.
Mark wrote:Hi BIll,

Yes, I believe I have seen it too, but it is difficult to determined whether it is my own fault or Rev's. Which tutorial were you trying and what did you do, exactly, to run into this problem?

Best,

Mark

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Mon Nov 03, 2008 3:50 pm

Yep, there is a "r" to much in "revgorurl", my fault, sorry.

After klicking that link the script editor pops up and complains about the line with the extra "R".
I can select "Stop" (CMD-Y) from the debug menu, delete that extra "R" and no problems anymore.

No locking up the IDE or something!?

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Mon Nov 03, 2008 3:57 pm

Hi Klaus:

Not meaning to air out anyone's dirty laundry here... :)

Yes, I've re-launched RR and ONLY did this routine and was also able to safely stop from the debug menu. I did this yesterday. However, I've also attempted this a number of other times where the entire RR environment got locked up on me. I'm sorry, I don't have the step-by-step on that right now. When I wrote the previous step-by-step, it was locking my RR every time. Just what other stacks were open I'm not sure of right now.

Maybe there's some issue with RR getting in a particular state after which any rogue script can cause it to lock up?

I think that's the main issue. I'm not sure how to go about troubleshooting, but, it's been reported nonetheless.
Klaus wrote:Yep, there is a "r" to much in "revgorurl", my fault, sorry.

After klicking that link the script editor pops up and complains about the line with the extra "R".
I can select "Stop" (CMD-Y) from the debug menu, delete that extra "R" and no problems anymore.

No locking up the IDE or something!?

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Post by billworld » Mon Nov 03, 2008 4:00 pm

Note. In using FileMaker Pro 9 Advanced I haven't ever run into a situation where a rogue script (e.g. infinite loop) can NOT be aborted using the script abort command.

Again, with RR, I've encountered multiple instances (not just with the script referred to herein) of NOT being able to stop the script. The environment just locks up and I'm forced to Force Quit to get out.

billworld wrote:Hi Klaus:

Not meaning to air out anyone's dirty laundry here... :)

Yes, I've re-launched RR and ONLY did this routine and was also able to safely stop from the debug menu. I did this yesterday. However, I've also attempted this a number of other times where the entire RR environment got locked up on me. I'm sorry, I don't have the step-by-step on that right now. When I wrote the previous step-by-step, it was locking my RR every time. Just what other stacks were open I'm not sure of right now.

Maybe there's some issue with RR getting in a particular state after which any rogue script can cause it to lock up?

I think that's the main issue. I'm not sure how to go about troubleshooting, but, it's been reported nonetheless.
Klaus wrote:Yep, there is a "r" to much in "revgorurl", my fault, sorry.

After klicking that link the script editor pops up and complains about the line with the extra "R".
I can select "Stop" (CMD-Y) from the debug menu, delete that extra "R" and no problems anymore.

No locking up the IDE or something!?

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

REPRODUCIBLE STEPS TO LOCK UP RR EVERY TIME

Post by billworld » Tue Nov 04, 2008 12:38 am

Okay. It really didn't take long for me to get my system locked up again using someone else's code... (In fact using a stack from a very highly regarded Rev developer.)

This routine has caused my RR IDE to completely lock up every time (just tried 3 times) forcing a Force Quit as the only way out. Esc, com-., com-Y all don't work. No menu options are available. This routine clearly locks up the IDE.

To reproduce the problem. Simply do the following:

1. Click on the Rev Online button in the RR IDE

2. Click on User Spaces

3. Click on Browse by categories

4. Select the Programming category

5. Select "Inspector Gadget v2.14"

6. Select the Go To button

7. In the "Inspector Gadget v2.14" widow, select the only option available which is "use no-click inspection"

8. Then place the mouse over the revOnline stack

9. You are then taken to the script editor

10. close the SE or try to move it's window, or just try to click anything

11. in a moment you'll discover the entire RR environment is frozen. The only way out is to force quit.

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm

Post by paul_gr » Tue Nov 04, 2008 5:19 am

Have to agree with you here -- I get the same result.

Paul

pbw
Posts: 1
Joined: Mon Nov 27, 2006 6:19 pm

Re: abort scripts

Post by pbw » Fri Dec 11, 2009 2:55 pm

You are right Billworld. I have exactly the same problems using the put URL command when the URL is not reachable. The complete runrev app slows down to an unacceptable limit or freezes, the script can not be aborted. Also windows freeze and if you move a window from a different program above the runrev window you'll get ghost images.

Very annoying indeed, sometimes only a forced quit helps.

pbw

Post Reply