[Cuis-dev] Debugging faulty Morph
Gerald Klix
cuis.01 at klix.ch
Thu Apr 29 06:06:00 PDT 2021
Once more with the right sender address,
need sonme sleep!
----
Yes, every failure in the display loop is a
nuisance to debug.
Nice :] to hear that 'Cmd-.' does not work
for you, too, meaning I am not alone with that problem.
Please find attached a quick hack to work around that problem.
You can test it with this piece of code:
--- snip ---
"First evaluate this nice bugger:"
ib _ [ :ib | ib value: ib ].
"Then kick it hard!"
ib value: ib
--- snap ---
Cmd-, should work.
@Juan
Something should be done about this.
HTH and Best Regards,
Gerald
On 2021-04-29 14:36, Hilaire Fernandes via Cuis-dev wrote:
> Hi Juan,
>
> I found that debugging faulty morph is hard in some situation, at
least in the context of DrGeo which, I acknowledge, may not be
representative.
>
> Any way, when I have this DrGeo drawable (just a morph) to which I
add other morph (view of geometric model), whenever this morph is
causing an error (for example sending a message to a nil object), Cuis
enters an unstoppable infinite loop (Alt+ [.] does not work) and log is
printed on the command line terminal (log attached too). The debugger
never shows up:
>
> |Error: Error: instVarAt:put: failed|
>
> |See
/home/hilaire/Travaux/Developpement/Cuis/Cuis-Smalltalk-Dev/CuisDebug-2021-04-29_14.22.45.log|
>
> |29 April 2021 2:22:45.925242 pm|
>
> |UndefinedObject(Object)>>error:|
>
> |[] in WorldMorph>>displayWorldSafely|
>
> |BlockClosure>>valueWithPossibleArgument:and:|
>
> |[] in BlockClosure>>ifError:|
>
> |BlockClosure>>valueWithPossibleArgument:|
>
> |[] in [] in Error(Exception)>>evaluateHandlerBlock:|
>
> |BlockClosure>>on:do:|
>
> |[] in Error(Exception)>>evaluateHandlerBlock:|
>
> |BlockClosure>>ifCurtailed:|
>
> |Error(Exception)>>evaluateHandlerBlock:|
>
> |MethodContext(ContextPart)>>evaluateSignal:|
>
> |MethodContext(ContextPart)>>handleSignal:|
>
> |Error(Exception)>>signalIn:|
>
> |Error(Exception)>>signal|
>
> |Error(Exception)>>signal:|
>
> |UndefinedObject(Object)>>error:|
>
> |UndefinedObject(Object)>>primitiveFailed:|
>
> |UndefinedObject(Object)>>primitiveFailed|
>
> |UndefinedObject(Object)>>instVarAt:put:|
>
> |Error: Error: instVarAt:put: failed|
>
> |See
/home/hilaire/Travaux/Developpement/Cuis/Cuis-Smalltalk-Dev/CuisDebug-2021-04-29_14.22.45.log|
>
> |29 April 2021 2:22:45.926454 pm|
>
> |UndefinedObject(Object)>>error:|
>
> |[] in WorldMorph>>displayWorldSafely|
>
> |BlockClosure>>valueWithPossibleArgument:and:|
>
> |[] in BlockClosure>>ifError:|
>
> |BlockClosure>>valueWithPossibleArgument:|
>
> |[] in [] in Error(Exception)>>evaluateHandlerBlock:|
>
> |BlockClosure>>on:do:|
>
> |[] in Error(Exception)>>evaluateHandlerBlock:|
>
> |BlockClosure>>ifCurtailed:|
>
> |Error(Exception)>>evaluateHandlerBlock:|
>
> |MethodContext(ContextPart)>>evaluateSignal:|
>
> |MethodContext(ContextPart)>>handleSignal:|
>
> |Error(Exception)>>signalIn:|
>
> |Error(Exception)>>signal|
>
> |Error(Exception)>>signal:|
>
> |UndefinedObject(Object)>>error:|
>
> |UndefinedObject(Object)>>primitiveFailed:|
>
> |UndefinedObject(Object)>>primitiveFailed|
>
> |UndefinedObject(Object)>>instVarAt:put:|
>
>
>
>
On 2021-04-29 14:36, Hilaire Fernandes via Cuis-dev wrote:
> Hi Juan,
>
> I found that debugging faulty morph is hard in some situation, at least
> in the context of DrGeo which, I acknowledge, may not be representative.
>
> Any way, when I have this DrGeo drawable (just a morph) to which I add
> other morph (view of geometric model), whenever this morph is causing an
> error (for example sending a message to a nil object), Cuis enters an
> unstoppable infinite loop (Alt+ [.] does not work) and log is printed on
> the command line terminal (log attached too). The debugger never shows up:
>
> |Error: Error: instVarAt:put: failed|
>
> |See
> /home/hilaire/Travaux/Developpement/Cuis/Cuis-Smalltalk-Dev/CuisDebug-2021-04-29_14.22.45.log|
>
>
> |29 April 2021 2:22:45.925242 pm|
>
> |UndefinedObject(Object)>>error:|
>
> |[] in WorldMorph>>displayWorldSafely|
>
> |BlockClosure>>valueWithPossibleArgument:and:|
>
> |[] in BlockClosure>>ifError:|
>
> |BlockClosure>>valueWithPossibleArgument:|
>
> |[] in [] in Error(Exception)>>evaluateHandlerBlock:|
>
> |BlockClosure>>on:do:|
>
> |[] in Error(Exception)>>evaluateHandlerBlock:|
>
> |BlockClosure>>ifCurtailed:|
>
> |Error(Exception)>>evaluateHandlerBlock:|
>
> |MethodContext(ContextPart)>>evaluateSignal:|
>
> |MethodContext(ContextPart)>>handleSignal:|
>
> |Error(Exception)>>signalIn:|
>
> |Error(Exception)>>signal|
>
> |Error(Exception)>>signal:|
>
> |UndefinedObject(Object)>>error:|
>
> |UndefinedObject(Object)>>primitiveFailed:|
>
> |UndefinedObject(Object)>>primitiveFailed|
>
> |UndefinedObject(Object)>>instVarAt:put:|
>
> |Error: Error: instVarAt:put: failed|
>
> |See
> /home/hilaire/Travaux/Developpement/Cuis/Cuis-Smalltalk-Dev/CuisDebug-2021-04-29_14.22.45.log|
>
>
> |29 April 2021 2:22:45.926454 pm|
>
> |UndefinedObject(Object)>>error:|
>
> |[] in WorldMorph>>displayWorldSafely|
>
> |BlockClosure>>valueWithPossibleArgument:and:|
>
> |[] in BlockClosure>>ifError:|
>
> |BlockClosure>>valueWithPossibleArgument:|
>
> |[] in [] in Error(Exception)>>evaluateHandlerBlock:|
>
> |BlockClosure>>on:do:|
>
> |[] in Error(Exception)>>evaluateHandlerBlock:|
>
> |BlockClosure>>ifCurtailed:|
>
> |Error(Exception)>>evaluateHandlerBlock:|
>
> |MethodContext(ContextPart)>>evaluateSignal:|
>
> |MethodContext(ContextPart)>>handleSignal:|
>
> |Error(Exception)>>signalIn:|
>
> |Error(Exception)>>signal|
>
> |Error(Exception)>>signal:|
>
> |UndefinedObject(Object)>>error:|
>
> |UndefinedObject(Object)>>primitiveFailed:|
>
> |UndefinedObject(Object)>>primitiveFailed|
>
> |UndefinedObject(Object)>>instVarAt:put:|
>
>
>
>
-------------- next part --------------
'From Haver 5.0 [latest update: #4572] on 29 April 2021 at 2:55:24 pm'!
Modules newEnvironment: #Distributor!
Modules newEnvironment: #FileFinder!
!SystemDictionary methodsFor: 'miscellaneous' stamp: 'KLG 4/29/2021 14:51:31'!
handleUserInterrupt
| p |
"p _ Utilities reportCPUandRAM."
p _ nil.
Preferences cmdDotEnabled ifTrue: [
[ UISupervisor userInterrupt: p ] fork]! !
!UISupervisor class methodsFor: 'gui process' stamp: 'KLG 4/29/2021 14:51:01'!
userInterrupt: aProcess
"Create a Notifier on the active scheduling process with the given label."
| process |
process _ aProcess ifNil: [ UIProcess ].
"Only debug aProcess if its priority is >= UIProcess' priority"
UIProcess ifNotNil: [
process priority < UIProcess priority ifTrue: [
process _ UIProcess ]].
Debugger interruptProcess: process label: 'User Interrupt'! !
More information about the Cuis-dev
mailing list