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.
Summary: | OutOfMemoryError: Java heap space | ||
---|---|---|---|
Product: | debugger | Reporter: | javydreamercsw <javydreamercsw> |
Component: | Java | Assignee: | Martin Entlicher <mentlicher> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 205301 |
Attachments: | stacktrace |
Description
javydreamercsw
2014-02-14 19:28:45 UTC
Created attachment 145216 [details]
stacktrace
byte[]#10693 has 23M items. It is held by "JDI Target VM Interface" thread. Reassigning to debugger for further investigation. #712424: -Xmx256m - that won't work at all. Make it at least 1024m #725906: one mega long instance of StringReferenceImpl held in JPDAObjectWatchImpl.value - might be a duplicate of bug 240475 I've verified that this works in the current dev version. Most likely it was fixed by issue #240475. *** This bug has been marked as a duplicate of bug 240475 *** FYI: The program I was testing is: /** * @param args the command line arguments */ public static void main(String[] args) { bigStringWatch(); } private static void bigStringWatch() { String bigString = createString(134000000); int l = bigString.length(); bigString.hashCode(); // Line breakpoint here } private static String createString(int l) { char[] characters = new char[l]; for (int i = 0; i < l; i++) { String is = Integer.toString(i, 36); characters[i] = is.charAt(is.length() - 1); } return new String(characters); } with the line breakpoint at the comment. When the breakpoint was hit, I've added this expression to Watches: bigString.substring(1111, 120000000) The IDE, after GC, was consuming less memory, that is the retained size of the String. Therefore it's fixed. |