Bug 19433 - NPE in ReferenceTypeImpl.fields
Summary: NPE in ReferenceTypeImpl.fields
Status: RESOLVED DUPLICATE of bug 21622
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 19155 22955 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-05 18:31 EDT by Peter Burka CLA
Modified: 2002-09-26 22:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Burka CLA 2002-06-05 18:31:41 EDT
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
Comment 1 Peter Burka CLA 2002-06-05 18:32:39 EDT
Other info -

I had an object expanded to two levels in the variables view

The details pane was visible
Comment 2 Jared Burns CLA 2002-06-07 16:33:18 EDT
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.
Comment 3 Jared Burns CLA 2002-06-10 14:44:47 EDT
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.
Comment 4 Jared Burns CLA 2002-06-11 13:47:44 EDT
*** Bug 19155 has been marked as a duplicate of this bug. ***
Comment 5 Darin Wright CLA 2002-06-13 14:47:42 EDT
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.
Comment 6 Darin Wright CLA 2002-08-01 14:22:15 EDT
Re-opening for 2.1
Comment 7 Darin Wright CLA 2002-08-28 14:13:09 EDT
*** Bug 22955 has been marked as a duplicate of this bug. ***
Comment 8 Darin Wright CLA 2002-09-26 22:19:15 EDT
This is a duplicate of 21622.

*** This bug has been marked as a duplicate of 21622 ***