Skip to content

Commit

Permalink
freezing debugger problem possibly fixed
Browse files Browse the repository at this point in the history
Resume with the suspendingList (a semaphore or nil) seems to fix the problem. See my personal notes for a "stream of consciousness" look at how that was arrived at.  Needs a lot more use and testing to be sure it's fixed. /home/ewinger/Notes/20220719_freezing_debugger
  • Loading branch information
Eric Winger authored and Eric Winger committed Jul 20, 2022
1 parent 4d8e675 commit fcbc593
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sources/JadeDebugger.cls
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ answer
left in a state in which the cursor is not set back to its original value.
We mitigate that problem by changing it to the default."

| suspendingList |
Cursor reset.
waitingForAnswerProcess :=
[[SessionManager inputState loopWhile: [answer isNil]] ensure:
Expand All @@ -57,10 +58,13 @@ answer
[:proc |
"need to resume the suspended main process as main process"
SessionManager current inputState main: Processor activeProcess.
proc resume.
proc resume: suspendingList.
Processor terminateActive]]]]
fork.
waitingForAnswerProcess name: 'debugger waitingForAnswerProcess' , self identityHash printString.
debuggerProcess := Processor activeProcess.
debuggerProcess name: 'debuggerProcess' , self identityHash printString.
[suspendingList := debuggerProcess suspendingList] forkAt: Processor activePriority + 1.
Processor suspendActive.
debuggerProcess := nil.
^answer!
Expand Down
4 changes: 4 additions & 0 deletions sources/JadeiteTestResource.cls
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ isAvailable
sampleProject1Name
^'RowanSample1'!

sampleProject9Name
^'RowanSample9'!

signalInitializationError
"TestSuite>>run: in the SUnit pacakge sends this method
to the class, but implements it on the instance. That appears
Expand All @@ -320,6 +323,7 @@ signalInitializationError
current!Accessing!public! !
isAvailable!public! !
sampleProject1Name!constants!public! !
sampleProject9Name!constants!public! !
signalInitializationError!error handling!public! !
!

0 comments on commit fcbc593

Please sign in to comment.