[Cuis-dev] Debug leads a locked UI

Hernán Wilkinson hernan.wilkinson at 10pines.com
Wed Feb 22 05:19:43 PST 2023


Hi Hilaire,

> I tested latest DrGeo with my students last Friday. There are very good
> bug discoverers! My plate is full.
>
The same thing happens to me with my students (but at the university :-) ).
Newbies do things that we do not usually do and find bugs we do not...

For sure the loop you mention is due to this part of the code:
[debugger interruptedContext method == aCompiledMethod]
        whileFalse: [debugger send].

I had some issues with the debugger too when I wrote DenotativeObjects.
I'll take a look and see if I can help you.

Hernan.

> It is in the context of programming Smalltalk sketch. So we use the
> SmalltalkSketchEditor of DrGeo with its minimalist debugger.
>
> One student found that when hitting the "Step by Step" button of the
> editor when there is an empty code to compile, leads to an infinite loop
> (hopefully breakable with alt-[.])
>
> The problem also occurs with simple code as "1".
>
> I don't understand the arcane of the debugger and related compiler stuff,
> so help will be welcome to found out. I enclosed the debug log.
>
> The involved methods are the my init of the debugger session:
>
> *DrGSmalltalkEditor>>debugSketch*
>     "model ifEmpty: [^ self]."
>     self stopSketch.
>     self isDocVisible ifTrue: [self toggleHelp].
>     codeView scroller acceptContents.
>     codeView editor
>         afterCompiling: model
>         do:  [ :compiler :method :receiver :context | method ifNotNil: [
>             debugger _ Debugger
>                 openMinimalDebugging: [
>                     method
>                         valueWithReceiver: receiver
>                         arguments: (context ifNil: [ #() ] ifNotNil: [ {
> context } ])]
>                 to: method.
>             debugger layoutMorph borderWidth: 1.
>             codeAndViewPanel replaceSubmorph: codeView by: debugger
> layoutMorph.
>             debugger model when: #closeViews send: #stopDebbuger to: self.
>             debugger     contextVariableInspector selectionIndex: 3.]
>             ]
>         ifFail: [].
>
> and
>
> *Debugger class>>openMinimalDebugging: aBlock to: aCompiledMethod *
>     "Create a new process to debug aBlock, and step into it."
>
>     | processToDebug debugger window |
>     debugger _ self new.
>     processToDebug _ aBlock newProcess name: 'debugIt'.
>     debugger process: processToDebug context: processToDebug
> suspendedContext.
>     window _ debugger openMinimalMorphic.
>     [debugger interruptedContext method == aCompiledMethod]
>         whileFalse: [debugger send].
>     ^ window
>
>
> Then image is stuck in the method *doPrimitive: primitiveIndex method:
> meth receiver: receiver args: arguments*
>
> I also observed in this method several messages are unimplemented methods
> (colored in red in the Browser)
>
> I can't tell if it is a problem of Cuis or DrGeo...
>
> If one want to experiment the bug, just download latest DrGeo at
> http://dev.drgeo.eu and open its Smalltalk Sketch editor from the world
> menu then hit the "step by step" iconic button.
>
> Thanks
>
> Hilaire
>
> --
> GNU Dr. Geohttp://drgeo.euhttp://blog.drgeo.eu
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230222/9fe6525a/attachment.htm>


More information about the Cuis-dev mailing list