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.
I was executing the steps of this test: http://services.netbeans.org/synergy/client/app/index.html#/case/1306/suite/1073/v/1 In step 5, when dragging the components outside of the panel, the exception below occurred. The components returned to their previous position after I closed the exception reporter. Reported at http://statistics.netbeans.org/analytics/exception.do?id=786750 java.lang.AssertionError at org.netbeans.modules.form.layoutdesign.LayoutInterval.getCurrentSpace(LayoutInterval.java:503) at org.netbeans.modules.form.layoutdesign.LayoutInterval.getCurrentPositions(LayoutInterval.java:1024) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.restrictedCopy(LayoutDesigner.java:1142) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.restrictedCopy(LayoutDesigner.java:1045) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.restrictedCopy(LayoutDesigner.java:1045) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving(LayoutDesigner.java:799) at org.netbeans.modules.form.HandleLayer$ExistingComponentDrag.end(HandleLayer.java:3052) at org.netbeans.modules.form.HandleLayer$ComponentDrag.end(HandleLayer.java:2765) at org.netbeans.modules.form.HandleLayer.endDragging(HandleLayer.java:1379) at org.netbeans.modules.form.HandleLayer.mouseReleased(HandleLayer.java:1933) at java.awt.Component.processMouseEvent(Component.java:6525) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6290) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4881) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.LightweightDispatcher.retargetMouseEvent(LightweightDispatcher.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(LightweightDispatcher.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(LightweightDispatcher.java:4462) ....
The same exception happens if I move a single JButton from the JPanel to the outer JFrame too.
Ah, I see I was a little hasty in creating this issue manually to get a bug number... the automatically reported bug related to this one is Bug 253743. :)
Any chance you have a GUI form at a state from which the exception can be reproduced?
Created attachment 154864 [details] Java class of file to reproduce issue
Created attachment 154865 [details] Form file to reproduce issue Please see attached the frame I was busy testing on. When I started up the IDE again, I had to drag and drop various things before the assertion happened, so difficult to tell you exactly what to do. But at this moment, if I move jButton4 onto jPanel1, I get the error.
Thanks for trying to give us a test sample. Looks like in the case of the attached form the problematic operation causing the error happened just before moving jButton4. That put the layout structure around jButton4 into a bad state that led to the exception when trying to move jButton4. I guess you don't remember anymore what the last move before that was? According to the wrong space element that was left (in vertical dimension) it was likely a JLabel component (vertically somewhere between jButton4 and jRadioButton1). I've tried to simulate that myself, but no luck so far. That superfluous space element can be seen in the form file, but it gets joined with the adjacent spaces when the GUI form is opened, so the exception cannot be reproduced simply by opening the form and moving the jButton4. The mystery is how this space joining mechanism was not applied after the last move that preceded the failing jButton4 move... In either case, if you were still willing to play with this and able to reproduce, if you get this exception again, we'd need you to do undo one step and tell us what the lats but one operation was (in fact you can save the form after the exception happened, copy the files elsewhere, then undo and again save the files, so having the form in the state before and after). Thanks.
I will have some time to test on Friday. Will give you feedback then. :)
OK, I think I have a better test case for you. :) Attachments to follow. Start with the Step 1 class and form. Select jLabel1, jButton4 and jTextField1, and drag them all together off the panel directly onto the JFrame. This results in the files that I will call Step 2 when I upload them. Then move them again, without closing the form file, say a little bit to the right (still on the JFrame). The error occurs.
Created attachment 155094 [details] Step 1 form
Created attachment 155095 [details] Step 1 java
Created attachment 155096 [details] Step 2 form
Created attachment 155097 [details] Step 2 java
Great, I can reproduce the bug now. Thanks a lot for finding the test case!
(In reply to Tomas Pavek from comment #13) > Great, I can reproduce the bug now. Thanks a lot for finding the test case! Glad I could help! :D
Fixed. http://hg.netbeans.org/jet-main/rev/03a60a1e0c1c
Integrated into 'main-silver', will be available in build *201509090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/03a60a1e0c1c User: Tomas Pavek <tpavek@netbeans.org> Log: #253745: fixing case of dissolving a sequential group that might leave two consecutive gaps
*** Bug 253743 has been marked as a duplicate of this bug. ***