Debugging possible bug
Niko Schwarz
niko.schwarz at gmx.net
Sun Jan 5 13:06:56 UTC 2003
Hello,
I was just just exploring the exolab jabber protocol when my debugger became
unable to display instance variable whose value was "nil".
I got instead: <error in printString: evaluate "inputQ printString" to debug>
A little debugging revealed something I did not quite understand:
The stack trace was this:
JabberXMLReader(ProtoObject)>>doesNotUnderstand:
Inspector>>selection
Inspector>>addCollectionItemsTo:
Inspector>>fieldListMenu:
PluggableListMorph(ScrollPane)>>getMenu:
PluggableListMorph>>getMenu:
PluggableListMorph(ScrollPane)>>yellowButtonActivity:
PluggableListMorph>>mouseDown:
PluggableListMorph(Morph)>>handleMouseDown:
MouseButtonEvent>>sentTo:
[snap]
The error occured in:
selection
"The receiver has a list of variables of its inspected object.
One of these is selected. Answer the value of the selected variable."
| basicIndex |
selectionIndex = 0
ifTrue: [^ ''].
selectionIndex = 1
ifTrue: [^ object].
selectionIndex = 2
ifTrue: [^ object longPrintString].
selectionIndex - 2 <= object class instSize
ifTrue: [^ object instVarAt: selectionIndex - 2]. "<----- there,
because object is nil"
The funny thing: evaluating selectionIndex = 0 results to true.
selectionIndex is assigned nowhere in there, so I suppose this is a bug, not?
regards,
nick
--
Accident, n.:
A condition in which presence of mind is good, but absence of
body is better.
More information about the Squeak-dev
mailing list
|