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.
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 java.lang.AssertionError at org.netbeans.modules.form.layoutdesign.LayoutModel.addInterval(LayoutModel.java:286) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.addToEmpty(LayoutDesigner.java:834) at org.netbeans.modules.form.layoutdesign.LayoutDesigner.copyLayoutFromOutside(LayoutDesigner.java:1580) at org.netbeans.modules.form.actions.SelectLayoutAction.convertToNewLayout(SelectLayoutAction.java:262) .... 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)
Created attachment 47685 [details] exception.txt
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.
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...