Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 158634 - NullPointerException at com.sun.tools.jdi.ReferenceTypeImpl.constantPool
NullPointerException at com.sun.tools.jdi.ReferenceTypeImpl.constantPool
Status: CLOSED FIXED
Product: debugger
Classification: Unclassified
Component: Java
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Martin Entlicher
issues@debugger
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT, jdk_bug_6822627
:
: 158737 158860 160895 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-16 21:54 UTC by Filip Zamboj
Modified: 2010-04-29 09:47 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (1.67 KB, text/plain)
2009-02-16 21:54 UTC, Filip Zamboj
Details
stacktrace (1.67 KB, text/plain)
2009-02-18 14:46 UTC, Filip Zamboj
Details
messages.log (185.09 KB, text/plain)
2009-02-26 18:29 UTC, Jan Pokorsky
Details
stacktrace (1.67 KB, text/plain)
2009-03-06 11:49 UTC, Exceptions Reporter
Details
stacktrace (1.67 KB, text/plain)
2009-03-06 14:53 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Zamboj 2009-02-16 21:54:03 UTC
Build: NetBeans IDE Dev (Build 200902131548)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Linux, 2.6.27-11-generic, amd64

User Comments:
fzamboj: NPE while steping into the method using F7 while debugging my code. It's application using AWT if that somehow helps.



Stacktrace: 
java.lang.IllegalStateException: java.lang.NullPointerException
        at org.netbeans.modules.debugger.jpda.jdi.ReferenceTypeWrapper.constantPool(ReferenceTypeWrapper.java:227)
        at org.netbeans.modules.debugger.jpda.ExpressionPool.createExpressionAt(ExpressionPool.java:168)
        at org.netbeans.modules.debugger.jpda.ExpressionPool.getExpressionAt(ExpressionPool.java:102)
        at org.netbeans.modules.debugger.jpda.actions.MethodChooser.collectOperations(MethodChooser.java:306)
        at org.netbeans.modules.debugger.jpda.actions.MethodChooser.run(MethodChooser.java:189)
        at org.netbeans.modules.debugger.jpda.actions.StepIntoActionProvider.doMethodSelection(StepIntoActionProvider.java:170)
Comment 1 Filip Zamboj 2009-02-16 21:54:08 UTC
Created attachment 77046 [details]
stacktrace
Comment 2 Filip Zamboj 2009-02-18 14:46:50 UTC
Build: NetBeans IDE Dev (Build 200902180201)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-ea-b03
OS: Linux, 2.6.27-11-generic, amd64

User Comments: 
This one is thrown right after assertion errror reported as http://www.netbeans.org/issues/show_bug.cgi?id=154992 if you try to continue by stepping into method. 

Stacktrace: 
java.lang.IllegalStateException: java.lang.NullPointerException
        at org.netbeans.modules.debugger.jpda.jdi.ReferenceTypeWrapper.constantPool(ReferenceTypeWrapper.java:227)
        at org.netbeans.modules.debugger.jpda.ExpressionPool.createExpressionAt(ExpressionPool.java:168)
        at org.netbeans.modules.debugger.jpda.ExpressionPool.getExpressionAt(ExpressionPool.java:102)
        at org.netbeans.modules.debugger.jpda.actions.MethodChooser.collectOperations(MethodChooser.java:306)
        at org.netbeans.modules.debugger.jpda.actions.MethodChooser.run(MethodChooser.java:189)
        at org.netbeans.modules.debugger.jpda.actions.StepIntoActionProvider.doMethodSelection(StepIntoActionProvider.java:170)
Comment 3 Filip Zamboj 2009-02-18 14:46:54 UTC
Created attachment 77106 [details]
stacktrace
Comment 4 Martin Entlicher 2009-02-19 15:24:02 UTC
*** Issue 158737 has been marked as a duplicate of this issue. ***
Comment 5 Martin Entlicher 2009-02-23 16:04:52 UTC
*** Issue 158860 has been marked as a duplicate of this issue. ***
Comment 6 Martin Entlicher 2009-02-23 16:31:08 UTC
It'd be nice to have exact steps to reproduce this. It would help us to identify whether the issue is in NetBeans or
JDI/JDWP layer.
Comment 7 Jan Pokorsky 2009-02-26 18:19:00 UTC
I can reliably reproduce it. See http://statistics.netbeans.org/analytics/exception.do?id=168337 for environment.

1. add a break point to MoveRefactoringPlugin.java at line 337
2. run action Refactoring/Move Class on some selected java file in j2se project
3. dialog appears; switch Location combo to 'Test Packages'
4. the debugger should stop on the break point and do Step Over
5. I get always the NPE
Comment 8 Jan Pokorsky 2009-02-26 18:25:41 UTC
4. Step Over has to be done at line 338
Comment 9 Jan Pokorsky 2009-02-26 18:29:16 UTC
Created attachment 77424 [details]
messages.log
Comment 10 Exceptions Reporter 2009-03-06 11:49:29 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

User Comments: 
stepping through code in debug mode

Stacktrace: 
java.lang.IllegalStateException: java.lang.NullPointerException
        at org.netbeans.modules.debugger.jpda.jdi.ReferenceTypeWrapper.constantPool(ReferenceTypeWrapper.java:227)
        at org.netbeans.modules.debugger.jpda.ExpressionPool.createExpressionAt(ExpressionPool.java:168)
        at org.netbeans.modules.debugger.jpda.ExpressionPool.getExpressionAt(ExpressionPool.java:102)
        at org.netbeans.modules.debugger.jpda.actions.MethodChooser.collectOperations(MethodChooser.java:306)
        at org.netbeans.modules.debugger.jpda.actions.MethodChooser.run(MethodChooser.java:189)
        at org.netbeans.modules.debugger.jpda.actions.StepIntoActionProvider.doMethodSelection(StepIntoActionProvider.java:170)
Comment 11 Exceptions Reporter 2009-03-06 11:49:33 UTC
Created attachment 77809 [details]
stacktrace
Comment 12 stefan79 2009-03-06 14:53:39 UTC
Build: NetBeans IDE Dev (Build 200903040201)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments: 
Tried to step (F7) into a Method (at debugging)

Stacktrace: 
java.lang.IllegalStateException: java.lang.NullPointerException
        at org.netbeans.modules.debugger.jpda.jdi.ReferenceTypeWrapper.constantPool(ReferenceTypeWrapper.java:227)
        at org.netbeans.modules.debugger.jpda.ExpressionPool.createExpressionAt(ExpressionPool.java:168)
        at org.netbeans.modules.debugger.jpda.ExpressionPool.getExpressionAt(ExpressionPool.java:102)
        at org.netbeans.modules.debugger.jpda.actions.MethodChooser.collectOperations(MethodChooser.java:306)
        at org.netbeans.modules.debugger.jpda.actions.MethodChooser.run(MethodChooser.java:189)
        at org.netbeans.modules.debugger.jpda.actions.StepIntoActionProvider.doMethodSelection(StepIntoActionProvider.java:170)
Comment 13 stefan79 2009-03-06 14:53:43 UTC
Created attachment 77823 [details]
stacktrace
Comment 14 Exceptions Reporter 2009-03-20 15:45:37 UTC
This issue has already 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=146392
Comment 15 Martin Entlicher 2009-03-23 16:40:24 UTC
*** Issue 160895 has been marked as a duplicate of this issue. ***
Comment 16 Martin Entlicher 2009-03-26 16:11:08 UTC
Defect in JDI: http://bugs.sun.com/view_bug.do?bug_id=6822627.

Unfortunately, we'll not be able to obtain constant pool when this is thrown. We have to just catch it, I do not think
that a workaround is possible.
Comment 17 Martin Entlicher 2009-03-27 09:55:37 UTC
Workarounded in changeset:   123879:3f7b8a04f32c
http://hg.netbeans.org/main/rev/3f7b8a04f32c
Comment 18 Quality Engineering 2009-03-28 20:41:45 UTC
Integrated into 'main-golden', will be available in build *200903281400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3f7b8a04f32c
User: mentlicher@netbeans.org
Log: #158634 - Added ability to customize generation of higher version methods. We do catch NPE thrown from ReferenceType.constantPool().
Comment 19 Quality Engineering 2010-04-29 09:47:53 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo