Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 175012 - OutOfMemoryError: Java heap space
OutOfMemoryError: Java heap space
Product: guibuilder
Classification: Unclassified
Component: Code
All All
: P4 (vote)
: 6.x
Assigned To: Jan Stola
Depends on:
  Show dependency treegraph
Reported: 2009-10-20 14:36 UTC by Oleg Khokhlov
Modified: 2010-03-24 16:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

stacktrace (2.56 KB, text/plain)
2009-10-20 14:36 UTC, Oleg Khokhlov
proposed patch (30.04 KB, patch)
2010-03-19 20:21 UTC, dynamite
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Khokhlov 2009-10-20 14:36:45 UTC
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

java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(
        at java.util.Arrays.copyOf(
        at java.util.ArrayList.ensureCapacity(
        at java.util.ArrayList.add(
        at org.netbeans.modules.form.editors2.TableModelEditor$NbTableModel.addRow(
        at org.netbeans.modules.form.editors.TableCustomizer.ensureRowCount(
Comment 1 Oleg Khokhlov 2009-10-20 14:36:51 UTC
Created attachment 89769 [details]
Comment 2 Jan Stola 2009-10-20 15:09:10 UTC
Reproducible. On the other hand, this use case doesn't have much sense => lowering priority.
Comment 3 Michel Graciano 2009-10-20 16:18:56 UTC
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.
Comment 4 Jiri Kovalsky 2009-10-21 21:18:08 UTC
Honza Stola agreed to review and integrate possible patch coming from the NetFIX [1] team.

Comment 5 Michel Graciano 2010-01-25 16:04:31 UTC
How many rows and columns should we accept?
Comment 6 Jiri Kovalsky 2010-01-26 04:47:32 UTC
I would say not to be too much restrictive it could be like 50 columns and 100 rows? Or 100 x 100 maximum?
Comment 7 dynamite 2010-03-19 20:21:36 UTC
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.
Comment 8 Jiri Kovalsky 2010-03-22 14:21:03 UTC
Honzo, can you please review and integrate the patch? Thanks!
Comment 9 Jan Stola 2010-03-23 16:20:26 UTC
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:
Comment 10 Jiri Kovalsky 2010-03-24 16:14:22 UTC
Thank you Honzo and thanks to Daniel for his patch!

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo