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.
[recent builds] MarkOccurrencesTest.testType randomly fails with: Caused by: java.lang.NullPointerException at org.netbeans.modules.editor.NbEditorDocument.createEditor(NbEditorDocument.java:170) at org.openide.text.CloneableEditor$DoInitialize.initCustomEditor(CloneableEditor.java:497) at org.openide.text.CloneableEditor$DoInitialize.initVisual(CloneableEditor.java:599) at org.openide.text.CloneableEditor.getEditorPane(CloneableEditor.java:1067) at org.openide.text.CloneableEditorSupport.getOpenedPanes(CloneableEditorSupport.java:1098) at org.netbeans.modules.java.editor.semantic.MarkOccurrencesTest$1.run(MarkOccurrencesTest.java:294) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:117) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) I will attach full exception. The test is a qa-functional test in java.editor. Happened to me too when I tried to performed the test on my computer. I have disabled all MarkOccurrencesTest's tests on the cont. builder.
Created attachment 89678 [details] Full exception.
I saw this in my fresh build. As Honza pointed out this could related to my fixes for #174408, so I'll have a look.
Ah, I'm sorry for all the panic. Marek seem to be already investigating this. Thanks
Happened to me too: http://deadlock.netbeans.org/hudson/job/ergonomics/605/testReport/org.netbeans.modules.ide.ergonomics.fod/OpenEditorEnablesEditMenuFactoryTest/testIfProjectFactoryInstalled/? Caused by: java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(EventQueue.java:853) at org.netbeans.modules.ide.ergonomics.fod.OpenEditorEnablesEditMenuFactoryTest.testIfProjectFactoryInstalled(OpenEditorEnablesEditMenuFactoryTest.java:118) Caused by: java.lang.NullPointerException at org.netbeans.modules.editor.NbEditorDocument.createEditor(NbEditorDocument.java:170) at org.openide.text.CloneableEditor$DoInitialize.initCustomEditor(CloneableEditor.java:497) at org.openide.text.CloneableEditor$DoInitialize.initVisual(CloneableEditor.java:599) at org.openide.text.CloneableEditor.getEditorPane(CloneableEditor.java:1067) at org.openide.text.CloneableEditorSupport.getOpenedPanes(CloneableEditorSupport.java:1098) at org.netbeans.modules.ide.ergonomics.fod.OpenEditorEnablesEditMenuFactoryTest$2.run(OpenEditorEnablesEditMenuFactoryTest.java:122) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
The code in NbEditorDocument could be written slightly more defensively and just log a warning, could it not? Potentially any JEditorPane can be used as a parameter to the createEditor method and it would be better to return j instead of throwing NPE: public Component createEditor(JEditorPane j) { return Utilities.getEditorUI(j).getExtComponent(); }
*** Issue 138686 has been marked as a duplicate of this issue. ***
10 dups during 2 days ... we will evaluate if that is a stopper during the day
it is a stopper, see statistics in issue #138686 as well. Michal, I think, this is the issue related with issue #168415 (as we discussed with you in mails) *** This issue has been marked as a duplicate of 138686 ***
duplicate of duplicate
Ok, this and #138686 refer to the same problem, albeit the original culprit in #138686 was different. Since #138686 is still open and P1, this issue can safely be marked as a duplicate. *** This issue has been marked as a duplicate of 138686 ***
Integrated into 'main-golden', will be available in build *200910221401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6ee79a32740f User: Miloslav Metelka <mmetelka@netbeans.org> Log: #174856 - NPE at org.netbeans.modules.editor.NbEditorDocument.createEditor() - added a check for null EditorUI which will possibly throw ISE with debug info.