hsmit
hsmit

Reputation: 3906

What do the numbers in stack trace mean?

How can I use the numbers in the stacktrace? What do these mean? In eclipse I get often exceptions, for example a NullPointerException:

java.lang.NullPointerException
  at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
  at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
  at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+186) 

Upvotes: 8

Views: 1765

Answers (1)

Mehrdad Afshari
Mehrdad Afshari

Reputation: 421978

Those are the offsets of the instruction that caused the exception from the beginning of the method.

java.lang.NullPointerException
  at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)

The instruction at offset 68 in the method com.sun.midp.lcdui.DefaultEventHandler.commandEvent is causing the actual exception by accessing a null reference.

  at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)

The instruction at offset 47 in the method com.sun.midp.lcdui.AutomatedEventHandler.commandEvent is a call instruction that runs the com.sun.midp.lcdui.DefaultEventHandler.commandEvent method.

  at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+186)

The instruction at offset 186 in the method com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent is a call instruction that runs the com.sun.midp.lcdui.AutomatedEventHandler.commandEvent method.

Upvotes: 13

Related Questions