Why this hangs the VM?
Behavior basicNew basicNew. Class basicNew basicNew. No .log is generated Applies to Pharo4 #40460 and Pharo 3.0 (Windows 8.1) Cheers, Hernán
On 25 Jan 2015, at 01:16, Hernán Morales Durand <hernan.morales@gmail.com> wrote:
Behavior basicNew basicNew. Class basicNew basicNew.
No .log is generated Applies to Pharo4 #40460 and Pharo 3.0 (Windows 8.1)
here it does not crash, but: Behavior basicNew basicNew class ===> LargeNegativeInteger We do have a test for âBehavior new newâ: testBehaviornewnewShouldNotCrash and this works fine. Marcus
On Sun, Jan 25, 2015 at 8:16 AM, Hernán Morales Durand < hernan.morales@gmail.com> wrote:
Behavior basicNew basicNew.
I guess philosophically, #basicNew creates an incomplete object, so sending it messages is in the hands of the gods. Now the following works okay... Behavior new basicNew So something in its #initialize makes it not crash. Rolling out Behanior>>initialize and commenting out a line at a time to get the minimum statements to prevent crashing results in the following... behavior := Behavior basicNew. "behavior superclass: Object." "behavior methodDict: behavior emptyMethodDictionary." behavior setFormat: Object format. "behavior traitComposition: nil." "behavior users: IdentitySet new." behavior basicNew. So the VM will crash if you fail to #setFormat. That is as far as mu understanding goes. cheers -ben
Class basicNew basicNew.
No .log is generated Applies to Pharo4 #40460 and Pharo 3.0 (Windows 8.1)
Cheers,
Hernán
Yes, apparently one has to debug the primitive to get what's really happening. Thanks Ben, Hernán 2015-01-25 13:08 GMT-03:00 Ben Coman <btc@openinworld.com>:
On Sun, Jan 25, 2015 at 8:16 AM, Hernán Morales Durand < hernan.morales@gmail.com> wrote:
Behavior basicNew basicNew.
I guess philosophically, #basicNew creates an incomplete object, so sending it messages is in the hands of the gods. Now the following works okay... Behavior new basicNew
So something in its #initialize makes it not crash. Rolling out Behanior>>initialize and commenting out a line at a time to get the minimum statements to prevent crashing results in the following...
behavior := Behavior basicNew.
"behavior superclass: Object." "behavior methodDict: behavior emptyMethodDictionary."
behavior setFormat: Object format.
"behavior traitComposition: nil." "behavior users: IdentitySet new."
behavior basicNew.
So the VM will crash if you fail to #setFormat. That is as far as mu understanding goes. cheers -ben
Class basicNew basicNew.
No .log is generated Applies to Pharo4 #40460 and Pharo 3.0 (Windows 8.1)
Cheers,
Hernán
Thank you! Hernán 2015-01-26 15:30 GMT-03:00 Eliot Miranda <eliot.miranda@gmail.com>:
On Sat, Jan 24, 2015 at 4:16 PM, Hernán Morales Durand < hernan.morales@gmail.com> wrote:
Behavior basicNew basicNew. Class basicNew basicNew.
Fixed in the Spur VM.
No .log is generated Applies to Pharo4 #40460 and Pharo 3.0 (Windows 8.1)
Cheers,
Hernán
-- best, Eliot
If one can create a behavior that doesn't inherit anything (superclass nil) and doesn't have a method dictionary then there will be an infinite recursion in the class faulting code (the code that uses image segments to external use methods). Every attempt to interact with the nil behaviour results in more of the same. Eliot (phone) On Jan 27, 2015, at 2:13 AM, Craig Latta <craig@netjam.org> wrote:
Fixed in the Spur VM.
What was the problem? (I have no time to look at it.)
thanks,
-C
-- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS)
participants (5)
-
Ben Coman -
Craig Latta -
Eliot Miranda -
Hernán Morales Durand -
Marcus Denker