Other methods to interrupt a runaway app?

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
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Other methods to interrupt a runaway app?

Post by WaltBrown » Mon Sep 20, 2010 7:38 am

Hi!
Does anyone have any tips on interrupting a runaway app? I occasionally (hmm) have algorithms under development, typically recursive, that become uninterruptible by ctrl-dot or ctrl-c (which only seems to happen when I have forgotten to save a couple hours work of course). What I sometimes do is a debugging kluge:

Code: Select all

global gEmergencyStop    -- Set to 0 on openStack
global gWhoaNelly           -- Set to some appropriate max value like 10 million on openStack

-- Called as the first line in all recursive subroutines and major loops
--    as in - eStop "in wbSuspectFunctionName"
on eStop pTargetMessage
   add 1 to gEmergencyStop
   if (gEmergencyStop > gWhoaNelly) then
        answer "eStop" && pTargetMessage
        exit to top
    end if
end eStop
Does anyone have other tips or techniques in this area to share?

Thanks!
Walt
Walt Brown
Omnis traductor traditor

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Re: Other methods to interrupt a runaway app?

Post by shadowslash » Mon Sep 20, 2010 8:02 am

If it runs / uses repeats, don't forget to add wait 0 millisecs with messages before the end repeat line.
Parañaque, Philippines
Image
Image

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Other methods to interrupt a runaway app?

Post by WaltBrown » Mon Sep 20, 2010 8:07 am

Thanks!
Walt Brown
Omnis traductor traditor

Post Reply