This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 61240 - NPE from StepActionProvider$1.run
Summary: NPE from StepActionProvider$1.run
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: THREAD
Depends on:
Blocks:
 
Reported: 2005-07-21 15:33 UTC by Jesse Glick
Modified: 2010-04-29 09:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (13.00 KB, text/plain)
2005-07-21 15:33 UTC, Jesse Glick
Details
Log file, just for background info (150.67 KB, text/plain)
2005-07-21 15:38 UTC, Jesse Glick
Details
Some thread dumps (106.07 KB, text/plain)
2005-07-21 15:38 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-07-21 15:33:01 UTC
Dev build, Mustang, Linux. I was trying to debug a unit test
(ProjectXMLManagerTest). I had set a breakpoint in a test method, which the
debugger hit (though it seemed to take longer than usual). Then I stepped into a
method (OK), and opened the Local Vars window. This just displayed "Please
wait..." or similar and never showed any vars or values. After a minute or so, I
got bored and pressed F8. Nothing happened. All the other debugger windows
indicated that there was no call stack, no watches available, etc. Finally I
quit and Finish'd the debugger session; at that point this NPE was thrown.
Comment 1 Jesse Glick 2005-07-21 15:33:31 UTC
Created attachment 23211 [details]
Stack trace
Comment 2 Jesse Glick 2005-07-21 15:33:52 UTC
Assuming not reproducible.
Comment 3 Jesse Glick 2005-07-21 15:37:10 UTC
Nope, in fact I cannot debug at all. Tried the same test again. Again I could
hit the breakpoint and step into a method. But when I tried to see local vars
(toString values), the window just said "Evaluating..." for every field of
"this". Then the IDE froze. (You must not block EQ waiting for a remote VM to
return a result!)
Comment 4 Jesse Glick 2005-07-21 15:38:06 UTC
Created attachment 23213 [details]
Log file, just for background info
Comment 5 Jesse Glick 2005-07-21 15:38:33 UTC
Created attachment 23214 [details]
Some thread dumps
Comment 6 Martin Entlicher 2005-07-21 18:17:58 UTC
This is basically a bug in JDI:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6296125

The NPE can be easily fixed, but it does not cause any harm.
We should not disable breakpoints when just variables are evaluated (when no
methods are being invoked). This will reduce the chance that you will hit bug
#6296125.
Also we should move VariablesNodeModel.getShortDescription() processing out of
AWT event queue.
Comment 7 Jesse Glick 2005-07-21 18:36:42 UTC
Note that I have toString() display on for variables, so evaluating variables
*can* cause arbitrary method invocations.
Comment 8 Martin Entlicher 2005-07-26 18:40:30 UTC
The NPE is fixed:

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java,v
 <--  StepActionProvider.java
new revision: 1.21; previous revision: 1.20
Comment 9 Martin Entlicher 2005-07-26 19:38:33 UTC
The deadlock is solved in trunk (the tooltip is computed in RP):

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesNodeModel.java,v
 <--  VariablesNodeModel.java
new revision: 1.11; previous revision: 1.10
Comment 10 Martin Entlicher 2005-07-26 19:51:30 UTC
I've submitted issue #61429 for the remaining problem.
Comment 11 Quality Engineering 2010-04-29 09:23:57 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.