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 114086 - Assertion thrown while layout changed from Absolute to Free
Summary: Assertion thrown while layout changed from Absolute to Free
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
Depends on:
Reported: 2007-08-29 08:49 UTC by Jiri Vagner
Modified: 2009-05-25 20:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

exception.txt (2.49 KB, text/plain)
2007-08-29 08:51 UTC, Jiri Vagner

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Vagner 2007-08-29 08:49:37 UTC
IDE throws assertion error after changing AbsoluteLayout to Free Design.

Steps to reproduce:
 - create java app project
 - add jframe form
 - add jpanel component
 - in Inspector window change layout to AbsoluteLayout
 - now try to change layout to Free Design -> assertion is thrown
 - try to click on AbsoluteLayout node in Inspector -> NPE is thrown

	at org.netbeans.modules.form.layoutdesign.LayoutModel.addInterval(
	at org.netbeans.modules.form.layoutdesign.LayoutDesigner.addToEmpty(
	at org.netbeans.modules.form.layoutdesign.LayoutDesigner.copyLayoutFromOutside(
	at org.netbeans.modules.form.actions.SelectLayoutAction.convertToNewLayout(

Product Version: NetBeans IDE Dev (Build 200708202346)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)
Comment 1 Jiri Vagner 2007-08-29 08:51:11 UTC
Created attachment 47685 [details]
Comment 2 Jan Stola 2007-09-07 10:28:29 UTC
The assertion complains about addition of layout interval that already has a parent. The problematic layout interval is 
horizontal/vertical interval of some layout component. The root of the problem seems to be the fact that layout 
intervals of layout components are not removed from their parent when layout of their container is switched from Free 
Design to another layout.

Note that this scenario exhibits also another problem - the position of the components is not kept when layout is 
switched from Free Design to absolute layout.
Comment 3 Petr Dvorak 2008-04-29 09:54:26 UTC
Product Version: NetBeans IDE Dev (Build 200804290004)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb)

I did not manage to reproduce the issue using above mentioned steps. Isn't it already fixed, Jirka (or Honza)? Neither
assertion nor NPE was thrown when I followed the steps, but maybe there is just some detail needed that was not mentioned...