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 223487 - NullPointerException at org.netbeans.modules.nbform.FormDesignerTC.getToolbarRepresentation
Summary: NullPointerException at org.netbeans.modules.nbform.FormDesignerTC.getToolbar...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-07 15:47 UTC by marco76
Modified: 2013-01-04 02:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 196261


Attachments
stacktrace (2.97 KB, text/plain)
2012-12-07 15:47 UTC, marco76
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marco76 2012-12-07 15:47:33 UTC
Build: NetBeans IDE Dev (Build 201212070001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b02, Java(TM) SE Runtime Environment, 1.7.0_10-ea-b07
OS: Mac OS X

Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.nbform.FormDesignerTC.getToolbarRepresentation(FormDesignerTC.java:341)
   at org.netbeans.core.multiview.MultiViewPeer.peerComponentShowing(MultiViewPeer.java:283)
   at org.netbeans.core.multiview.MultiViewCloneableTopComponent.componentShowing(MultiViewCloneableTopComponent.java:129)
   at org.openide.windows.WindowManager.componentShowing(WindowManager.java:339)
   at org.netbeans.core.windows.WindowManagerImpl.componentShowing(WindowManagerImpl.java:1191)
   at org.netbeans.core.windows.view.DefaultView.changeGUI(DefaultView.java:168)
Comment 1 marco76 2012-12-07 15:47:35 UTC
Created attachment 129053 [details]
stacktrace
Comment 2 Tomas Pavek 2013-01-03 12:20:52 UTC
I was able to reproduce this by the following steps:
1) Open two GUI form (in Design).
2) Restart IDE.
3) Delete the .form files of the two forms out of the IDE.

What happens is that the IDE starts closing the opened forms. When it closes the first (currently selected) one, the other form TC becomes selected -- this form was not loaded yet after the restart, so its loading is started but fails due to the missing .form file. The failure leads to showing an error dialog which unblocks the event queue and so the waiting close operation for this form is processed. When the error dialog is closed, the form TC that was in the middle of opening is suddenly already closed. The exception is a result of that.

The fix is not to show the error dialog in such situation, not to break the order of the operations done by the window system.

Fix: http://hg.netbeans.org/jet-main/rev/ec2fc5418de0
Comment 3 Quality Engineering 2013-01-04 02:32:05 UTC
Integrated into 'main-golden', will be available in build *201301040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ec2fc5418de0
User: Tomas Pavek <tpavek@netbeans.org>
Log: #223487: winsys may trigger form loading to just close it immediately, if there are loading errors, reporting them in dialog unblocks event queue and leads to processing the close operation while still in the middle of opening