Here's an example of where `ensure:` doesn't quite do what it says on the tin:
[ [Processor activeProcess terminate] ensure: [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] ] fork
Expected output:
outer1 (debugger appears; click 'abandon') inner
(or possibly:
outer1 (debugger appears; click 'abandon') inner outer2
which is what you get if you change "Processor activeProcess terminate" to "1 + 2" above... but this also seems odd.)
Actual output:
outer1 (no debugger appears, nothing more happens)
Are my expectations out-of-line, or is there a problem worth investigating here?
"--"
I think it's worth noting that a related program:
[ [Processor activeProcess terminate] ensure: [ [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [ Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] on: Error do: [:ex | Transcript cr; show: ex] ] ] fork
yields the reasonable output
outer1 Error: aiee inner
Cheers, Tony
Also of note: using `self halt` to debug `ensure:` blocks is made difficult by this! (Because the process just... disappears!)
On 11/4/21 09:59, Tony Garnock-Jones wrote:
Here's an example of where `ensure:` doesn't quite do what it says on the tin:
[ [Processor activeProcess terminate] ensure: [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] ] fork
Expected output:
outer1 (debugger appears; click 'abandon') inner
(or possibly:
outer1 (debugger appears; click 'abandon') inner outer2
which is what you get if you change "Processor activeProcess terminate" to "1 + 2" above... but this also seems odd.)
Actual output:
outer1 (no debugger appears, nothing more happens)
Are my expectations out-of-line, or is there a problem worth investigating here?
"--"
I think it's worth noting that a related program:
[ [Processor activeProcess terminate] ensure: [ [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [ Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] on: Error do: [:ex | Transcript cr; show: ex] ] ] fork
yields the reasonable output
outer1 Error: aiee inner
Cheers, Tony
Hi Tony --
Seems to work now. Except that you will also get MNU #stepToCallee after abandon.
Best, Marcel Am 04.11.2021 10:56:48 schrieb Tony Garnock-Jones tonyg@leastfixedpoint.com: Also of note: using `self halt` to debug `ensure:` blocks is made difficult by this! (Because the process just... disappears!)
On 11/4/21 09:59, Tony Garnock-Jones wrote:
Here's an example of where `ensure:` doesn't quite do what it says on the tin:
[ [Processor activeProcess terminate] ensure: [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] ] fork
Expected output:
outer1 (debugger appears; click 'abandon') inner
(or possibly:
outer1 (debugger appears; click 'abandon') inner outer2
which is what you get if you change "Processor activeProcess terminate" to "1 + 2" above... but this also seems odd.)
Actual output:
outer1 (no debugger appears, nothing more happens)
Are my expectations out-of-line, or is there a problem worth investigating here?
"--"
I think it's worth noting that a related program:
[ [Processor activeProcess terminate] ensure: [ [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [ Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] on: Error do: [:ex | Transcript cr; show: ex] ] ] fork
yields the reasonable output
outer1 Error: aiee inner
Cheers, Tony
Hi,
That example nicely demonstrates the semantics difference between Abandon and Terminate in Debugger :)
Expected output:
outer1 (debugger appears; click 'abandon') inner
or:
outer1 (debugger appears; click 'terminate') inner outer2
best, Jaromir
From: Marcel Taeumelmailto:marcel.taeumel@hpi.de Sent: Thursday, July 7, 2022 18:09 To: squeak-devmailto:squeak-dev@lists.squeakfoundation.org Subject: Re: [squeak-dev] `ensure:` ... doesn't (in some circumstances involving nesting `ensure:` blocks in `ensure:` handlers).
Hi Tony --
Seems to work now. Except that you will also get MNU #stepToCallee after abandon.
Best, Marcel
Am 04.11.2021 10:56:48 schrieb Tony Garnock-Jones tonyg@leastfixedpoint.com: Also of note: using `self halt` to debug `ensure:` blocks is made difficult by this! (Because the process just... disappears!)
On 11/4/21 09:59, Tony Garnock-Jones wrote:
Here's an example of where `ensure:` doesn't quite do what it says on the tin:
[ [Processor activeProcess terminate] ensure: [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] ] fork
Expected output:
outer1 (debugger appears; click 'abandon') inner
(or possibly:
outer1 (debugger appears; click 'abandon') inner outer2
which is what you get if you change "Processor activeProcess terminate" to "1 + 2" above... but this also seems odd.)
Actual output:
outer1 (no debugger appears, nothing more happens)
Are my expectations out-of-line, or is there a problem worth investigating here?
"--"
I think it's worth noting that a related program:
[ [Processor activeProcess terminate] ensure: [ [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [ Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] on: Error do: [:ex | Transcript cr; show: ex] ] ] fork
yields the reasonable output
outer1 Error: aiee inner
Cheers, Tony
Hi Tony,
earlier this year I reworked #terminate fixing multiple bugs - try merging Kernel-jar.1414 from the Inbox into your image and your example should behave as expected :)
I've been waiting for some reviews and hopefully integrating the above final version into the Trunk. We have some unfinished discussions with Christoph but they are more or less on top of the proposed Kernel-jar.1414.
Thanks for posting this interesting example! best,
^[^ Jaromir ---
Sent from Squeak Inbox Talk
On 2021-11-04T09:59:05+01:00, tonyg@leastfixedpoint.com wrote:
Here's an example of where `ensure:` doesn't quite do what it says on the tin:
[ [Processor activeProcess terminate] ensure: [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] ] fork
Expected output:
outer1 (debugger appears; click 'abandon') inner
(or possibly:
outer1 (debugger appears; click 'abandon') inner outer2
which is what you get if you change "Processor activeProcess terminate" to "1 + 2" above... but this also seems odd.)
Actual output:
outer1 (no debugger appears, nothing more happens)
Are my expectations out-of-line, or is there a problem worth investigating here?
"--"
I think it's worth noting that a related program:
[ [Processor activeProcess terminate] ensure: [ [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [ Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] on: Error do: [:ex | Transcript cr; show: ex] ] ] fork
yields the reasonable output
outer1 Error: aiee inner
Cheers, Tony
Hi Jaromir,
I've been waiting for some reviews and hopefully integrating the above final version into the Trunk. We have some unfinished discussions with Christoph but they are more or less on top of the proposed Kernel-jar.1414.
No pressure and all, but for me it looked like as if it was your turn to reply to my (probably way too long) critique. See the threads "Solving multiple termination bugs - summary & proposal", "The semantics of halfway-executed unwind contexts during process termination", "Tackling Context>>#runUntilErrorReturnFrom: (was: BUG/REGRESSION while debugging Generator >> #nextPut:)", and "The Inbox: Kernel-ct.1405.mcz" for the details. :-)
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2021-11-04T11:25:34+01:00, m@jaromir.net wrote:
Hi Tony,
earlier this year I reworked #terminate fixing multiple bugs - try merging Kernel-jar.1414 from the Inbox into your image and your example should behave as expected :)
I've been waiting for some reviews and hopefully integrating the above final version into the Trunk. We have some unfinished discussions with Christoph but they are more or less on top of the proposed Kernel-jar.1414.
Thanks for posting this interesting example! best,
^[^ Jaromir
Sent from Squeak Inbox Talk
On 2021-11-04T09:59:05+01:00, tonyg at leastfixedpoint.com wrote:
Here's an example of where `ensure:` doesn't quite do what it says on the tin:
[ [Processor activeProcess terminate] ensure: [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] ] fork
Expected output:
outer1 (debugger appears; click 'abandon') inner
(or possibly:
outer1 (debugger appears; click 'abandon') inner outer2
which is what you get if you change "Processor activeProcess terminate" to "1 + 2" above... but this also seems odd.)
Actual output:
outer1 (no debugger appears, nothing more happens)
Are my expectations out-of-line, or is there a problem worth investigating here?
"--"
I think it's worth noting that a related program:
[ [Processor activeProcess terminate] ensure: [ [ Transcript cr; show: 'outer1'. [nil error: 'aiee'] ensure: [ Transcript cr; show: 'inner']. Transcript cr; show: 'outer2'. ] on: Error do: [:ex | Transcript cr; show: ex] ] ] fork
yields the reasonable output
outer1 Error: aiee inner
Cheers, Tony
Hi Christoph, I very much look forward to responding to your valuable critique and suggestions (I keep flagged them all) - next week I will reserve some time to dive into the depth of process temination :D
Btw. your reply to "The Inbox: Kernel-jar.1414.mcz" discussion completely missed my inbox and I only discovered your response to it here at the Inbox Talk yesterday - Thanks!!!
Later!
^[^ Jaromir ---
Sent from Squeak Inbox Talk
On 2021-11-05T20:10:24+01:00, christoph.thiede@student.hpi.uni-potsdam.de wrote:
Hi Jaromir,
I've been waiting for some reviews and hopefully integrating the above final version into the Trunk. We have some unfinished discussions with Christoph but they are more or less on top of the proposed Kernel-jar.1414.
No pressure and all, but for me it looked like as if it was your turn to reply to my (probably way too long) critique. See the threads "Solving multiple termination bugs - summary & proposal", "The semantics of halfway-executed unwind contexts during process termination", "Tackling Context>>#runUntilErrorReturnFrom: (was: BUG/REGRESSION while debugging Generator >> #nextPut:)", and "The Inbox: Kernel-ct.1405.mcz" for the details. :-)
Best, Christoph
Sent from Squeak Inbox Talk
On 2021-11-04T11:25:34+01:00, m at jaromir.net wrote:
Hi Tony,
earlier this year I reworked #terminate fixing multiple bugs - try merging Kernel-jar.1414 from the Inbox into your image and your example should behave as expected :)
I've been waiting for some reviews and hopefully integrating the above final version into the Trunk. We have some unfinished discussions with Christoph but they are more or less on top of the proposed Kernel-jar.1414.
Thanks for posting this interesting example! best,
^[^ Jaromir
Sent from Squeak Inbox Talk
On 2021-11-04T09:59:05+01:00, tonyg at leastfixedpoint.com wrote:
Here's an example of where `ensure:` doesn't quite do what it says on the tin:
����[ ���� [Processor activeProcess terminate] ensure: [ ���� Transcript cr; show: 'outer1'. ���� [nil error: 'aiee'] ensure: [Transcript cr; show: 'inner']. ���� Transcript cr; show: 'outer2'. ���� ] ����] fork
Expected output:
����outer1 ����(debugger appears; click 'abandon') ����inner
(or possibly:
����outer1 ����(debugger appears; click 'abandon') ����inner ����outer2
which is what you get if you change "Processor activeProcess terminate" to "1 + 2" above... but this also seems odd.)
Actual output:
����outer1 ����(no debugger appears, nothing more happens)
Are my expectations out-of-line, or is there a problem worth investigating here?
"--"
I think it's worth noting that a related program:
����[ ���� [Processor activeProcess terminate] ensure: [ ���� [ ���� Transcript cr; show: 'outer1'. ���� [nil error: 'aiee'] ensure: [ ���� Transcript cr; show: 'inner']. ���� Transcript cr; show: 'outer2'. ���� ] on: Error do: [:ex | Transcript cr; show: ex] ���� ] ����] fork
yields the reasonable output
����outer1 ����Error: aiee ����inner
Cheers, Tony
squeak-dev@lists.squeakfoundation.org