If you evaluate the following two statements together 10 + 11 + 12 + 13 + 14 + 15 + 16+17+18+19+20+21+22+23+24+25+26+27+28+29+30+31+32+33+34+35+36+37+38+39. [:a :b :c | self halt] value: 0 value: 0 value: 0.
you are dropped into an emergency evaluator (in a non-closure image anyway). Evaluating each statement individually is no problem.
If you have fun figuring out puzzling behavior or want to prove your Squeak Skillz you might try to investigate it. If you need hints, scroll down to (*).
For the rest, a fix and explanation is on Mantis:
http://bugs.squeak.org/view.php?id=7355
- Bert -
(*) These lines
10 + 11 + 12 + 13 + 14 + 15 + 16 + 17+18+19+20+21+22+23+24+25+26+27+28+29+30+31+32+33+34+35+36+37+38+39+40. [:a :b :c | ] decompile
let you debug the issue. Full explanation below (**)
(**) The decompiler fails because the #blockCopy: argument is the 33rd literal and hence uses an extended byte code to push. This is not anticipated by the decompiler which assumes a single-byte instruction is used to push the argument. And if this explanation does not make sense to you ... you've got a lot to learn about the inner workings of Squeak ;)
I prefer a more shorter way to get puzzled:
type: 0
and then use 'debug it' from menu
:)
2009/6/25 Bert Freudenberg bert@freudenbergs.de
If you evaluate the following two statements together
10+11+12+13+14+15+16+17+18+19+20+21+22+23+24+25+26+27+28+29+30+31+32+33+34+35+36+37+38+39. [:a :b :c | self halt] value: 0 value: 0 value: 0.
you are dropped into an emergency evaluator (in a non-closure image anyway). Evaluating each statement individually is no problem.
If you have fun figuring out puzzling behavior or want to prove your Squeak Skillz you might try to investigate it. If you need hints, scroll down to (*).
For the rest, a fix and explanation is on Mantis:
http://bugs.squeak.org/view.php?id=7355
- Bert -
(*) These lines
10+11+12+13+14+15+16+17+18+19+20+21+22+23+24+25+26+27+28+29+30+31+32+33+34+35+36+37+38+39+40. [:a :b :c | ] decompile
let you debug the issue. Full explanation below (**)
(**) The decompiler fails because the #blockCopy: argument is the 33rd literal and hence uses an extended byte code to push. This is not anticipated by the decompiler which assumes a single-byte instruction is used to push the argument. And if this explanation does not make sense to you ... you've got a lot to learn about the inner workings of Squeak ;)
Am 25.06.2009 um 17:28 schrieb Igor Stasenko:
I prefer a more shorter way to get puzzled:
type: 0
and then use 'debug it' from menu
That just locks up the image. Thanks for no warning.
(though I wonder why the Mac VM recently does not allow me to break into this kind of errors)
- Bert -
2009/6/25 Bert Freudenberg bert@freudenbergs.de:
Am 25.06.2009 um 17:28 schrieb Igor Stasenko:
I prefer a more shorter way to get puzzled:
type: 0
and then use 'debug it' from menu
That just locks up the image. Thanks for no warning.
Gotcha!! :)
In fact, it was reported a few months ago, and sits on Mantis. Not sure if fix is available.
(though I wonder why the Mac VM recently does not allow me to break into this kind of errors)
- Bert -
Igor Stasenko wrote:
I prefer a more shorter way to get puzzled:
type: 0
and then use 'debug it' from menu
:)
There is an easy fix for it, just change one expression in
ParagraphEditor>>debug:receiver:in:
from this
[debugger interruptedContext method == aCompiledMethod] whileFalse: [debugger send].
to instead
[debugger interruptedContext method == aCompiledMethod or:[guineaPig isTerminated]] whileFalse: [debugger send].
The issue is that because the expression has no send the simulation runs away and causes a bunch of problems.
BTW, since this thread is about mastering Squeak, if you can explain why the runaway simulation suspends the simulator process I will personally acknowledge your mastery of Squeak. I couldn't figure out why that happens :-)
Cheers, - Andreas
Am 25.06.2009 um 18:15 schrieb Andreas Raab:
BTW, since this thread is about mastering Squeak, if you can explain why the runaway simulation suspends the simulator process I will personally acknowledge your mastery of Squeak. I couldn't figure out why that happens :-)
I know why :)
- Bert -
2009/6/25 Bert Freudenberg bert@freudenbergs.de:
Am 25.06.2009 um 18:15 schrieb Andreas Raab:
BTW, since this thread is about mastering Squeak, if you can explain why the runaway simulation suspends the simulator process I will personally acknowledge your mastery of Squeak. I couldn't figure out why that happens :-)
I know why :)
Please tell us :)
- Bert -
On 25.06.2009, at 19:19, Igor Stasenko wrote:
2009/6/25 Bert Freudenberg bert@freudenbergs.de:
Am 25.06.2009 um 18:15 schrieb Andreas Raab:
BTW, since this thread is about mastering Squeak, if you can explain why the runaway simulation suspends the simulator process I will personally acknowledge your mastery of Squeak. I couldn't figure out why that happens :-)
I know why :)
Please tell us :)
I told Andreas privately, didn't want to spoil the fun for the others. But your analysis is correct.
- Bert -
2009/6/25 Andreas Raab andreas.raab@gmx.de:
Bert Freudenberg wrote:
I know why :)
Please tell us :)
I told Andreas privately, didn't want to spoil the fun for the others. But your analysis is correct.
Indeed. Brilliant bit of analysis. You guys *are* Masters of Squeak (tm)
Can i have cake, please :))))
Cheers, - Andreas
"Igor" == Igor Stasenko siguctua@gmail.com writes:
Igor> Can i have cake, please :))))
Pssst. the cake is a lie!
</meme>
On 25.06.2009, at 20:14, Igor Stasenko wrote:
2009/6/25 Andreas Raab andreas.raab@gmx.de:
Bert Freudenberg wrote:
I know why :)
Please tell us :)
I told Andreas privately, didn't want to spoil the fun for the others. But your analysis is correct.
Indeed. Brilliant bit of analysis. You guys *are* Masters of Squeak (tm)
Can i have cake, please :))))
Sure - tasting good:
_____ _..--'''@ @'''--.._ .' @_/-//-/>/>'/ @ '. ( @ /_<//<'/----------^-) |'._ @ //|###########| |~ ''--..@|',|}}}}}}}}}}}| | ~ ~ |/ |###########| | ~~ ~ ~|./|{{{{{{{{{{{| '._ ~ ~ ~ |,/````````````` jrei ''--.~.|/
- Bert -
2009/6/25 Bert Freudenberg bert@freudenbergs.de:
On 25.06.2009, at 20:14, Igor Stasenko wrote:
2009/6/25 Andreas Raab andreas.raab@gmx.de:
Bert Freudenberg wrote:
I know why :)
Please tell us :)
I told Andreas privately, didn't want to spoil the fun for the others. But your analysis is correct.
Indeed. Brilliant bit of analysis. You guys *are* Masters of Squeak (tm)
Can i have cake, please :))))
Sure - tasting good:
_____ _..--'''@ @'''--.._ .' @_/-//-/>/>'/ @ '. ( @ /_<//<'/----------^-) |'._ @ //|###########| |~ ''--..@|',|}}}}}}}}}}}| | ~ ~ |/ |###########| | ~~ ~ ~|./|{{{{{{{{{{{| '._ ~ ~ ~ |,/````````````` jrei ''--.~.|/
Yeah!!
http://paulhutch.com/wordpress/wp-content/uploads/2007/05/demotivator1-small...
- Bert -
Impressive guys!
Especially while taking the timestamp of your emails into account :)
regards, Göran
On Thu, Jun 25, 2009 at 10:28:31PM +0300, Igor Stasenko wrote:
2009/6/25 Bert Freudenberg bert@freudenbergs.de:
On 25.06.2009, at 20:14, Igor Stasenko wrote:
2009/6/25 Andreas Raab andreas.raab@gmx.de:
Bert Freudenberg wrote:
> > I know why :) > Please tell us :)
I told Andreas privately, didn't want to spoil the fun for the others. But your analysis is correct.
Indeed. Brilliant bit of analysis. You guys *are* Masters of Squeak (tm)
Can i have cake, please :))))
Sure - tasting good:
?? ?? ?? ?? ?? ?? ?? ?? ??_____ ?? ?? ?? ?? ?? _..--'''@ ?? @'''--.._ ?? ?? ?? ?? .' ?? @_/-//-/>/>'/ @ ??'. ?? ?? ?? ??( ??@ ??/_<//<'/----------^-) ?? ?? ?? ??|'._ ??@ ?? ?? //|###########| ?? ?? ?? ??|~ ??''--..@|',|}}}}}}}}}}}| ?? ?? ?? ??| ??~ ?? ~ ?? |/ |###########| ?? ?? ?? ??| ~~ ??~ ?? ~|./|{{{{{{{{{{{| ?? ?? ?? ?? '._ ~ ~ ~ |,/````````````` ?? ?? ??jrei ??''--.~.|/
Yeah!!
http://paulhutch.com/wordpress/wp-content/uploads/2007/05/demotivator1-small...
Or for the "you are here" t-shirt: http://store.funnytimes.com/merchant2/merchant.mvc?Screen=PROD&Store_Cod...
Dave
2009/6/25 Igor Stasenko siguctua@gmail.com:
Can i have cake, please :))))
Ah! You're definitively Russian. They eat cake for every other occasion. Way too much sugar for me. =)
Regards, Ian
On 25.06.2009, at 22:12, Ian Trudel wrote:
2009/6/25 Igor Stasenko siguctua@gmail.com:
Can i have cake, please :))))
Ah! You're definitively Russian. They eat cake for every other occasion. Way too much sugar for me. =)
Speaking of Sugar, have you seen the Sugar Labs press release?
http://news.google.com/news?q=SugarLabs
Some news outlets even mention Etoys ...
- Bert -
2009/6/25 Ian Trudel ian.trudel@gmail.com:
2009/6/25 Igor Stasenko siguctua@gmail.com:
Can i have cake, please :))))
Ah! You're definitively Russian. They eat cake for every other occasion. Way too much sugar for me. =)
Haha.. wrong! We not eating them on occasion :)
The cake is mentioned in humorous/irony context, when 2 persons speaking:
1st: i am cool, isn't ?!?! 2nd: yeah, take a cake from shelf
there's another variant of same joke:
1st: i am cool, isn't ?!?! 2nd: yeah, buy a medal for yourself
P.S. i'm Ukrainian, but yes, i speak Russian as well.
Regards, Ian
2009/6/25 Igor Stasenko siguctua@gmail.com:
2009/6/25 Ian Trudel ian.trudel@gmail.com:
2009/6/25 Igor Stasenko siguctua@gmail.com:
Can i have cake, please :))))
Ah! You're definitively Russian. They eat cake for every other occasion. Way too much sugar for me. =)
Haha.. wrong! We not eating them on occasion :)
Actually, I have been living and working in Russia for a while in the past. They would eat cakes on any occasion. Someone has a baby? Let's have a cake! Someone gets back from vacations, let's have cakes! Someone is leaving the company? He pays cakes to everybody! It's Cakeland! =)
The cake is mentioned in humorous/irony context, when 2 persons speaking:
1st: i am cool, isn't ?!?! 2nd: yeah, buy a medal for yourself
We would say that one in Canada. =)
P.S. i'm Ukrainian, but yes, i speak Russian as well.
Поздравляю! В каком городе ты живёшь? Это сюрприз узнать, что есть люди в Украине, которые создают программы на языке программирования Smalltalk. Тебе нужно Smalltalk на работе или что? Мне кажется, ты хорошо знаешь Squeak уже. =)
-- Best regards, Igor Stasenko AKA sig.
All the same, best regards, Ian
2009/6/26 Ian Trudel ian.trudel@gmail.com
2009/6/25 Igor Stasenko siguctua@gmail.com:
2009/6/25 Ian Trudel ian.trudel@gmail.com:
2009/6/25 Igor Stasenko siguctua@gmail.com:
Can i have cake, please :))))
Ah! You're definitively Russian. They eat cake for every other occasion. Way too much sugar for me. =)
Haha.. wrong! We not eating them on occasion :)
Actually, I have been living and working in Russia for a while in the past. They would eat cakes on any occasion. Someone has a baby? Let's have a cake! Someone gets back from vacations, let's have cakes! Someone is leaving the company? He pays cakes to everybody! It's Cakeland! =)
Okay, let it be the Cakeland, if you like.
The cake is mentioned in humorous/irony context, when 2 persons speaking:
1st: i am cool, isn't ?!?! 2nd: yeah, buy a medal for yourself
We would say that one in Canada. =)
P.S. i'm Ukrainian, but yes, i speak Russian as well.
Поздравляю! В каком городе ты живёшь? Это сюрприз узнать, что есть люди в Украине, которые создают программы на языке программирования Smalltalk. Тебе нужно Smalltalk на работе или что? Мне кажется, ты хорошо знаешь Squeak уже. =)
Живу я в Киеве. Есть люди, но очень мало.. хотя мож гдето спрятались.. :) Smalltalk это прежде всего мое хобби. Ну и конечно работаю на нем, если есть возможность. Да, знаю достаточно, так как обитаю здесь уже 3й год. Пиши в листе пожалуйста на английском, а то у тебя русский текст, а идиомы английские. Да и потом - тут не только мы :)
-- Best regards, Igor Stasenko AKA sig.
All the same, best regards, Ian
How I wish I could understand you two. However, it‘s nice to read some cyrillic letters again :) -Tobias Am 2009-06-26 um 03:15 schrieb Igor Stasenko:
Поздравляю! В каком городе ты живёшь? Это сюрприз узнать, что есть люди в Украине, которые создают программы на языке программирования Smalltalk. Тебе нужно Smalltalk на работе или что? Мне кажется, ты хорошо знаешь Squeak уже. =)
Живу я в Киеве. Есть люди, но очень мало.. хотя мож гдето спрятались.. :) Smalltalk это прежде всего мое хобби. Ну и конечно работаю на нем, если есть возможность. Да, знаю достаточно, так как обитаю здесь уже 3й год. Пиши в листе пожалуйста на английском, а то у тебя русский текст, а идиомы английские. Да и потом - тут не только мы :)
2009/6/26 Tobias Pape Das.Linux@gmx.de:
How I wish I could understand you two. However, it‘s nice to read some cyrillic letters again :) -Tobias
I was just a little bit surprised to see an Ukrainian into Smalltalk programming. Not necessarily the most popular programming language in Russia and Ukraine.
Igor, by the way, is there great resources in Russian specifically about Squeak? That would be kicker for some acquaintances of mine.
Ian.
For me smalltalk is hobby too, but i believe in brilliant future :) it;s really cool to read russian in this list, but in IT communities and the Internet as well no countries, until we start to search a job or plan a meeting.
2009/6/26, Ian Trudel ian.trudel@gmail.com:
2009/6/26 Tobias Pape Das.Linux@gmx.de:
How I wish I could understand you two. However, it‘s nice to read some cyrillic letters again :) -Tobias
I was just a little bit surprised to see an Ukrainian into Smalltalk programming. Not necessarily the most popular programming language in Russia and Ukraine.
Igor, by the way, is there great resources in Russian specifically about Squeak? That would be kicker for some acquaintances of mine.
Ian.
2009/6/26 Ian Trudel ian.trudel@gmail.com:
2009/6/26 Tobias Pape Das.Linux@gmx.de:
How I wish I could understand you two. However, it‘s nice to read some cyrillic letters again :) -Tobias
I was just a little bit surprised to see an Ukrainian into Smalltalk programming. Not necessarily the most popular programming language in Russia and Ukraine.
Igor, by the way, is there great resources in Russian specifically about Squeak? That would be kicker for some acquaintances of mine.
Well, i don't know much. There is a site: smalltalk.ru The guys running it doing a great job tracking the smalltalk news.
For instance you can see [Squeak] Squeak for iPhone if you scroll down the page :)
Ian.
On 26.06.2009, at 07:42, Tobias Pape wrote:
How I wish I could understand you two. However, it‘s nice to read some cyrillic letters again :) -Tobias
Hehe, the amazing thing is I can still read it and get the gist, even after 20 years of virtually no practice ...
- Bert -
Am 2009-06-26 um 03:15 schrieb Igor Stasenko:
Поздравляю! В каком городе ты живёшь? Это сюрприз узнать, что есть люди в Украине, которые создают программы на языке программирования Smalltalk. Тебе нужно Smalltalk на работе или что? Мне кажется, ты хорошо знаешь Squeak уже. =)
Живу я в Киеве. Есть люди, но очень мало.. хотя мож гдето спрятались.. :) Smalltalk это прежде всего мое хобби. Ну и конечно работаю на нем, если есть возможность. Да, знаю достаточно, так как обитаю здесь уже 3й год. Пиши в листе пожалуйста на английском, а то у тебя русский текст, а идиомы английские. Да и потом - тут не только мы :)
Actually, now I understood the first part. Must have been the early time of day.
Am 2009-06-26 um 13:36 schrieb Bert Freudenberg:
On 26.06.2009, at 07:42, Tobias Pape wrote:
How I wish I could understand you two. However, it‘s nice to read some cyrillic letters again :) -Tobias
Hehe, the amazing thing is I can still read it and get the gist, even after 20 years of virtually no practice ...
Hehe, actually, I voluteered learning Russian in 9th grade… hope there is a chance to get on it again, some time.
So Long, -Tobias
2009/6/25 Andreas Raab andreas.raab@gmx.de:
Igor Stasenko wrote:
I prefer a more shorter way to get puzzled:
type: 0
and then use 'debug it' from menu
:)
There is an easy fix for it, just change one expression in
ParagraphEditor>>debug:receiver:in:
from this
[debugger interruptedContext method == aCompiledMethod] whileFalse: [debugger send].
to instead
[debugger interruptedContext method == aCompiledMethod or:[guineaPig isTerminated]] whileFalse: [debugger send].
The issue is that because the expression has no send the simulation runs away and causes a bunch of problems.
BTW, since this thread is about mastering Squeak, if you can explain why the runaway simulation suspends the simulator process I will personally acknowledge your mastery of Squeak. I couldn't figure out why that happens :-)
1. The compiled method '0' looks like following: all bytecodes: Quick return 0 header: 261 "primitive: 261 numArgs: 0 numTemps: 0 numLiterals: 0 frameSize: 16 isClosureCompiled: false"
2. stepToSendOrReturn doesn't treat this as return:
stepToSendOrReturn "Simulate the execution of bytecodes until either sending a message or returning a value to the receiver (that is, until switching contexts)."
| ctxt | [self willReallySend | self willReturn | self willStore] whileFalse: [ ctxt _ self step. ctxt == self ifFalse: [self halt. "Caused by mustBeBoolean handling" ^ctxt]] neither 'willStore' nor 'willReallySend' nor 'willReturn' checks that method contains no bytecode, but an primitive which does quick return of literal value. I think a #willReturn need to be modified to check against this primitive number. Another way - is to force compiler to not optimize the 'doit' method. Unfortunately squeak's compiler having no option to turn off all optimizations.
3. because of 2. the process continue simulation and returns to a #newProcess: method newProcess "Answer a Process running the code in the receiver. The process is not scheduled." <primitive: 19> "Simulation guard" ^Process forContext: [self value. Processor terminateActive] priority: Processor activePriority
where "Processor terminateActive" effectively kills/suspends the debugger process, because active process is not the simulated process, as this method thinking :)
This could be fixed like following:
newProcess "Answer a Process running the code in the receiver. The process is not scheduled." <primitive: 19> "Simulation guard" | process | ^process := Process forContext: [self value. process terminate] priority: Processor activePriority
--- It seems works at first try, not sure about side effects. I'm letting you to explore :) On debug '0' its now spawns another error: subscript out of bounds. But its not hangs anymore.
Cheers, - Andreas
2009/6/25 Igor Stasenko siguctua@gmail.com:
2009/6/25 Andreas Raab andreas.raab@gmx.de:
Igor Stasenko wrote:
I prefer a more shorter way to get puzzled:
type: 0
and then use 'debug it' from menu
:)
There is an easy fix for it, just change one expression in
ParagraphEditor>>debug:receiver:in:
from this
[debugger interruptedContext method == aCompiledMethod] whileFalse: [debugger send].
to instead
[debugger interruptedContext method == aCompiledMethod or:[guineaPig isTerminated]] whileFalse: [debugger send].
The issue is that because the expression has no send the simulation runs away and causes a bunch of problems.
BTW, since this thread is about mastering Squeak, if you can explain why the runaway simulation suspends the simulator process I will personally acknowledge your mastery of Squeak. I couldn't figure out why that happens :-)
- The compiled method '0' looks like following:
all bytecodes: Quick return 0 header: 261 "primitive: 261 numArgs: 0 numTemps: 0 numLiterals: 0 frameSize: 16 isClosureCompiled: false"
- stepToSendOrReturn doesn't treat this as return:
stepToSendOrReturn "Simulate the execution of bytecodes until either sending a message or returning a value to the receiver (that is, until switching contexts)."
| ctxt | [self willReallySend | self willReturn | self willStore] whileFalse: [ ctxt _ self step. ctxt == self ifFalse: [self halt. "Caused by mustBeBoolean handling" ^ctxt]] neither 'willStore' nor 'willReallySend' nor 'willReturn' checks that method contains no bytecode, but an primitive which does quick return of literal value. I think a #willReturn need to be modified to check against this primitive number. Another way - is to force compiler to not optimize the 'doit' method. Unfortunately squeak's compiler having no option to turn off all optimizations.
- because of 2. the process continue simulation and returns to a
#newProcess: method
ah, forgot to add:
and because debugger waits a method's context to be activated:
[debugger interruptedContext method == aCompiledMethod] whileFalse: [debugger send].
but its never is, because its having no chance to iterrupt inside that method - '0' . That's why its going to 'Processor terminateActive' without any clues that something went wrong.
newProcess "Answer a Process running the code in the receiver. The process is not scheduled." <primitive: 19> "Simulation guard" ^Process forContext: [self value. Processor terminateActive] priority: Processor activePriority
where "Processor terminateActive" effectively kills/suspends the debugger process, because active process is not the simulated process, as this method thinking :)
This could be fixed like following:
newProcess "Answer a Process running the code in the receiver. The process is not scheduled." <primitive: 19> "Simulation guard" | process | ^process := Process forContext: [self value. process terminate] priority: Processor activePriority
It seems works at first try, not sure about side effects. I'm letting you to explore :) On debug '0' its now spawns another error: subscript out of bounds. But its not hangs anymore.
Cheers, - Andreas
-- Best regards, Igor Stasenko AKA sig.
Btw, this inability to interrupt in all such methods is the reason of another annoying and confusing debugger behavior:
try debug:
1 isNumber
and when debugger opens, press 'into'. Debugger not shows the method, but instead immediately shows as if method already returns. Now you have to spend time figuring out, what its returned, even if there is constant - sometimes you need to know exact value. But because of this , you can't. All you can do is modify method which sends this message to see returned result, like:
| temp |
temp := 1 isNumber.
and then check it in temps.
Besides another issues, it would be good if debugger would display a stack top somewhere (so we can always see a value(s) returned from method(s) or primitives or whatever).
2009/6/25 Igor Stasenko siguctua@gmail.com:
2009/6/25 Igor Stasenko siguctua@gmail.com:
2009/6/25 Andreas Raab andreas.raab@gmx.de:
Igor Stasenko wrote:
I prefer a more shorter way to get puzzled:
type: 0
and then use 'debug it' from menu
:)
There is an easy fix for it, just change one expression in
ParagraphEditor>>debug:receiver:in:
from this
[debugger interruptedContext method == aCompiledMethod] whileFalse: [debugger send].
to instead
[debugger interruptedContext method == aCompiledMethod or:[guineaPig isTerminated]] whileFalse: [debugger send].
The issue is that because the expression has no send the simulation runs away and causes a bunch of problems.
BTW, since this thread is about mastering Squeak, if you can explain why the runaway simulation suspends the simulator process I will personally acknowledge your mastery of Squeak. I couldn't figure out why that happens :-)
- The compiled method '0' looks like following:
all bytecodes: Quick return 0 header: 261 "primitive: 261 numArgs: 0 numTemps: 0 numLiterals: 0 frameSize: 16 isClosureCompiled: false"
- stepToSendOrReturn doesn't treat this as return:
stepToSendOrReturn "Simulate the execution of bytecodes until either sending a message or returning a value to the receiver (that is, until switching contexts)."
| ctxt | [self willReallySend | self willReturn | self willStore] whileFalse: [ ctxt _ self step. ctxt == self ifFalse: [self halt. "Caused by mustBeBoolean handling" ^ctxt]] neither 'willStore' nor 'willReallySend' nor 'willReturn' checks that method contains no bytecode, but an primitive which does quick return of literal value. I think a #willReturn need to be modified to check against this primitive number. Another way - is to force compiler to not optimize the 'doit' method. Unfortunately squeak's compiler having no option to turn off all optimizations.
- because of 2. the process continue simulation and returns to a
#newProcess: method
ah, forgot to add:
and because debugger waits a method's context to be activated:
[debugger interruptedContext method == aCompiledMethod] whileFalse: [debugger send].
but its never is, because its having no chance to iterrupt inside that method - '0' . That's why its going to 'Processor terminateActive' without any clues that something went wrong.
newProcess "Answer a Process running the code in the receiver. The process is not scheduled." <primitive: 19> "Simulation guard" ^Process forContext: [self value. Processor terminateActive] priority: Processor activePriority
where "Processor terminateActive" effectively kills/suspends the debugger process, because active process is not the simulated process, as this method thinking :)
This could be fixed like following:
newProcess "Answer a Process running the code in the receiver. The process is not scheduled." <primitive: 19> "Simulation guard" | process | ^process := Process forContext: [self value. process terminate] priority: Processor activePriority
It seems works at first try, not sure about side effects. I'm letting you to explore :) On debug '0' its now spawns another error: subscript out of bounds. But its not hangs anymore.
Cheers, - Andreas
-- Best regards, Igor Stasenko AKA sig.
-- Best regards, Igor Stasenko AKA sig.
squeak-dev@lists.squeakfoundation.org