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 126193

Summary: AssertionError at org.netbeans.modules.form.layoutdesign.LayoutOperations.optimizeGaps
Product: guibuilder Reporter: najmi <najmi>
Component: Natural LayoutAssignee: issues@guibuilder <issues>
Status: RESOLVED FIXED    
Severity: blocker CC: jstola
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=22875
Issue Type: DEFECT Exception Reporter: 22875

Description najmi 2008-01-29 14:28:43 UTC
I get this error when I try to do just about anything in my form. Not sure how I got into this state.
This is an urgent bug as I cannot use GUI builder at all any more.


Build: NetBeans IDE Dev (Build 200711050000)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.5.0_13-b05
OS: Linux, 2.6.22-14-generic, amd64
User comments: 
STACKTRACE: (first 10 lines)
java.lang.AssertionError
        at org.netbeans.modules.form.layoutdesign.LayoutOperations.optimizeGaps(LayoutOperations.java:952)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.optimizeGaps(LayoutDesigner.java:3178)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.optimizeGaps(LayoutDesigner.java:3111)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.optimizeGaps(LayoutDesigner.java:3111)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updatePositions(LayoutDesigner.java:167)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.updateCurrentState(LayoutDesigner.java:100)
        at org.netbeans.modules.form.FormDesigner.updateComponentLayer(FormDesigner.java:521)
        at org.netbeans.modules.form.FormDesigner.access$1900(FormDesigner.java:100)
        at org.netbeans.modules.form.FormDesigner$FormListener$2.run(FormDesigner.java:2189)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
Comment 1 Jan Stola 2008-01-29 14:41:47 UTC
I am sorry, I am not able to reproduce this issue and the exception is not enough to track the problem down. Could you, 
please, provide more details. It would be ideal to attach the corresponding .java and .form files and describe exact 
steps that lead to this exception. Thank you in advance.
Comment 2 najmi 2008-01-30 15:14:21 UTC
I have sent form related files for offending form offline to jstola@netbeans.org.
Please let me know which nightly build to try a fix when you have it. Thanks very much.
Comment 3 Tomas Pavek 2008-02-04 18:31:11 UTC
I've received a sample form from the reporter and made a fix.

A workaround (to prevent this bug) is to always move components copied to a non-empty container via mouse (after the
components were pasted).

changeset 992c1e9a962b in main
details: http://hg.netbeans.org/main?cmd=changeset;node=992c1e9a962b