Hi. I am still playing with Objects as methods, and I am having yet another kind of crash :( This time, the image crash with the message "Recursive not understood error encountered". I am completly sure that I am not putting ANY proxy for any method of DNU, so I don't understand why I get this error. I copy the stacktrace. You can see 2 important things: 1) AbstractCompiledMethodProxy>run:with:in: 2) mareaHandleRun:with:in:forProxy: 1) is the proxy object and 2) is the handler. AbstractCompiledMethodProxy >> run: aSelector with: arguments in: aReceiver ^ CompiledMethodProxyHandler mareaHandleRun: aSelector with: arguments in: aReceiver forProxy: self CompiledMethodProxyHandler >> mareaHandleRun: aSelector with: arguments in: aReceiver forProxy: aProxy | aResult oldMethod | self mareaCheckLoop. self mareaLog: 'The method ', aSelector, ' is being executed with a receiver instance of ', aReceiver mareaClass name. oldMethod := self mareaUninstallForProxy: aProxy. aResult := oldMethod valueWithReceiver: aReceiver arguments: arguments. self mareaLog: 'The method ', aSelector, ' was executed with a receiver instance of ', aReceiver mareaClass name. ^aResult Does anyone has an idea of what can be happening? Thanks in advance, Recursive not understood error encountered 591830388 Rectangle>translateBy: 591830296 ECMenuMorph>prepareRectForNextRow: 591830116 CompiledMethod>valueWithReceiver:arguments: 591799776 >mareaHandleRun:with:in:forProxy: 591799684 AbstractCompiledMethodProxy>run:with:in: 591678220 OMenuMorph>drawOn: 591678128 CompiledMethod>valueWithReceiver:arguments: 591677672 >mareaHandleRun:with:in:forProxy: 591677580 AbstractCompiledMethodProxy>run:with:in: 591677488 Canvas>draw: 591677396 Canvas>drawMorph: 591677304 Morph>fullDrawOn: 591677192 FormCanvas>roundCornersOf:in:during: 591677100 Canvas>roundCornersOf:during: 591676972 Morph>fullDrawOn: 591676792 Canvas>fullDraw: 591676700 Canvas>fullDrawMorph: 591676204 WorldState>drawWorld:submorphs:invalidAreasOn: 591675472 Rectangle>allAreasOutsideList:startingAt:do: 591675380 Rectangle>allAreasOutsideList:do: 591675908 WorldState>drawWorld:submorphs:invalidAreasOn: 591675288 SequenceableCollection>do: 591675020 WorldState>drawWorld:submorphs:invalidAreasOn: 591674900 WorldState>displayWorld:submorphs: 591674808 FormCanvas>roundCornersOf:in:during: 591674716 Canvas>roundCornersOf:during: 591674612 WorldState>displayWorld:submorphs: 591674520 PasteUpMorph>privateOuterDisplayWorld 591674428 PasteUpMorph>displayWorld 591674336 WorldState>displayWorldSafely: 591674188 BlockClosure>on:do: 591674096 BlockClosure>ifError: 591674004 WorldState>displayWorldSafely: 591643764 WorldState>doOneCycleNowFor: 591643672 WorldState>doOneCycleFor: 591643580 PasteUpMorph>doOneCycle 560519040 >spawnNewProcess 560518912 BlockClosure>newProcess Debugger stopped. Program exited with status value:255.(gdb) |
On Fri, Dec 3, 2010 at 12:52 PM, Mariano Martinez Peck <[hidden email]> wrote: > > Hi. I am still playing with Objects as methods, and I am having yet another kind of crash :( > This time, the image crash with the message "Recursive not understood error encountered". > I am completly sure that I am not putting ANY proxy for any method of DNU, so I don't understand why I get this error. Without understanding the details of what you're doing, let me offer this: try looking for objects that don't inherit from Object. Even if you aren't proxying #doesNotUnderstand:, you can get a recursive DNU if an object that doesn't understand #doesNotUnderstand: gets *another* message it doesn't understand. Hope this helps. Colin |
On Sun, Dec 5, 2010 at 8:53 AM, Colin Putney <[hidden email]> wrote:
thanks Colin for the help. try looking for objects that don't inherit from Object. Ok, there are objects that doesn't inherit from Object, and even my proxies don't do that. But.....ProtoObject DOES understands the message #doesNotUnderstand: Even if there cannot be objects that don't understand #doesNotUnderstand: since it is implemented in ProtoObject. gets Anyway, I will think if there can be a situation that happens what you said...maybe there is. Thanks a lot ! mariano Hope this helps. |
Mariano, knowing that ProtoObject does understand doesnotunderstand via is not enough. There are a dozen or two other methods needed in order for a debugger to come up, even to invoke an inspector on ProtoObject subclasses. 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. On 2010-12-05, at 5:57 AM, Mariano Martinez Peck wrote:
-- =========================================================================== John M. McIntosh <[hidden email]> Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com =========================================================================== |
On Sun, Dec 5, 2010 at 9:07 PM, John M McIntosh <[hidden email]> wrote:
Yes, I know that. I even had to implement few extra methods on ProtoObject in order to bring up a debugger. What how is this related to the "Recursive not understood error encountered" crash ? or this is just extra help information ? ;)
Excellent!! How can I load such code? (squeaksource is down now and I cannot search) Thanks John! Mariano
|
On 2010-12-06, at 12:38 AM, Mariano Martinez Peck wrote:
-- =========================================================================== John M. McIntosh <[hidden email]> Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com =========================================================================== |
On Mon, Dec 6, 2010 at 8:34 PM, John M McIntosh <[hidden email]> wrote:
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
|
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 <[hidden email]> wrote:
|
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 <[hidden email]> wrote: In my case, the proxy class is CompiledMethodProxy and it is a subclass of AbstractCompiledMethodProxy which is a subclass of ProtoObject. |
Free forum by Nabble | Edit this page |