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 210615 - OutOfMemoryError: Java heap space
Summary: OutOfMemoryError: Java heap space
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
: 224572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-03 12:59 UTC by williambacchi
Modified: 2013-01-10 03:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 186604


Attachments
stacktrace (2.09 KB, text/plain)
2012-04-03 12:59 UTC, williambacchi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description williambacchi 2012-04-03 12:59:51 UTC
Build: NetBeans IDE Dev (Build 201203280401)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b05
OS: Windows XP

User Comments:
williambacchi: watching a very long string in a variable while debugging




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:2367)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
   at java.lang.StringBuilder.append(StringBuilder.java:132)
   at org.netbeans.modules.debugger.jpda.models.AbstractVariable.getValue(AbstractVariable.java:165)
Comment 1 williambacchi 2012-04-03 12:59:54 UTC
Created attachment 117737 [details]
stacktrace
Comment 2 Martin Entlicher 2012-04-10 09:59:27 UTC
The heap dump is incomplete, but we can see five large Strings there, having 33.5 MB each and the reference chain.
We need to improve handling of large Strings, not to load them all into the memory. Something was already done in that area, but apparently, it's not enough.
Comment 3 Martin Entlicher 2013-01-07 14:13:07 UTC
*** Bug 224572 has been marked as a duplicate of this bug. ***
Comment 4 Martin Entlicher 2013-01-09 13:23:20 UTC
Fixed by changeset:   244211:e8257225118a
http://hg.netbeans.org/core-main/rev/e8257225118a
Comment 5 Quality Engineering 2013-01-10 03:33:59 UTC
Integrated into 'main-golden', will be available in build *201301100107* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e8257225118a
User: mentlicher@netbeans.org
Log: #210615: Cut the retrieved String if it's too long to limit the memory consumption.