[self-interest] Funny thing when removing globals* slot from the lobby

Russell Allen mail at russell-allen.com
Fri Aug 14 02:18:08 UTC 2009


Hi Niko,

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!!
#0 (/Users/russellallen/self/release/../objects/core/ 
errorHandling.self:316):  
undefinedSelector:Receiver:Type:Delegatee:MethodHolder:Arguments: =  
( | self* = <0>. :sel = 'reflect:'. :rec = <0>. :msgType =  
'implicitSelf'. :del = nil. :mh = nil. :args = <1>. |
             forwardSend: 'undefined' Selector: sel Receiver: rec  
Type: msgType
               Delegatee: del MethodHolder: mh Arguments: args
               IfSucceed: [|:res| ^res ].
             suspendAndTrace:
                 (((((processErrors undefinedSelector copy
                     receiver:     rec)
                     selector:     sel)
                     type:         msgType)
                     delegatee:    del)
                     methodHolder: mh)
                     arguments:    args.
             errorContinueValue )


#1 (<error>:1): reflect: = ( | self* = <0>. :arg1 = <0>. delegatee =  
nil. selector = 'reflect:'. |
"undefined selector error;
this method was automatically generated by the VM."
  )


#2 (/Users/russellallen/self/release/../objects/core/ 
errorHandling.self:238):  
forwardSend:Selector:Receiver:Type:Delegatee:MethodHolder:Arguments:IfSucceed 
: = ( | 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."
                          
'Selector:Type:Delegatee:MethodHolder:Arguments:'
                         isSuffixOf: s.
                       ).
                   |). |
                 blk value:
                     rec _Perform: selector
                         With: sel With: msgType With: del With: mh  
With: args
             ] )

etc... etc...

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  
the snapshot.

-Russell





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?
>
> cheers,
>
> Niko
>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20090814/bef0c1cd/attachment.html>


More information about the Self-interest mailing list