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 267572

Summary: IllegalArgumentException: TreePathHandle [/Users/tim/work/oracle/fakes/src/main/java/com/oracle/fakes/util/EnumIntMapping.java] was not created from /Users/tim/work/oracle/fakes/src/main/java/com/orac
Product: java Reporter: _ tboudreau <tboudreau>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal CC: timmaher
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 225751
Attachments: stacktrace
stacktrace

Description _ tboudreau 2016-08-14 04:22:59 UTC
This bug was originally marked as duplicate of bug 182069, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build NetBeans-1084-on-20160701)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.102-b14, Java(TM) SE Runtime Environment, 1.8.0_102-b14
OS: Mac OS X

User Comments:
tboudreau: Invoking code completion




Stacktrace: 
java.lang.IllegalArgumentException: TreePathHandle [/Users/tim/work/oracle/fakes/src/main/java/com/oracle/fakes/util/EnumIntMapping.java] was not created from /Users/tim/work/oracle/fakes/src/main/java/com/oracle/fakes/util/EnumIntMapping.java
mine: id=/Users/tim/work/oracle/fakes/src/main/java/com/oracle/fakes/util/EnumIntMapping.java@da61c635:1cbbf9d5, url=file:/Users/tim/work/oracle/fakes/src/main/java/com/oracle/fakes/util/EnumIntMapping.java
remote: id=/Users/tim/work/oracle/fakes/src/main/java/com/oracle/fakes/util/EnumIntMapping.java@da61c635:4a2ab393, url=file:/Users/tim/work/oracle/fakes/src/main/java/com/oracle/fakes/util/EnumIntMapping.java
   at org.netbeans.api.java.source.TreePathHandle$TreeDelegate.resolve(TreePathHandle.java:479)
   at org.netbeans.api.java.source.TreePathHandle.resolve(TreePathHandle.java:153)
   at org.netbeans.modules.java.editor.imports.JavaFixAllImports.performFixImports(JavaFixAllImports.java:267)
   at org.netbeans.modules.java.editor.imports.JavaFixAllImports.access$200(JavaFixAllImports.java:116)
   at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:160)
   at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:137)
Comment 1 _ tboudreau 2016-08-14 04:23:02 UTC
Created attachment 161653 [details]
stacktrace
Comment 2 timmaher 2017-11-29 17:30:00 UTC
Created attachment 165515 [details]
stacktrace

Just looking at an unused import. Second crash today. Will now re-start IDE.
Comment 3 timmaher 2017-11-30 11:30:54 UTC
I think that I know the cause of this.
I changed the name of a the folders enclosing an open project which happens to be the one that I was working on.
One of the projects is a library so I re-pointed the library entry in Netbeans. Open projects correctly compiled.
However, on a project within the re-named set, I couldn't establish a breakpoint because the debugger breakpoint positioner couldn't find the new folder name even though it reproduced it correctly in the error message.
I closed the project, shutdown & re-started Netbeans, re-opened and re-compiled the project. Still no change; breakpoint was stuffed.
I then closed ALL open projects in Netbeans and then shutdown and re-started it.
I then opened two projects, the one that had been changed and one that had not.
The error has not recurred.