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.
Build: NetBeans IDE Dev (Build 200801290002) VM: Java HotSpot(TM) Client VM, 10.0-b19 OS: Windows XP, 5.1, x86 User Comments: editing code
Created attachment 55752 [details] stacktrace
Created attachment 55754 [details] dump file
Created attachment 55755 [details] ide log
*** Issue 126273 has been marked as a duplicate of this issue. ***
From issue #126273: 1. grid1. 2. <CTRL+SPACE> 3. <SELECT setChoiceColumnVisible> 4. IDE inserted grid1.setChoiceColumnVisible(rootPaneCheckingEnabled); 5. trying to change selected text "rootPaneCheckingEnabled" 6. exception
Unfortunately I am not able to reproduce it yet, even when I used the attached source and created some "dummy" closure (used classes from these class).
I am going to integrate some fix in Flow tomorrow then I will let you know about the build containing the fix (the problem is similar to the reported one, but probably it's not completely same). Can you than try the new build? Thanks, Tomas
Hopefully fixed in: e43ae29fd08d But I was not able to reproduce the issue, I've fixed one possible trace on which the inits may be assigned to null in the Flow, but I don't know if it was the only possible trace. Can you try a new build? I will attach a link when the build will be done. If you will have still the problem please reopen this issue. I will send you a patched javac logging the traces in the Flow. Thanks, Tomas
Here is the first build having the change: http://deadlock.netbeans.org/hudson/job/trunk/275/artifact/nbbuild/dist/zip/ Or you can use a night build which will come tonight or nay later build. Thanks, Tomas
Created attachment 56311 [details] ide log
Created attachment 56312 [details] dump file
Created attachment 56313 [details] gestures
Sorry. It is still in netbeans-hudson-trunk-295-java.zip. Doing same thing: grid1., select "setChoiceColumnVisible", ide inserted "setChoiceColumnVisible(rootPaneCheckingEnabled);", got exception. After that i try to move cursor and got another exception: java.lang.IllegalStateException: Cannot call getCompilationInfo() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first. at org.netbeans.api.java.source.CompilationInfoImpl.getCompilationUnit(CompilationInfoImpl.java:120) at org.netbeans.api.java.source.CompilationInfo.getCompilationUnit(CompilationInfo.java:140) at org.netbeans.api.java.source.TreeUtilities.pathFor(TreeUtilities.java:184) at org.netbeans.modules.editor.java.JavaCodeTemplateFilter.run(JavaCodeTemplateFilter.java:94) at org.netbeans.modules.editor.java.JavaCodeTemplateFilter.run(JavaCodeTemplateFilter.java:64) at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:656) at org.netbeans.api.java.source.JavaSource.runWhenScanFinished(JavaSource.java:788) at org.netbeans.modules.editor.java.JavaCodeTemplateFilter.<init>(JavaCodeTemplateFilter.java:78) at org.netbeans.modules.editor.java.JavaCodeTemplateFilter.<init>(JavaCodeTemplateFilter.java:64) at org.netbeans.modules.editor.java.JavaCodeTemplateFilter$Factory.createFilter(JavaCodeTemplateFilter.java:127) at org.netbeans.lib.editor.codetemplates.CodeTemplateManagerOperation.getTemplateFilters(CodeTemplateManagerOperation.java:232) at org.netbeans.lib.editor.codetemplates.SurroundWithFix.getFixes(SurroundWithFix.java:68) at org.netbeans.lib.editor.codetemplates.AbbrevDetection.showSurroundWithHint(AbbrevDetection.java:371) at org.netbeans.lib.editor.codetemplates.AbbrevDetection.access$100(AbbrevDetection.java:90) at org.netbeans.lib.editor.codetemplates.AbbrevDetection$1.actionPerformed(AbbrevDetection.java:165) at javax.swing.Timer.fireActionPerformed(Timer.java:271) [catch] at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.core.TimeableEventQueue.dispatchEvent(TimeableEventQueue.java:104) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Created attachment 56314 [details] ide log
The "java.lang.IllegalStateException: Cannot call getCompilationInfo() if current phase < JavaSource.Phase.PARSED. You must call toPhase(Phase.PARSED) first" is consequence of the above NPE, will disappear when the NPE is fixed.
I've added some logging, for now high level logging. The attribution phase of of javac has 3 phases before flow after parse (Enter - attributes class decl, MemberEnter - attrtes features (methods, fields), Attr - attributes method bodies) any of it may leave an empty subtree. I will attach link to hudson when the build will be available.
Here is the link with the build: http://deadlock.netbeans.org/hudson/job/trunk/306/artifact/nbbuild/dist/zip/ The IDE needs to be started with this additional flag to enable the logging: -J-Dorg.netbeans.api.java.source.JavaSource.level=400 Just open the JNewFrame and generate the exception, in the messages.log there should be some additional information. Thanks, Tomas
Created attachment 56404 [details] dump
Created attachment 56405 [details] ide log
Created attachment 56406 [details] gestures
Thanks for the logs, finally I was able to set up a reproduceable case.
Next try :-) Fixed in: e80355b17b61
Seems this issue has appeared again. This appeared in nightly 200809140201.
The original reason is fixed, but there can be other reasons why the tree is not attributed. Please attach the exception if possible file causing the exception.
Build: NetBeans IDE Dev (Build 200809111401) VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06 OS: Linux, 2.6.24-21-generic, i386 User Comments: Stacktrace: java.lang.NullPointerException at com.sun.tools.javac.comp.Flow.visitMethodDef(Flow.java:674) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:657) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:654) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:588) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
Created attachment 69878 [details] stacktrace
Created attachment 69879 [details] Corrupted source file
The exception was thrown when I duplicate the FooForm inner class with Ctrl + Shift + Down
Build: NetBeans IDE Dev (Build 200809120201) 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: copy and paste inner static class Stacktrace: java.lang.NullPointerException at com.sun.tools.javac.comp.Flow.visitMethodDef(Flow.java:674) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:657) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:654) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:588) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
Created attachment 69880 [details] stacktrace
Caused by recent compile on save changes
Fixed. changeset 44173b08e292 in main/nb-javac details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=44173b08e292 changeset e672ecbb5afa in main details: http://hg.netbeans.org/main?cmd=changeset;node=e672ecbb5afa
Integrated into 'main-golden', will be available in build *200809170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/e672ecbb5afa User: Dusan Balek <dbalek@netbeans.org> Log: Issues #126271 and #146996 fixed.
Reopening - reproduced in NetBeans IDE Dev (Build 200810300201) http://statistics.netbeans.org/exceptions/detail.do?id=134295
The case with duplicated inner classes is fixed, but there can be other reasons why the tree is not attributed. Please attach the generated exception dump file if possible.
Requested information was not provided, so I'm closing this issue for now. If you can still reproduce it feel free to reopen this issue and provide requested info. Thanks.
Created attachment 113633 [details] Dump file Here is the requested dump file.
Please note the dump file was generated under Netbeans 7.1: Product Version: NetBeans IDE Dev (Build 201111220600) Java: 1.7.0_01; Java HotSpot(TM) Client VM 21.1-b02 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb) Please update "Version" and "Target Milestone" accordingly.
please refer to http://statistics.netbeans.org/analytics/exception.do?id=547106, there are similar cases in the list, so it maybe useful.
Created attachment 113786 [details] stacktrace Pressed Ctrl+Space to invoke code completion
Created attachment 113787 [details] stacktrace Invoked code completion
Created attachment 114216 [details] stacktrace Pasted some code into a parent class from a subclass of it.
Created attachment 114217 [details] stacktrace Restarted and cleared var/cache to try to get rid of this issue. Attempted to rename an interface.
In case it's useful: In another project (the file the compiler threw the exception on), there were a number of invalid implementations of the class I was trying to refactor - I'd changed it from an interface to an abstract class and manually copied and pasted a bunch of code into the parent class, changing its signatures. The file in question also contained an import for a class in a non-existent package.
Created attachment 119769 [details] stacktrace
Fixed in jet-main. http://hg.netbeans.org/main/nb-javac/rev/8b291081dc8f http://hg.netbeans.org/jet-main/rev/7ae576ddf660
Integrated into 'main-golden', will be available in build *201205250002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/7ae576ddf660 User: Dusan Balek <dbalek@netbeans.org> Log: NPEs fixed (see issues #126271, #178114, #192723, #194758, #196863, #199921, #200555, #201317, #202443, #206760, #207651, and #210936).