堆栈跟踪中的数字是什么意思?
如何使用堆栈跟踪中的数字?这些是什么意思? 在 Eclipse 中,我经常遇到异常,例如 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)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些是导致异常的指令距方法开头的偏移量。
com.sun.midp.lcdui.DefaultEventHandler.commandEvent 方法中偏移量 68 处的指令通过访问空引用导致实际异常。
com.sun.midp.lcdui.AutomatedEventHandler.commandEvent 方法中偏移量 47 处的指令是运行 com.sun.midp.lcdui.DefaultEventHandler.commandEvent 的调用指令> 方法。
com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent 方法中偏移量 186 处的指令是运行 com.sun.midp.lcdui.AutomatedEventHandler.commandEvent< 的调用指令/代码> 方法。
Those are the offsets of the instruction that caused the exception from the beginning of the method.
The instruction at offset 68 in the method
com.sun.midp.lcdui.DefaultEventHandler.commandEvent
is causing the actual exception by accessing a null reference.The instruction at offset 47 in the method
com.sun.midp.lcdui.AutomatedEventHandler.commandEvent
is a call instruction that runs thecom.sun.midp.lcdui.DefaultEventHandler.commandEvent
method.The instruction at offset 186 in the method
com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent
is a call instruction that runs thecom.sun.midp.lcdui.AutomatedEventHandler.commandEvent
method.