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 267881 - NullPointerException at com.sun.source.util.TreePath.<init>
Summary: NullPointerException at com.sun.source.util.TreePath.<init>
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.2
Hardware: All All
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: 82_HR_FIX, REGRESSION
: 267896 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-05 08:04 UTC by jherkel
Modified: 2016-09-17 11:01 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 226064


Attachments
stacktrace (3.24 KB, text/plain)
2016-09-05 08:04 UTC, jherkel
Details
stacktrace (3.64 KB, text/plain)
2016-09-09 12:21 UTC, skygo
Details
stacktrace (3.60 KB, text/plain)
2016-09-12 12:18 UTC, IrianR
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jherkel 2016-09-05 08:04:00 UTC
Build: NetBeans IDE Dev (Build 201609020002)
VM: OpenJDK 64-Bit Server VM, 25.102-b14, OpenJDK Runtime Environment, 1.8.0_102-b14
OS: Linux

User Comments:
jherkel: I tried to debug my project




Stacktrace: 
java.lang.NullPointerException
   at com.sun.source.util.TreePath.<init>(TreePath.java:112)
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:70)
   at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106)
   at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:249)
   at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1002)
   at org.netbeans.modules.debugger.jpda.projects.PreferredCCParser.interpretOrCompileCode(PreferredCCParser.java:522)
Comment 1 jherkel 2016-09-05 08:04:01 UTC
Created attachment 161907 [details]
stacktrace
Comment 2 skygo 2016-09-09 12:21:49 UTC
Created attachment 161980 [details]
stacktrace

exploration of instance during debug session
Comment 3 IrianR 2016-09-12 12:18:50 UTC
Created attachment 162012 [details]
stacktrace

Inspecting a Web service client during a debug session.
Comment 4 Dusan Balek 2016-09-13 08:25:26 UTC
*** Bug 267896 has been marked as a duplicate of this bug. ***
Comment 5 Dusan Balek 2016-09-13 09:43:23 UTC
PreferredCCParser should not call a tree's accept method passing a TreePathScanner without properly initialized parent path as an argument.
Comment 6 Martin Entlicher 2016-09-14 22:38:49 UTC
This is a regression, unfortunately.
Can be reproduced by e.g. having an instance of an implementation of a Map in Variables window, for which the source class is not available.
Comment 7 Martin Entlicher 2016-09-14 22:41:42 UTC
Fixed by changeset:   300732:a1107ac38927
http://hg.netbeans.org/core-main/rev/a1107ac38927

Please verify in trunk, will backport into 8.2 then.
Comment 8 Quality Engineering 2016-09-16 02:28:25 UTC
Integrated into 'main-silver', will be available in build *201609160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a1107ac38927
User: mentlicher@netbeans.org
Log: #267881: Do not attempt to compile when TreePath is not available.
Comment 9 skygo 2016-09-16 16:10:33 UTC
Hi, I check this with build linked by Jiri on the NetCAT list.

Was ok but I'm not sure I'm able to reproduce the exact context
Comment 10 Jiri Kovalsky 2016-09-16 16:25:45 UTC
Thanks Eric. Integration approved. Martine, please merge the fix to release82 branch.
Comment 11 Martin Entlicher 2016-09-17 11:01:13 UTC
Thanks, integrated into release82 branch:
http://hg.netbeans.org/releases/rev/663f6e515bfe