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 205139 - [71cat] NullPointerException at org.netbeans.modules.form.layoutdesign.LayoutUtils.getSizesOfDefaultGap
Summary: [71cat] NullPointerException at org.netbeans.modules.form.layoutdesign.Layout...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 11:16 UTC by MackSix
Modified: 2012-01-27 15:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182911


Attachments
stacktrace (2.62 KB, text/plain)
2011-11-15 11:16 UTC, MackSix
Details
Project that exhibits the error. (46.45 KB, application/zip)
2011-11-15 11:30 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2011-11-15 11:16:28 UTC
Build: NetBeans IDE Dev (Build 201111140600)
VM: Java HotSpot(TM) Client VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08
OS: Windows Vista

User Comments:
MackSix: Changed the layout several times on a form. Was using the Undo button to change back to orignal form layout when this happened.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.form.layoutdesign.LayoutUtils.getSizesOfDefaultGap(LayoutUtils.java:356)
   at org.netbeans.modules.form.layoutdesign.LayoutUtils.getSizeOfDefaultGap(LayoutUtils.java:279)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateCurrentSpaceOfGroups(LayoutDesigner.java:351)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateCurrentSpaceOfGroups(LayoutDesigner.java:365)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateContainerAfterBuild(LayoutDesigner.java:3960)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateCurrentState(LayoutDesigner.java:264)
Comment 1 MackSix 2011-11-15 11:16:30 UTC
Created attachment 113217 [details]
stacktrace
Comment 2 MackSix 2011-11-15 11:30:57 UTC
Created attachment 113218 [details]
Project that exhibits the error.

1) Open project in NetBeans.
2) Open Antenna.java file.
3) Click on Design button to put editor in design mode.
4) In Navigator, right click on [JFrame] node and set layout to Absolute Layout.
5) Continue step 4 for each Layout listed until the end of the list (Null Layout).
6) In Navigator, right click on [JFrame] node and set layout to Free Design.
7) Now click the Undo button (Ctrl+Z) to undo layouts back to Free Design again.

This NullPointerException occurs.
Comment 3 MackSix 2011-11-18 18:39:26 UTC
Notice Issue 199259 looks the same as this.
Comment 4 Tomas Pavek 2012-01-27 15:19:24 UTC
It's enough to switch the JFrame just to null layout and then to Free Design.

Fixed:
http://hg.netbeans.org/jet-main/rev/9371bebc986b