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 7.4 (Build 201310111528) VM: Java HotSpot(TM) Client VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18 OS: Windows 7 User Comments: GUEST: Debugging a project - stopped on a breakpoint - CPU was being hammered and I couldn't cancel the debug javydreamercsw: I guess ran out of RAM. GUEST: left it running for a couple of days. Stacktrace: java.lang.OutOfMemoryError: Java heap space at com.sun.tools.jdi.Packet.fromByteArray(Packet.java:114) at com.sun.tools.jdi.TargetVM.run(TargetVM.java:122) at java.lang.Thread.run(Thread.java:744)
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.