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 175745 - NullPointerException at org.netbeans.editor.Utilities.getEditorUI
Summary: NullPointerException at org.netbeans.editor.Utilities.getEditorUI
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrew Korostelev
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on: 175590
Blocks:
  Show dependency tree
 
Reported: 2009-10-30 10:17 UTC by Lukas Hasik
Modified: 2009-11-20 13:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 161208


Attachments
stacktrace (3.38 KB, text/plain)
2009-10-30 10:17 UTC, Lukas Hasik
Details
stacktrace (3.38 KB, text/plain)
2009-10-30 10:18 UTC, Lukas Hasik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2009-10-30 10:17:53 UTC
Build: NetBeans IDE Dev (Build 200910290252)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.1-b02-90, Java(TM) SE Runtime Environment, 1.6.0_15-b03-219
OS: Mac OS X, 10.6.1, x86_64

User Comments:
lhasik: reproducible only when the FXZ is opened for first time and user wants to switch to "Source"

lhasik: -opened FXZ file from Favorites view
-then wanted to switch to "Source" view in Editor -> exception



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.editor.Utilities.getEditorUI(Utilities.java:1217)
        at org.netbeans.modules.javafx.fxd.composer.source.SourceEditorWrapper.addErrorStatusBarCell(SourceEditorWrapper.java:193)
        at org.netbeans.modules.javafx.fxd.composer.source.SourceEditorWrapper$EditorLookupWrapper.<init>(SourceEditorWrapper.java:43)
        at org.netbeans.modules.javafx.fxd.composer.source.SourceEditorWrapper.wrap(SourceEditorWrapper.java:126)
        at org.netbeans.modules.javafx.fxd.composer.source.SourceElement.getVisualRepresentation(SourceElement.java:117)
        at org.netbeans.core.multiview.TabsComponent.switchToCard(TabsComponent.java:187)
Comment 1 Lukas Hasik 2009-10-30 10:17:58 UTC
Created attachment 90267 [details]
stacktrace
Comment 2 Lukas Hasik 2009-10-30 10:18:55 UTC
Build: NetBeans IDE Dev (Build 200910290252)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.1-b02-90, Java(TM) SE Runtime Environment, 1.6.0_15-b03-219
OS: Mac OS X, 10.6.1, x86_64

User Comments: 
reproducible only when the FXZ is opened for first time and user wants to switch to "Source"

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.editor.Utilities.getEditorUI(Utilities.java:1217)
        at org.netbeans.modules.javafx.fxd.composer.source.SourceEditorWrapper.addErrorStatusBarCell(SourceEditorWrapper.java:193)
        at org.netbeans.modules.javafx.fxd.composer.source.SourceEditorWrapper$EditorLookupWrapper.<init>(SourceEditorWrapper.java:43)
        at org.netbeans.modules.javafx.fxd.composer.source.SourceEditorWrapper.wrap(SourceEditorWrapper.java:126)
        at org.netbeans.modules.javafx.fxd.composer.source.SourceElement.getVisualRepresentation(SourceElement.java:117)
        at org.netbeans.core.multiview.TabsComponent.switchToCard(TabsComponent.java:187)
Comment 3 Lukas Hasik 2009-10-30 10:18:58 UTC
Created attachment 90268 [details]
stacktrace
Comment 4 Andrew Korostelev 2009-11-03 09:55:49 UTC
It seems that this issue is caused by issue 17559o.
The only change I see reasonable to do on fx side is to block NPE to have the same behavior as in other modules.
Comment 5 Andrew Korostelev 2009-11-03 11:20:57 UTC
NPE is blocked.
changeset:   2843:a121e3d4a3a2
the rest should be done on issue 175590 side.
Comment 6 mslama 2009-11-04 17:46:52 UTC
What editor support do you use?
Comment 7 Andrew Korostelev 2009-11-05 10:51:41 UTC
We have invoked CloneableEditor.componentShowing() from MultiViewElement.componentShowing() implementation, as expected.
But before component is ready to show, we have invoked CloneableEditor.getEditorPane() for wrapping purposes.

I have added componentShowing(); invocation before getEditorPane().
It works now.

http://hg.netbeans.org/javafx/rev/88092d07cb1a
Comment 8 Lukas Hasik 2009-11-20 13:40:05 UTC
verified with 200911200201