Bug 19155

Summary: NPE in ObjectReferenceImpl.isCollected()
Product: [Eclipse Project] JDT Reporter: Peter Burka <peter_burka>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Peter Burka CLA 2002-06-04 14:21:11 EDT
Build F2

I just got the following error on my console. Note that no error was logged in 
the .log file.

I had an editor open in the Debug perspective. I believe that the error 
occurred when I switched to another editor on the same file in the Java 
perspective in another window.

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/ObjectReferenceImpl.isCollected()Z
   org/eclipse/jdt/internal/debug/core/model/JDIValue.isAllocated()Z
   org/eclipse/jdt/internal/debug/core/model/JDIValue.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 Darin Wright CLA 2002-06-04 14:42:47 EDT
Without line numbers, it is hard to determine where the bug is. The trace shows 
that we were trying to get hover text for a variable in a java editor 
associated with a debug session.
Comment 2 Peter Burka CLA 2002-06-07 12:01:13 EDT
This error happens fairly frequently. I've got two of them in my terminal 
right now.

The stack traces look pretty much like the one below.
Comment 3 Jared Burns CLA 2002-06-11 08:19:55 EDT
This looks like another instance of the NPE reported in Bug 19433. In Bug 
19433, I recommend a post-2.0 review of all callers of requestVM().

Pre-2.0, we should at least add defense against the NPEs reported in this 
report and Bug 19433.
Comment 4 Jared Burns CLA 2002-06-11 09:30:02 EDT
Where were you running the target VM? Desktop machine, embedded device, etc.?
Comment 5 Peter Burka CLA 2002-06-11 09:51:11 EDT
This error occurred when I was running a runtime Eclipse workbench (WSADIE) in 
Eclipse. Target VM is J9 2.0 BFU beta.
Comment 6 Jared Burns CLA 2002-06-11 13:47:44 EDT

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