[Cuis-dev] Debug leads a locked UI

Juan Vuletich juan at cuis.st
Wed Feb 22 07:10:49 PST 2023


Hi Hilaire,

I base Cuis we used to have the same bug. See the history of #debugIt. 
If the method #isQuick, we can't open a debugger on it.

Hope this helps.

Cheers,

On 2/21/2023 5:41 PM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi,
>
> I tested latest DrGeo with my students last Friday. There are very 
> good bug discoverers! My plate is full.
>
> 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. Geo
> http://drgeo.eu
> http://blog.drgeo.eu


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230222/08138c7a/attachment.htm>


More information about the Cuis-dev mailing list