Page 1 of 1

Funny 5.01 Debugger Problem

Posted: Sun Dec 04, 2011 5:04 am
by WaltBrown
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

Re: Funny 5.01 Debugger Problem

Posted: Sun Dec 04, 2011 6:02 am
by WaltBrown
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.

Re: Funny 5.01 Debugger Problem

Posted: Sun Dec 04, 2011 5:59 pm
by Mark
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

Re: Funny 5.01 Debugger Problem

Posted: Sun Dec 04, 2011 6:56 pm
by bn
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

Re: Funny 5.01 Debugger Problem

Posted: Mon Dec 05, 2011 5:56 pm
by Agnar Tonheim
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 ... ?

Re: Funny 5.01 Debugger Problem

Posted: Mon Dec 05, 2011 6:05 pm
by WaltBrown
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

Re: Funny 5.01 Debugger Problem

Posted: Mon Dec 05, 2011 6:31 pm
by Mark
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

Re: Funny 5.01 Debugger Problem

Posted: Mon Dec 05, 2011 6:50 pm
by mwieder
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.

Re: Funny 5.01 Debugger Problem

Posted: Mon Dec 05, 2011 10:30 pm
by Agnar Tonheim
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...

Re: Funny 5.01 Debugger Problem

Posted: Tue Dec 06, 2011 12:44 am
by Mark
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

Re: Funny 5.01 Debugger Problem

Posted: Tue Dec 06, 2011 2:09 am
by WaltBrown
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.

Re: Funny 5.01 Debugger Problem

Posted: Tue Dec 13, 2011 7:45 am
by cgdrochGA1c62
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