I’ve stumbled upon this weird bug when debugging Eliot’s example (filein the enclosed changeset first):

 

| home error |

home := thisContext.

Semaphore forMutualExclusion critical:

    [[nil new]

       on: Error

        do: [:ex| error := ex copyForReraiseTo: home disableUnwinds: true]].

error reraise

 

Run the example in the debugger: first step OVER three times and then step IN (into the reraise and then privSender) four times and you get a weird error when the last stepIn returns from privSender.

 

Tools-jar.1189 fixes the bug.

 

PS: Sorry I wasn’t able to find a simpler example.

 

Best,

 

--

Jaromír Matas

mail@jaromir.net

 

 

From: commits@source.squeak.org
Sent: Tuesday, January 31, 2023 18:13
To: squeak-dev@lists.squeakfoundation.org
Subject: [squeak-dev] The Inbox: Tools-jar.1189.mcz

 

A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-jar.1189.mcz

==================== Summary ====================

Name: Tools-jar.1189
Author: jar
Time: 31 January 2023, 6:13:22.676927 pm
UUID: 70af9ca9-39c5-3944-a8dc-84124e321288
Ancestors: Tools-mt.1188

fix a bug when doing stepInto; this fix makes the three methods #stepInto, #stepOver and #stepThrough consistent. Sending an example in a separate message.

=============== Diff against Tools-mt.1188 ===============

Item was changed:
  ----- Method: Debugger>>send (in category 'context stack menu') -----
  send
         "Send the selected message in the accessed method, and take control in
         the method invoked to allow further step or send."
 
+        | newContext currentContext |
         self okToChange ifFalse: [^ self].
         self interruptedProcessIsReady ifFalse: [^ self shouldNotStep].
         self checkContextSelection.
+        currentContext := self selectedContext.
+        self handleLabelUpdatesIn:
+                        [interruptedProcess step: currentContext]
+                whenExecuting: currentContext.
-        interruptedProcess step: self selectedContext.
         interruptedProcess ifNil: [^ self shouldNotStep].
+        newContext := interruptedProcess stepToSendOrReturn.
+        self updateProcess.
+        self contextStackIndex > 1
+                ifTrue: [self resetContext: newContext]
+                ifFalse:
+                        [newContext == currentContext
+                                ifTrue: [self changed: #contentsSelection.
+                                                self updateInspectors]
+                                ifFalse: [self resetContext: newContext]]!
-        self resetContext: interruptedProcess stepToSendOrReturn.!