Debugging possible bug
niko.schwarz at gmx.net
Sun Jan 5 13:06:56 UTC 2003
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:
The error occured in:
"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?
A condition in which presence of mind is good, but absence of
body is better.
More information about the Squeak-dev