The Inbox: ST80-ct.308.mcz

[email protected]
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
A new version of ST80 was added to project The Inbox:
http://source.squeak.org/inbox/ST80-ct.308.mcz

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

Name: ST80-ct.308
Author: ct
Time: 7 June 2026, 11:24:27.75189 pm
UUID: 2562db01-aae7-46bf-92ae-12c4452efe02
Ancestors: ST80-ct.307

Fixes two concurrent schedulers issue after debugger invocation via "debug it" in MVC.

This was a regression from System-mt.1382/ST80-mt.287 et al. When we send #openNoTerminate in MVCProject>>#openDebuggerWindow:, the active controller process is changed. So, retrieving that process only afterwards in #suspendProcessSafely: was too late to correctly identify whether the debugger was invoked from a helper process or the active process needs termination.

=============== Diff against ST80-ct.307 ===============

Item was changed:
  ----- Method: MVCProject>>prepareProcessForDebugger: (in category 'scheduling & debugging') -----
  prepareProcessForDebugger: processToDebug
  	"Keep track of the controller if it matches. Also note the current cursor."
  
+ 	| uiProcess |
+ 	uiProcess := self world activeControllerProcess.
+ 	processToDebug st80InterruptedControllerProcess: uiProcess.
+ 	uiProcess == processToDebug ifTrue: [
- 	self world activeControllerProcess == processToDebug ifTrue: [		
  		processToDebug st80InterruptedController: self world activeController].
+ 	
- 
  	processToDebug st80SavedCursor: Cursor currentCursor.
  	
  	super prepareProcessForDebugger: processToDebug.!

Item was changed:
  ----- Method: MVCProject>>resumeProcessSafely: (in category 'scheduling & debugging') -----
  resumeProcessSafely: aProcess
  	"We only want a single controller process running in MVC. Hopefully, #activeControler:andProcess: takes care of terminating the currently active one."
  
  	aProcess st80SavedCursor show.
  	aProcess st80SavedCursor: nil.
+ 	
- 
  	ScheduledControllers
  		activeController: aProcess st80InterruptedController
  		andProcess: aProcess.
+ 	
+ 	aProcess st80InterruptedController: nil.
+ 	aProcess st80InterruptedControllerProcess: nil.!
- 
- 	aProcess st80InterruptedController: nil.!

Item was changed:
  ----- Method: MVCProject>>suspendProcessSafely: (in category 'scheduling & debugging') -----
  suspendProcessSafely: processToDebug
  	"Overwritten to activate the controller process for the debugger window.
  	See #openDebuggerWindow:."
  	
+ 	| uiProcess wasActive |
+ 	uiProcess := processToDebug st80InterruptedControllerProcess.
+ 	wasActive := uiProcess isActiveProcess.
- 	| controlManager uiProcess wasActive |
- 	controlManager := self world.	
- 	uiProcess := controlManager activeControllerProcess.
- 	wasActive := controlManager inActiveControllerProcess.
  	
  	"If we are in a helper process, #openNoTerminate WILL NOT activate
  	the	debugger's controller. Example: user-interrupt request (cmd+dot).
  	See #openDebuggerWindow:."
  	(uiProcess == processToDebug and: [wasActive not])
+ 		ifTrue: [[self world searchForActiveController] fork].
+ 	
- 		ifTrue: [[controlManager searchForActiveController] fork].
- 
  	"Be sure to suspend the process we want to debug now. We must do
  	this as late as possible in case it is the active process."
  	processToDebug suspend.
+ 	
- 		
  	"If we are NOT in a helper process, #openNoTerminate WILL NOT
  	terminate the active controller's process. See #openDebuggerWindow:."
  	(uiProcess ~~ processToDebug and: [wasActive])
  		ifTrue: [Processor terminateActive].!

Item was added:
+ ----- Method: Process>>st80InterruptedControllerProcess (in category '*ST80-debugging support') -----
+ st80InterruptedControllerProcess
+ 
+ 	^ self environmentAt: #st80InterruptedControllerProcess ifAbsent: nil!

Item was added:
+ ----- Method: Process>>st80InterruptedControllerProcess: (in category '*ST80-debugging support') -----
+ st80InterruptedControllerProcess: aProcess
+ 
+ 	^ self environmentAt: #st80InterruptedControllerProcess put: aProcess!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.