Community
Participate
Working Groups
Build F2 My runtime workbench was stopped in the debugger. I saw this exception appear on the console when I started editing the static method in which the code was stopped. java.lang.NullPointerException Stack trace: java/lang/Throwable.<init>()V java/lang/Throwable.<init>(Ljava/lang/String;)V java/lang/NullPointerException.<init>(Ljava/lang/String;)V org/eclipse/jdi/internal/ReferenceTypeImpl.fields()Ljava/util/List; org/eclipse/jdi/internal/ReferenceTypeImpl.allFields()Ljava/util/List; org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.getVariables0() Ljava/util/List; org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.findVariable (Ljava/lang/String;)Lorg/eclipse/jdt/debug/core/IJavaVariable; org/eclipse/jdt/internal/debug/core/model/JDIThread.findVariable (Ljava/lang/String;)Lorg/eclipse/jdt/debug/core/IJavaVariable; org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.findVariable (Ljava/lang/String;)Lorg/eclipse/jdt/debug/core/IJavaVariable; org/eclipse/jdt/internal/debug/ui/JavaDebugHover.getHoverInfo (Lorg/eclipse/jface/text/ITextViewer;Lorg/eclipse/jface/text/IRegion;) Ljava/lang/String; org/eclipse/jdt/internal/ui/text/java/hover/JavaTextHover.getHoverInfo (Lorg/eclipse/jface/text/ITextViewer;Lorg/eclipse/jface/text/IRegion;) Ljava/lang/String; org/eclipse/jface/text/TextViewerHoverManager$2.run()V
Other info - I had an object expanded to two levels in the variables view The details pane was visible
Don't suppose you can reproduce this on a VM which prints line numbers in the stack trace? It's really much more difficult to figure these things out without line numbers.
Looking at the code, there appears to be only one place that this NPE can occur - line 540: JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.RT_FIELDS, this); defaultReplyErrorHandler(replyPacket.errorCode()); The requestVM() will return null if the communication between the Debugger and the VM is interrupted. @see PacketReceiveManager#getReply(JdwpCommandPacket commandPacket) Our JDI client never handles a null replyPacket. However, we've never seen a null replyPacket before, so it appears that this case is our extremely rare. Recommend deferring for post 2.0 review.
*** Bug 19155 has been marked as a duplicate of this bug. ***
Agreed. Deferred for post 2.0 consideration. The JDI client looks like it has to be interrupted for this problem to happen, and this is the first we have seen of it. It looks like we should be throwing a runtime JDI exception when this happens.
Re-opening for 2.1
*** Bug 22955 has been marked as a duplicate of this bug. ***
This is a duplicate of 21622. *** This bug has been marked as a duplicate of 21622 ***