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 217639 - NullPointerException at org.netbeans.modules.xml.multiview.XmlMultiViewEditorSupport$5.run
Summary: NullPointerException at org.netbeans.modules.xml.multiview.XmlMultiViewEditor...
Status: RESOLVED INCOMPLETE
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-30 14:59 UTC by eltony81
Modified: 2012-09-03 16:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 191990


Attachments
stacktrace (3.70 KB, text/plain)
2012-08-30 14:59 UTC, eltony81
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eltony81 2012-08-30 14:59:33 UTC
This bug was originally marked as duplicate of bug 159992, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.2 (Build 201207171143)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.8-b03-424, Java(TM) SE Runtime Environment, 1.6.0_33-b03-424-10M3720
OS: Mac OS X

Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.xml.multiview.XmlMultiViewEditorSupport$5.run(XmlMultiViewEditorSupport.java:444)
   at org.netbeans.modules.xml.multiview.Utils.runInAwtDispatchThread(Utils.java:193)
   at org.netbeans.modules.xml.multiview.XmlMultiViewEditorSupport.openView(XmlMultiViewEditorSupport.java:440)
   at org.netbeans.modules.xml.multiview.XmlMultiViewEditorSupport.open(XmlMultiViewEditorSupport.java:458)
   at org.openide.awt.ActionDefaultPerfomer.actionPerformed(ActionDefaultPerfomer.java:70)
   at org.openide.awt.ContextAction$Performer.actionPerformed(ContextAction.java:226)
Comment 1 eltony81 2012-08-30 14:59:35 UTC
Created attachment 123749 [details]
stacktrace
Comment 2 Svata Dedic 2012-09-03 16:08:11 UTC
For the records (and perhaps verification in the future):

CloneableTopComponent mvtc = openCloneableTopComponent();
MultiViewHandler handler = MultiViews.findMultiViewHandler(mvtc);

handler.requestVisible(handler.getPerspectives()[index < 0 ? xmlMultiViewIndex : index]);

* handler.getPerspectives() seem to always return at least 0-length array
* openCloneableTopComponent() returns non-null from both its branches
* which means that mvtc is not actually a MultiViewTopComponent, which seems strange. the same invariant is used on more places.

Please provide more details, at least what type of file you're trying to open. Ideally, supply the file (perhaps anonymized) as attachment. Thanks.