[Vm-dev] Recursive not understood error encountered

Mariano Martinez Peck marianopeck at gmail.com
Tue Dec 7 15:24:35 UTC 2010


Ok....I found the problem....it was what you said, but it was difficult for
me.

I had this:

AbstractCompiledMethodProxy >> doesNotUnderstand: aMessage
    self mareaIsProxyInstalled
        ifTrue: [ ^ CompiledMethodProxyHandler mareaHandleDoesNotUnderstand:
aMessage forProxy: self]
        ifFalse: [ ^ super doesNotUnderstand: aMessage ].

and I thought that ALL classes extend from ProtoObject, and not from nil (I
thought the only subclass from nil was ProtoObject). But I was wrong, nil
has another subclass: PseudoContext.
So...I was trying to swap out/in a CompiledMethod of PseudoContext, which of
course, crashed the VM, because the #doesNotUnderstand: was not found in
PseudoContext.

Funny, I learnt :)

Cheers

Mariano


On Tue, Dec 7, 2010 at 1:52 PM, Mariano Martinez Peck <marianopeck at gmail.com
> wrote:

> In my case, the proxy class is CompiledMethodProxy and it is a subclass of
> AbstractCompiledMethodProxy which is a subclass of ProtoObject.
>
> In AbstractCompiledMethodProxy I have:
>
> AbstractCompiledMethodProxy >> doesNotUnderstand: aMessage
>     self mareaIsProxyInstalled
>         ifTrue: [ ^ CompiledMethodProxyHandler
> mareaHandleDoesNotUnderstand: aMessage forProxy: self]
>         ifFalse: [ ^ super doesNotUnderstand: aMessage ].
>
>
> CompiledMethodProxy >> mareaIsProxyInstalled
>     ^ fileName isNil not
>
> Now....I was checking in VM side, method Interpreter >>
> lookupMethodInClass: class
> and still cannot understand how can I get a  'Recursive not understood
> error encountered'  error, because in the previous loop, it MUST find the
> method dnu, since it is implemented in ProtoObject.  I am confused :(
>
> Thanks in advance for any help
>
> Mariano
>
>
>
>
> On Mon, Dec 6, 2010 at 10:09 PM, Mariano Martinez Peck <
> marianopeck at gmail.com> wrote:
>
>>
>>
>> On Mon, Dec 6, 2010 at 8:34 PM, John M McIntosh <
>> johnmci at smalltalkconsulting.com> wrote:
>>
>>>
>>> On 2010-12-06, at 12:38 AM, Mariano Martinez Peck wrote:
>>>
>>> You should look at the Objective-C bridge I wrote  , the Objective-C
>>>> proxy object  that is based on ProtoObject and contains the
>>>> required methods to ensure a debugger will come up. It *does* override
>>>> does not understand so it can transform the unknown
>>>> message into a primitive call.
>>>>
>>>
>>> Excellent!! How can I load such code?  (squeaksource is down now and I
>>> cannot search)
>>>
>>> Thanks John!
>>>
>>> Mariano
>>>
>>>
>>>
>>> http://www.squeaksource.com/ObjectiveCBridge2.html
>>>
>>
>> Thanks John, I found it once SqueakSource came back. Now, I still don't
>> understand how is this (adding some methods to ProtoObject for debugging,
>> inspecting, printing) related to the "Recursive not understood error
>> encountered" crash ?  or this is just extra help information ? ;)
>>
>> Cheers
>>
>> Mariano
>>
>>
>>>  --
>>>
>>> ===========================================================================
>>> John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:
>>>  squeaker68882
>>> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
>>>
>>> ===========================================================================
>>>
>>>
>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20101207/ced14c66/attachment.htm


More information about the Vm-dev mailing list