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 191874

Summary: AssertionError at org.netbeans.modules.form.layoutdesign.LayoutRegion.overlap
Product: guibuilder Reporter: David Konecny <dkonecny>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED FIXED    
Severity: normal CC: MackSix
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 161487
Attachments: stacktrace
Test-case (.form)
Test-case (.java)

Description David Konecny 2010-11-11 21:47:18 UTC
Build: NetBeans IDE 7.0 M2 (Build 201010151251)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04
OS: Linux

User Comments:
dkonecny: was dragging selection of two items from the bottom of form to the top. before drag I switched the form from GridBagLayout to GroupLayout




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.modules.form.layoutdesign.LayoutRegion.overlap(LayoutRegion.java:365)
   at org.netbeans.modules.form.layoutdesign.LayoutUtils.contentOverlap(LayoutUtils.java:447)
   at org.netbeans.modules.form.layoutdesign.LayoutOperations.prepareGroupExtension(LayoutOperations.java:630)
   at org.netbeans.modules.form.layoutdesign.LayoutOperations.findIntervalToExtend(LayoutOperations.java:604)
   at org.netbeans.modules.form.layoutdesign.LayoutOperations.moveInsideSequential(LayoutOperations.java:475)
   at org.netbeans.modules.form.layoutdesign.LayoutFeeder.addInterval(LayoutFeeder.java:803)
Comment 1 David Konecny 2010-11-11 21:47:22 UTC
Created attachment 102930 [details]
stacktrace
Comment 2 Jan Stola 2011-08-04 09:31:06 UTC
I am sorry, I am not able to reproduce this issue and the attached stack-trace is not sufficient to track the problem down. Are you still able to reproduce it? If so, could you, please, provide more details? It would be ideal to attach the problematic form (both .java and .form files) saved in the last good state
and describe _exact_ steps that lead to this exception. Thank you in advance.
Comment 3 David Konecny 2011-08-04 21:26:38 UTC
I tried and I can reproduce it. But it does look like a corner case so perhaps P4. Try this (eg. in 7.0.1):

* open web.project/src/org/netbeans/modules/web/project/ui/customizer/CustomizerJavadoc.java

* change layout to Freeform

* select two aligned JTextFields at the bottom (Browser Window Title and Encoding)

* drag them and drop them in between two checkboxes (for example in between @author and @version)

That always result in Assert for me.
Comment 4 Jan Stola 2011-08-08 09:53:35 UTC
Created attachment 109849 [details]
Test-case (.form)
Comment 5 Jan Stola 2011-08-08 09:55:01 UTC
Created attachment 109850 [details]
Test-case (.java)
Comment 6 Jan Stola 2011-08-08 09:55:40 UTC
Thank you for the additional information. I am able to reproduce the exception now. I am attaching a test-case based on the form that you mentioned.

Steps to reproduce:
1. Open the attached form.
2. Select two buttons at the bottom.
3. Move them such that the left top corner of jButton1 is aligned
   with the left top corner of JToggleButton2 => the exception is thrown.
Comment 7 Tomas Pavek 2011-10-12 13:37:15 UTC
The test case is to move multiple components from a different layout to "free design". It works with just one component.

Fixed:
http://hg.netbeans.org/jet-main/rev/cd7b25e57178
Comment 8 Tomas Pavek 2011-10-12 13:38:15 UTC
*** Bug 203586 has been marked as a duplicate of this bug. ***
Comment 9 Quality Engineering 2011-10-14 15:00:21 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/cd7b25e57178
User: Tomas Pavek <tpavek@netbeans.org>
Log: #191874: forgot to set current space of multiple components comming from a different layout