Closed isCzech closed 1 year ago
That's funny. I have not yet studied your latest implementation of Context>>#unwindTo:safely:
, but somehow its coroutine logic (#runUntilReturnFrom:
) seems to bite with the coroutines from my #terminateAggressively
(#runUntilErrorOrReturFrom:
) ... The ensure guard of the former is intercepting the unwind control flow of the latter. Not yet sure whom to blame for this ...
Fix by Kernel-jar.1500 The root cause is #runUntilErrorOrReturnFrom: won't check for topContext == nil when doing topContext stepToCallee and #terminateAggressively won't check for suspendedContext == nil when doing suspendedContext privRefresh This happens because #terminateAggressively attempts to complete the whole stack including the bottom context.
The following example raises an error when you try to abandon or close the debugger:
If you run this in the Workspace:
p := [ [Semaphore new wait] ensure: [1/0] ] fork
And then terminate by hand in the Workspace:[p terminate] fork
The ZeroDivide pops up as expected.Now when you press Abandon (or just close the window) an MNU: doesNotUnderstand stepToCallee pops up.
If you repeat the example but instead of pressing Abandon you choose 'terminate process' from the debugger's window menu (the triangle in a blue circle), the window gets closed correctly, no error raised.
The issue is related to #terminateAggressively which takes care of Abandoning or closing the debugger.![image](https://user-images.githubusercontent.com/73360313/172835567-e83f3f9c-8cb1-4141-b306-b76036812739.png)