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 155344

Summary: LAYOUT: AssertionError when duplicating components
Product: guibuilder Reporter: pribyl <pribyl>
Component: Natural LayoutAssignee: issues@guibuilder <issues>
Status: RESOLVED FIXED    
Severity: blocker CC: alied, theanuradha
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=144294
Issue Type: DEFECT Exception Reporter: 144294
Bug Depends on:    
Bug Blocks: 136425    
Attachments: stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
Project that exhibits the error.

Description pribyl 2008-12-12 13:59:14 UTC
Build: NetBeans IDE Dev (Build 200812120201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b28
OS: Windows XP, 5.1, x86

User Comments:
pribyl: I duplicated a component (JButton), then selected both the original JButton and its duplicate and invoked "Duplicate" again -> this AssertionError was thrown



Stacktrace: 
java.lang.AssertionError
        at org.netbeans.modules.form.layoutdesign.LayoutModel.addInterval(LayoutModel.java:319)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.duplicateSequentially(LayoutDesigner.java:1831)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.duplicateLayout(LayoutDesigner.java:1717)
        at org.netbeans.modules.form.actions.DuplicateAction.duplicate(DuplicateAction.java:119)
        at org.netbeans.modules.form.actions.DuplicateAction.performAction(DuplicateAction.java:84)
        at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:581)
Comment 1 pribyl 2008-12-12 13:59:22 UTC
Created attachment 74910 [details]
stacktrace
Comment 2 Tomas Pavek 2008-12-12 14:11:07 UTC
Can you please attach the form where this happened? Or can it be reproduced in an empty form with just one button? 
Thanks
Comment 3 pribyl 2008-12-12 14:17:18 UTC
To reproduce, please use following steps:

1, Create new java project and create new JFrame Form file
2, Place new JPanel from the Palette to this form
3, Place a JButton under the JPanel
4, Select the JButton and select "Duplicate" from the popup menu
5, Select both JButtons and again invoke popup menu and select "Duplicate"

-> The Assertion Error is thrown
Comment 4 Jiri Vagner 2008-12-18 10:01:29 UTC
Reproducible

Product Version: NetBeans IDE Dev (Build 200812180201)
Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Comment 5 Jan Stola 2008-12-22 17:48:21 UTC
The stack trace is very similar to (already fixed issues) 145134 and 128426.

Steps to reproduce:
1. Place 3 buttons (into a column) into an empty form.
2. Select two of them and invoke Duplicate.
Comment 6 _ theanuradha 2009-04-29 06:04:02 UTC
Build: NetBeans IDE Dev (Build 090423)
VM: OpenJDK Client VM, 14.0-b10, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b01
OS: Windows XP, 5.1, x86

User Comments: 
Try to duplicate some controls 

Stacktrace: 
java.lang.AssertionError
        at org.netbeans.modules.form.layoutdesign.LayoutModel.addInterval(LayoutModel.java:319)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.duplicateSequentially(LayoutDesigner.java:1831)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.duplicateLayout(LayoutDesigner.java:1717)
        at org.netbeans.modules.form.actions.DuplicateAction.duplicate(DuplicateAction.java:119)
        at org.netbeans.modules.form.actions.DuplicateAction.performAction(DuplicateAction.java:84)
        at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:589)
Comment 7 _ theanuradha 2009-04-29 06:04:11 UTC
Created attachment 81159 [details]
stacktrace
Comment 8 alied 2009-10-07 04:47:18 UTC
Build: NetBeans IDE Dev (Build 200910061401)
VM: Java HotSpot(TM) Client VM, 16.0-b06, Java(TM) SE Runtime Environment, 1.7.0-ea-b66
OS: Windows Vista, 6.0, x86

User Comments: 


Stacktrace: 
java.lang.AssertionError
        at org.netbeans.modules.form.layoutdesign.LayoutModel.addInterval(LayoutModel.java:319)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.duplicateSequentially(LayoutDesigner.java:1827)
        at org.netbeans.modules.form.layoutdesign.LayoutDesigner.duplicateLayout(LayoutDesigner.java:1716)
        at org.netbeans.modules.form.actions.DuplicateAction.duplicate(DuplicateAction.java:119)
        at org.netbeans.modules.form.actions.DuplicateAction.performAction(DuplicateAction.java:92)
        at org.netbeans.modules.form.HandleLayer.processKeyEvent(HandleLayer.java:770)
Comment 9 alied 2009-10-07 04:47:22 UTC
Created attachment 88957 [details]
stacktrace
Comment 10 alied 2009-11-27 08:01:47 UTC
Created attachment 91784 [details]
stacktrace
Comment 11 Exceptions Reporter 2009-12-22 20:09:01 UTC
Created attachment 92878 [details]
stacktrace
Comment 12 Exceptions Reporter 2010-03-20 23:58:57 UTC
Created attachment 95493 [details]
stacktrace
Comment 13 asenk 2011-10-04 13:15:37 UTC
Still Valid

Product Version: NetBeans IDE Dev (Build 201110030601)
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 14 MackSix 2011-10-07 04:43:13 UTC
Created attachment 111624 [details]
Project that exhibits the error.

Choose filler2 and filler3, right click for pop-up menu, choose "Duplicate".

Product Version: NetBeans IDE Dev (Build 201110050601)
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 15 Tomas Pavek 2011-10-21 15:42:48 UTC
Fixed.
http://hg.netbeans.org/jet-main/rev/386d3a072ef1
Comment 16 Quality Engineering 2011-10-24 14:13:00 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/386d3a072ef1
User: Tomas Pavek <tpavek@netbeans.org>
Log: #155344: avoid attempts to duplicate components multiple times if in the same sequence