Funny 5.01 Debugger Problem

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

Funny 5.01 Debugger Problem

Post by WaltBrown » Sun Dec 04, 2011 5:04 am

Hi!

I just installed a fresh copy of LC 5.01 (Win7 x64). I created a resizeStack handler in the stack script of a new empty stack. In it I tried to set a field location, but mispelled the field name. It compiled succesfully. The debugger came up when I ran it, as expected. But it locked my entire system up. I was able to three-finger-salute to kill the LC processes.

I tested it further by trying other events and other locations with missing field names. The debugger works fine in all other cases, giving me the expected "Chunk: no such object near fMispelledName", and allowing correction and continued operation of the IDE. This happens with any function within the resizeStack handler that takes a field name, and the field does not exist. And ONLY in the resizeStack handler.

Has anyone else seen this behavior, in the resizeStack handler only? Or have any possible clues?

Thanks! Walt
Walt Brown
Omnis traductor traditor

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

Re: Funny 5.01 Debugger Problem

Post by WaltBrown » Sun Dec 04, 2011 6:02 am

Further info - almost anything that triggers the debugger (for example a real number where an integer is expected) from within the resizeStack handler in the stack script is locking up my system.
Walt Brown
Omnis traductor traditor

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

Re: Funny 5.01 Debugger Problem

Post by Mark » Sun Dec 04, 2011 5:59 pm

Hi,

Yes, I see this quite often, particularly in resizeStack handlers. It is not funny. It annoys me and makes me very angry. It is a stupid unnecessary bug, which often causes me to lose hours of work.

Kind regards,

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

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Funny 5.01 Debugger Problem

Post by bn » Sun Dec 04, 2011 6:56 pm

Hi Walt and Mark,

apparently this is a long standing bug. Nevertheless I filed a new bug report in the Quality Control Center as a reminder with a sample stack to show the bug.
bug report #9896

KInd regards

Bernd

Agnar Tonheim
Posts: 10
Joined: Sun Jan 25, 2009 3:27 pm

Re: Funny 5.01 Debugger Problem

Post by Agnar Tonheim » Mon Dec 05, 2011 5:56 pm

Hi
WaltBrown wrote:Hi!

I just installed a fresh copy of LC 5.01 (Win7 x64). I created a resizeStack handler in the stack script of a new empty stack. In it I tried to set a field location, but mispelled the field name. It compiled succesfully. The debugger came up when I ran it, as expected. But it locked my entire system up. I was able to three-finger-salute to kill the LC processes.

I tested it further by trying other events and other locations with missing field names. The debugger works fine in all other cases, giving me the expected "Chunk: no such object near fMispelledName", and allowing correction and continued operation of the IDE. This happens with any function within the resizeStack handler that takes a field name, and the field does not exist. And ONLY in the resizeStack handler.

Has anyone else seen this behavior, in the resizeStack handler only? Or have any possible clues?

Thanks! Walt
I created a new stack.

Added the following script to the stack :

Code: Select all

on resizeStack newWidth,newHeight -- put an object in the middle
   --set the location of graphic "Middle" \
  set the location of fld "Middle" \
     to newWidth div 2,newHeight div 2
  pass resizeStack
end resizeStack
Clicked the browse tool (Run)

Resized the stack
The debugger came up when I ran it, as expected. But it locked my entire system up.
Debugger popped up and locked LC not my entire system (LC 5.0 on win 7)

Pressed ctrl and return key and the debugger disappeared.

Clicked pointer tool and could continue editing..

Does this work for you to or ... ?

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

Re: Funny 5.01 Debugger Problem

Post by WaltBrown » Mon Dec 05, 2011 6:05 pm

Thanks Agnar. It seems that, depending on the type of function I use within the resizeStack handler with a misspelled field name, sometimes it locks up the entire system, sometimes just LC. I have not bothered investigating exhaustively which functions do what. I would be happy to though if someone from RR specifically asks :-)

Thanks Bernd, I'll vote for it.

BR, Walt
Walt Brown
Omnis traductor traditor

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

Re: Funny 5.01 Debugger Problem

Post by Mark » Mon Dec 05, 2011 6:31 pm

Bernd, Thanks.

Agnar, if I do exactly the same what you do, LiveCode locks up completely and I have to force-quit LiveCode and lose all my unsaved work. There's no way to continue editing. Ever.

Kind regards,

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

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Funny 5.01 Debugger Problem

Post by mwieder » Mon Dec 05, 2011 6:50 pm

Walt-

PowerDebug can deal with breakpoints or errors in resizeStack handlers. I had to put special-case coding in there to handle that situation, though - as you noticed, the built-in debugger hangs - it's not just a 5.01 thing. The issue is that you're in the middle of resizing the stack when you invoke the debugger, and LC doesn't want to relinquish control until the resize function is complete. So you can't continue with the resize operation because it invokes the debugger and the debugger can't continue because you're in a resize function. Rinse and repeat.

Agnar Tonheim
Posts: 10
Joined: Sun Jan 25, 2009 3:27 pm

Re: Funny 5.01 Debugger Problem

Post by Agnar Tonheim » Mon Dec 05, 2011 10:30 pm

Mark wrote:Bernd, Thanks.

Agnar, if I do exactly the same what you do, LiveCode locks up completely and I have to force-quit LiveCode and lose all my unsaved work. There's no way to continue editing. Ever.

Kind regards,

Mark


Check if allowInterrupts is set to true (put allowInterrupts). If it is not then set it to true in the Message Box and try again.
Also check out allowInterrupts in the Dictionary...

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

Re: Funny 5.01 Debugger Problem

Post by Mark » Tue Dec 06, 2011 12:44 am

Hi Agnar,

I have been struggling with this problem for almost a decade. Personally, I have no need to discuss this now. I'll just wait for RunRev to fix this problem... or not.

Kind regards,

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

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

Re: Funny 5.01 Debugger Problem

Post by WaltBrown » Tue Dec 06, 2011 2:09 am

One note - and it relates to the mutual exclusion process Mark W describes - after locking up, when I Ctrl-Alt-Del, sometimes I can just kill the Debugger's process, and my stack and LC stay up. I assume PowerDebugger does something like that, inserting itself into the message chain at a place where it can affect loops.
Walt Brown
Omnis traductor traditor

cgdrochGA1c62
Posts: 9
Joined: Mon Dec 05, 2011 5:34 pm

Re: Funny 5.01 Debugger Problem

Post by cgdrochGA1c62 » Tue Dec 13, 2011 7:45 am

what did he type into the "message box" before he typed the rest of the code? it went off screen when I saw it and now all I get is an error message on line 18

Thanks

SD

Post Reply