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.
Build: NetBeans IDE Dev (Build 200910191401) VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01 OS: Windows XP, 5.1, x86 User Comments: ovk: Form file, customizeer dialog (for table), entered too high value in "Count" field in 'Rows' tab Stacktrace: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2760) at java.util.Arrays.copyOf(Arrays.java:2734) at java.util.ArrayList.ensureCapacity(ArrayList.java:167) at java.util.ArrayList.add(ArrayList.java:370) at org.netbeans.modules.form.editors2.TableModelEditor$NbTableModel.addRow(TableModelEditor.java:658) at org.netbeans.modules.form.editors.TableCustomizer.ensureRowCount(TableCustomizer.java:1587)
Created attachment 89769 [details] stacktrace
Reproducible. On the other hand, this use case doesn't have much sense => lowering priority.
IMHO, since it is normally for prototype, the UI should have an validation about how many rows and columns it could accept. If user wish to define an higher value he should define it by code which avoid OOME in IDE. Maybe we can address it by some NetFIX member.
Honza Stola agreed to review and integrate possible patch coming from the NetFIX [1] team. [1] http://wiki.netbeans.org/NetFIX
How many rows and columns should we accept?
I would say not to be too much restrictive it could be like 50 columns and 100 rows? Or 100 x 100 maximum?
Created attachment 95459 [details] proposed patch I have limited the number of rows and columns to 100. If this is exceeded the the row/column spinner is reset to the previous safe value and an error message in red to that effect to output at the bottom of the dialog.
Honzo, can you please review and integrate the patch? Thanks!
I have applied the patch with several changes. There were few layout-related problems and it was possible to exceed the row/column limit using Insert button. These problems should be fixed now => marking the issue as fixed. Modified files: http://hg.netbeans.org/cdev/rev/93102bad00d5
Thank you Honzo and thanks to Daniel for his patch!