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 203321 - [71cat] AssertionError at org.netbeans.modules.form.layoutdesign.LayoutInterval.setMaximumSize
Summary: [71cat] AssertionError at org.netbeans.modules.form.layoutdesign.LayoutInterv...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 18:32 UTC by Michel Graciano
Modified: 2011-10-14 14:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 181757


Attachments
stacktrace (4.04 KB, text/plain)
2011-10-07 18:32 UTC, Michel Graciano
Details
Project that exhibits the error. (24.72 KB, application/zip)
2011-10-12 04:44 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2011-10-07 18:32:50 UTC
Build: NetBeans IDE Dev (Build 20111006-78c27130e457)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Linux

User Comments:
hmichel: Removing space around components




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.modules.form.layoutdesign.LayoutInterval.setMaximumSize(LayoutInterval.java:185)
   at org.netbeans.modules.form.layoutdesign.LayoutInterval.setSizes(LayoutInterval.java:202)
   at org.netbeans.modules.form.layoutdesign.LayoutModel.setIntervalSize(LayoutModel.java:488)
   at org.netbeans.modules.form.layoutdesign.LayoutDesigner.setIntervalSize(LayoutDesigner.java:4785)
   at org.netbeans.modules.form.layoutdesign.LayoutModel.setUserIntervalSize(LayoutModel.java:471)
   at org.netbeans.modules.form.actions.CustomizeEmptySpaceAction$EmptySpaceCustomizer.applyValues(CustomizeEmptySpaceAction.java:329)
Comment 1 Michel Graciano 2011-10-07 18:32:54 UTC
Created attachment 111673 [details]
stacktrace
Comment 2 Jan Stola 2011-10-09 14:36:35 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 the exception. Thank you in advance.
Comment 3 Tomas Pavek 2011-10-10 09:01:08 UTC
Actually this can happen when an empty space (gap) in the layout is defined as e.g. 100, 100, 100 instead of the usual use_pref, 100, use_pref and then trying to set it to default in the empty space customizer. Not sure how to create such gap setting, but it is valid. (For reproducibility can manually-edit the form file.)
Bug in LayoutModel.setUserIntervalSize().
Comment 4 Tomas Pavek 2011-10-10 12:07:32 UTC
The combination 100,100,100 is in fact considered undesirable, but probably may occur. Anyway, this case is easy to fix in LayoutModel.setUserIntervalSize().
Comment 5 MackSix 2011-10-12 04:44:38 UTC
Created attachment 111896 [details]
Project that exhibits the error.

1) Open attached project.
2) Open NewJFrame.java in Design View.
3) Highlight jSplitPane1, right click, choose "Space Around Component".
4) Set Left:Default Small, Right:Default, Top:Default, Bottom:Default Small.
5) Click "OK".

This AssertionError is thrown.
Comment 6 Tomas Pavek 2011-10-12 14:27:27 UTC
Fixed.
http://hg.netbeans.org/jet-main/rev/937f46c19f18
Comment 7 Quality Engineering 2011-10-14 14:58:03 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/937f46c19f18
User: Tomas Pavek <tpavek@netbeans.org>
Log: #203321: maximum size can't be default, also trying to make sure any explicit size is not used as maximum