[self-interest] Funny thing when removing globals* slot from the lobby
mail at russell-allen.com
Fri Aug 14 02:18:08 UTC 2009
I'm intrigued - do you have a goal or are you just trying to see how
far you can bend Self before it breaks? :)
I tried it myself and the VM didn't crash per se but the gui froze and
I got a stack overflow:
*** Stack Overflow!!
( | self* = <0>. :sel = 'reflect:'. :rec = <0>. :msgType =
'implicitSelf'. :del = nil. :mh = nil. :args = <1>. |
forwardSend: 'undefined' Selector: sel Receiver: rec
Delegatee: del MethodHolder: mh Arguments: args
IfSucceed: [|:res| ^res ].
(((((processErrors undefinedSelector copy
#1 (<error>:1): reflect: = ( | self* = <0>. :arg1 = <0>. delegatee =
nil. selector = 'reflect:'. |
"undefined selector error;
this method was automatically generated by the VM."
: = ( | self* = <0>. :prefix = 'undefined'. :sel = 'reflect:'. :rec =
<0>. :msgType = 'implicitSelf'. :del = nil. :mh = nil. :args =
<2>. :blk = <3>. postfix =
'Selector:Type:Delegatee:MethodHolder:Arguments:'. selector <-
'undefinedSelector:Type:Delegatee:MethodHolder:Arguments:' "''". |
selector: (prefix, postfix) canonicalize.
((reflect: rec) lookupKey: selector) isEmpty ifFalse: [
| performDecl = (|
canFail = false.
acceptSelector: s = (
"This is for the type inferencer."
rec _Perform: selector
With: sel With: msgType With: del With: mh
Are you on Mac or Linux? If you are on Mac, for this sort of stuff
you should start Self from the command line so you can continue if the
GUI breaks. Open Terminal.app and do "Self -s path/to/Snapshot.snap"
Also read the manuals on the site for hints on command line debugging.
What you are doing may be hard to do in an interactive way because
removing slots etc isn't necessarily an atomic operation -- the system
is copying the lobby to a new lobby (without globals*) and doing the
equivalent of a Smalltalk #become: . -- so if I were doing this I
would maybe try making the changes to the Self files and rebuilding
On 13/08/2009, at 11:02 PM, Niko Schwarz wrote:
> Hi, so I did this. I added two slots to the lobby:
> alternaLobby <- clone
> undefinedSelector: sel Type: t Delegatee: d MethodHolder: h Arguments:
> a = ( sel sendTo: alternaLobby WithArguments: a)
> Then, I wanted to remove all other slots from the lobby. Removing
> traits works fine, but removing globals or defaultBehaviour crashes
> the VM. How do I find out why it crashed?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Self-interest