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.
Summary: | NullPointerException at com.sun.tools.javac.comp.Flow.visitTry | ||
---|---|---|---|
Product: | platform | Reporter: | dbcurtis <dbcurtis> |
Component: | Filesystems | Assignee: | Jaroslav Tulach <jtulach> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | jkovalsky, MackSix, mmirilovic, tzezula |
Priority: | P1 | ||
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 179257 |
Attachments: |
stacktrace
stacktrace Here is the dump file that was in .netbeans/dev/var/log/ This is the log file from the first occurance. This is the dump file from the first occurance. This is the log file before these exceptions occured. Project that exhibits the error. Unit test showing the problem Possible fix |
Description
dbcurtis
2011-06-09 04:27:10 UTC
Created attachment 108816 [details]
stacktrace
Hard to fix without a reproducible test case. Are you able to reproduce the issue? If so, could you please create a simple test case and attach it to the issue? Thanks. I am not at a computer where I try to reproduce it. I believe that it is sorta random and not predictably reproducible. Sorry Dan Created attachment 112961 [details]
stacktrace
It did it again doing the same edit. It is reproducable, but I don't know if I can reproduce once I restart NetBeans. :)
Created attachment 112962 [details]
Here is the dump file that was in .netbeans/dev/var/log/
Created attachment 112963 [details]
This is the log file from the first occurance.
Created attachment 112964 [details]
This is the dump file from the first occurance.
Created attachment 112965 [details]
This is the log file before these exceptions occured.
Before these exceptions occurred, I renamed the project with renaming of folder and it made and exception. Then I renamed the package. Then I tried to edit javaapplication7.java file that was in the project.
Created attachment 112966 [details]
Project that exhibits the error.
1) Open this project in NetBeans.
2) Rename project from JavaApplication72 to JavaApplication73 and choose to rename the folder while doing it.
3) Rename the package javaapplication72 to javaapplication72 with refactoring.
4) Open JavaApplication7.java and add type in the following code in main, but when "setVisible(boolean b) void" is visible in the auto complete window, press enter to complete the second line.
NewJFrame frame = new NewJFrame();
frame.setVisible(true);
After a second or two, this exception is thrown.
Product Version: NetBeans IDE Dev (Build 201111070600) Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02 System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb) Here is a video of it happening: http://youtu.be/FVvPHnxlT2E Regression P1, ought to be fixed in 7.1. 100% reproducible NPE fixed. http://hg.netbeans.org/main-silver/rev/abe9a7d106d3 http://hg.netbeans.org/main/nb-javac/rev/7ad3298c5fd2 However the main problem here is that the renamed project is no more scanned (no changes in project sources are reflected in NB caches after the project rename). The reason is that the recursive file listeners does not work after folder rename. After the project rename no file change event are delivered, the problem is that in design of Holder + DeepListener. The listener is added, and removed but when it's removed the folder was already renamed, so the DeepListener does not remove the listener but marks itself as removed. When the recursive listener is reattached to the renamed folder, it's not added into MasterFS listener list (because DeepListener which wraps the listener overrides equals, hashCode) and is equals to the old DeepListener which was not removed in the previous step (works fine on LocalFS! as it does not use Set<FCL> for listeners). There are several ways how to fix it, the simplest fix is attached. Created attachment 113404 [details]
Unit test showing the problem
Created attachment 113405 [details]
Possible fix
ergonomics#c34734397083 Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/abe9a7d106d3 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #199296: NullPointerException at com.sun.tools.javac.comp.Flow.visitTry - fixed. I'm sorry I have to reopen this bug, it is still reproducible Product Version: NetBeans IDE Dev (Build 20111123-9a0b900a980d) Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb) User directory: C:\Users\jprox\.netbeans\dev Cache directory: C:\Users\jprox\.netbeans\dev\var\cache I will test the Jarda part of the fix. I cannot reproduce it now in Product Version: NetBeans IDE Dev (Build 20111123-4be9bb06ff91) Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb) User directory: D:\udir5 Cache directory: D:\udir5\var\cache With Jarda's fix it seems to work fine. the fixes can be ported to 7.1 branch Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/c34734397083 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #199296: Use path in the DeepListener's equals method Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/c34734397083 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #199296: Use path in the DeepListener's equals method i was not able to reproduce in Product Version: NetBeans IDE 7.1 RC1 (Build 201111242103) Java: 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402 System: Mac OS X version 10.7.2 running on x86_64; MacRoman; en_US (nb) User directory: /Users/tomas/.netbeans/7.1rc1 Cache directory: /Users/tomas/.netbeans/7.1rc1/var/cache |