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 177935 - [68cat] AssertionError at org.netbeans.modules.form.layoutdesign.LayoutModel.addInterval
Summary: [68cat] AssertionError at org.netbeans.modules.form.layoutdesign.LayoutModel....
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks: 136425
  Show dependency tree
 
Reported: 2009-12-01 09:38 UTC by alied
Modified: 2011-10-25 14:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 163205


Attachments
stacktrace (2.52 KB, text/plain)
2009-12-01 09:38 UTC, alied
Details
package currently being edited where the exception raises (22.07 KB, application/zip)
2009-12-01 12:00 UTC, alied
Details
Project that exhibits the error. (24.26 KB, application/zip)
2011-10-13 13:40 UTC, MackSix
Details
Screenshot of action. (173.70 KB, image/png)
2011-10-13 13:40 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2009-12-01 09:38:46 UTC
This bug was originally marked as duplicate of bug 148004, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 200912010200)
VM: Java HotSpot(TM) Client VM, 17.0-b05, Java(TM) SE Runtime Environment, 1.7.0-ea-b76
OS: Windows Vista, 6.0, x86

User Comments:
alied: resizing a JLabel within a panel within a panel

alied: resizing a Jlabel

alied: resizing a JLabel within a Panel.

alied: ERRATA: BS does raises the exception

GUEST: 1. Generated default java app.
2. Added text box to center top in design view
3. Resized text box to 125,22 in properties dialog
4. Duplicated text box 
5. Duplicated 2nd text box
6. Added button to right of top text box
7. Edited button text (5 characters)
8. Duplicated button
9. Changed 2nd button text (11 characters)
11. Attempted to resize top button using click-drag motion



Stacktrace: 
java.lang.AssertionError
        at org.netbeans.modules.form.layoutdesign.LayoutModel.addInterval(LayoutModel.java:319)
        at org.netbeans.modules.form.layoutdesign.LayoutFeeder.addToGroup(LayoutFeeder.java:1043)
        at org.netbeans.modules.form.layoutdesign.LayoutFeeder.addInterval(LayoutFeeder.java:754)
        at org.netbeans.modules.form.layoutdesign.LayoutFeeder.add(LayoutFeeder.java:311)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.addComponents(LayoutDesigner.java:825)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.endMoving(LayoutDesigner.java:750)
Comment 1 alied 2009-12-01 09:38:49 UTC
Created attachment 91948 [details]
stacktrace
Comment 2 Tomas Pavek 2009-12-01 10:08:10 UTC
alied, there are several reports of this exception from you. Do you still have the GUI form on which it can be reproduced? Could you attach it here or send? It would help a lot, thanks.
Comment 3 alied 2009-12-01 10:46:00 UTC
Last one was not in a form. It was on a plain java class
anyway, I'll find the form in which originatelly I raised the exception
Comment 4 alied 2009-12-01 12:00:00 UTC
Created attachment 91954 [details]
package currently being edited where the exception raises

This exception was raised very similarly to https://netbeans.org/bugzilla/show_bug.cgi?id=177921, but insead of an error line, i was editing a line with no error. Couldn't tell how it got to de Swing designer.
Comment 5 Tomas Pavek 2011-02-01 16:44:17 UTC
Steps to reproduce:
* Add two textfields in a column, left aligned, e.g. near top center of the form.
* Add a button right of the first text field.
* Press Ctrl-D on the button (duplicate).
* Try to resize the duplicated button.
Comment 6 asenk 2011-10-05 09:06:59 UTC
Still valid 

Product Version: NetBeans IDE Dev (Build 201110040601)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)
Comment 7 MackSix 2011-10-13 13:40:03 UTC
Created attachment 112001 [details]
Project that exhibits the error.

1) Open attached Project.
2) Open NewJFrame.java in designer.
3) Try to move scrollPane1 down and to the right.
4) Attempt to snap-to guide on textArea1 as shown in attached screenshot.

This NullPointerException it thrown.

Product Version: NetBeans IDE Dev (Build 201110120600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 8 MackSix 2011-10-13 13:40:41 UTC
Created attachment 112002 [details]
Screenshot of action.
Comment 9 Tomas Pavek 2011-10-21 16:06:24 UTC
This was reproducible, but I can't reproduce now in build from current sources. Much likely fixed together with some other bug.

MackSix, your test case from Comment #7 is completely unrelated. There is no Duplicate action in it as in the original steps, and your claimed NullPointerException does not match the AssertionError reported here. Anyway, trying the case the NPE is not thrown anymore, the moved component just jumps to a different location. You may want to file a separate bug for that. Thanks
Comment 10 MackSix 2011-10-21 23:50:37 UTC
(In reply to comment #9)
> This was reproducible, but I can't reproduce now in build from current sources.
> Much likely fixed together with some other bug.
> 
> MackSix, your test case from Comment #7 is completely unrelated. There is no
> Duplicate action in it as in the original steps, and your claimed
> NullPointerException does not match the AssertionError reported here. Anyway,
> trying the case the NPE is not thrown anymore, the moved component just jumps
> to a different location. You may want to file a separate bug for that. Thanks

Not sure how I got here with it. It may have been confusing multiple tabs open in FireFox. It should have gone with http://netbeans.org/bugzilla/show_bug.cgi?id=193928 

which you have marked fixed.

Thank you! :)
Comment 11 Quality Engineering 2011-10-25 14:33:06 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/ea3c6f4b2edb
User: Tomas Pavek <tpavek@netbeans.org>
Log: #177608: better detection of same overlapping situation (before vs after move)
#177935: don't use the original "close" position if the new one is in the same group but narrower