Infinite re-cursion on VisualGST inspector

Project:GNU Smalltalk
Component:VisualGST
Category:bug
Priority:normal
Assigned:Unassigned
Status:active
Description

I'm loading some code (OsmoMGCP) with the STClassLoader and then using VisualGST to inspect the code. I end up with an infinite crash re-cursion like this:


(ip 10)ProxyNamespace>>#printOn:
(ip 20)ProxyNamespace(Object)>>#printString
(ip 44)UnhandledException>>#defaultAction
(ip 4)[] in Exception>>#resignalAsUnhandled:
(ip 42)MethodContext(ContextPart)>>#scanBacktraceFor:do:
(ip 36)MessageNotUnderstood(Exception)>>#resignalAsUnhandled:
(ip 8)MessageNotUnderstood(Exception)>>#defaultAction
(ip 2)[] in Exception>>#instantiateDefaultHandler
(ip 16)MessageNotUnderstood(Exception)>>#activateHandler:
(ip 24)MessageNotUnderstood(Exception)>>#signal
(ip 20)ProxyNamespace(Object)>>#doesNotUnderstand:
(ip 18)ProxyNamespace(BindingDictionary)>>#doesNotUnderstand:
(ip 10)ProxyNamespace>>#printOn:
(ip 20)ProxyNamespace(Object)>>#printString
(ip 44)UnhandledException>>#defaultAction
(ip 4)[] in UnhandledException>>#instantiateDefaultHandler
(ip 16)UnhandledException(Exception)>>#activateHandler:
(ip 24)MessageNotUnderstood(Exception)>>#resignalAs:
(ip 40)MessageNotUnderstood(Exception)>>#resignalAsUnhandled:
(ip 8)MessageNotUnderstood(Exception)>>#defaultAction
(ip 2)[] in Exception>>#instantiateDefaultHandler
(ip 16)MessageNotUnderstood(Exception)>>#activateHandler:
(ip 24)MessageNotUnderstood(Exception)>>#signal
(ip 20)ProxyNamespace(Object)>>#doesNotUnderstand:
(ip 18)ProxyNamespace(BindingDictionary)>>#doesNotUnderstand:
(ip 10)ProxyNamespace>>#printOn:
(ip 8)WriteStream(Stream)>>#print:
(ip 16)[] in Dictionary>>#printOn:
(ip 32)IdentityDictionary(LookupTable)>>#keysAndValuesDo:
(ip 26)IdentityDictionary(Dictionary)>>#printOn:
(ip 8)IdentityDictionary(Object)>>#displayOn:
(ip 18)IdentityDictionary(Object)>>#displayString
(ip 20)GtkInspectorWidget>>#onVariableChanged
(ip 0)

Updates

#1 submitted by Holger Hans Pet... on Sat, 03/30/2013 - 19:56


PackageLoader fileInPackage: #Parser.
p := STInST.STClassLoaderObjects.ProxyNamespace on: Smalltalk for: STInST.STClassLoader new

is reproducing the issue. Changing the classNameString to class storeString is fixing the specific issue but it will end up with a infinite recursion.

1.) Should VisualGSTs inspector use [] on: do: [:e | widget text: '<Error..>'] for getting the displayString?

2.) During development it would be nice if VisualGST could limit the stack depth of a process...

3.) With making VisualGST more async one could use some kind of a future that would fork for the displayString request and come back once there is the result. This would not block the mainUI.

4.) How to fix the actual error here? The ProxyNamespace is initialized to contain itself.. so printing it will list itself... which will print itself.. which will print itself..

#2 submitted by Holger Hans Pet... on Sat, 03/30/2013 - 19:58

printOn: aStream
   "Print a representation of the receiver on aStream"
   aStream nextPutAll: self class storeString , '[', proxy name, '] (' ; nl.
   self myKeysAndValuesDo:
       [ :key :value | aStream tab;
                  print: key;
                  nextPutAll: '->';
                  print: value;
                  nl ].   
   aStream nextPut: $)

!

is the fixed but still broken code. I addded a self == value ifFalse: [].. but this results in having nothing printed at all. I am not sure if that is the correct output.

User login