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: | NPE at org.netbeans.modules.editor.NbEditorDocument.createEditor | ||
---|---|---|---|
Product: | editor | Reporter: | Jan Lahoda <jlahoda> |
Component: | -- Other -- | Assignee: | mslama <mslama> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | CC: | jiriprox, jlahoda, jtulach, mmirilovic |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Full exception. |
Description
Jan Lahoda
2009-10-19 09:38:18 UTC
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. |