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 240227

Summary: OutOfMemoryError: Java heap space
Product: profiler Reporter: Jiri Skrivanek <jskrivanek>
Component: EngineAssignee: Tomas Hurka <thurka>
Status: VERIFIED FIXED    
Severity: normal CC: anebuzelsky, mmirilovic
Priority: P1 Keywords: JDK_8, JDK_SPECIFIC, VISUALVM
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 206454
Attachments: stacktrace

Description Jiri Skrivanek 2014-01-10 15:46:01 UTC
This issue was reported manually by jskrivanek.
It already has 1 duplicates 


Build: NetBeans IDE 8.0 Beta (Build 201401091443)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b65, Java(TM) SE Runtime Environment, 1.8.0-ea-b122
OS: Windows 7

User Comments:
jskrivanek: My steps were:

- create Anagram game sample
- start profiling (CPU, Advanced)
- open Live Results
- when profiling is in progress click Configure in Profiler view
- select Memory, Advanced, tick all check boxes
- while instrumenting it throws OOME




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:3326)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:421)
   at java.lang.StringBuilder.append(StringBuilder.java:136)
   at org.netbeans.core.startup.logging.PrintStreamLogger.print(PrintStreamLogger.java:108)
Comment 1 Jiri Skrivanek 2014-01-10 15:46:03 UTC
Created attachment 143801 [details]
stacktrace
Comment 2 Jiri Skrivanek 2014-01-10 15:54:42 UTC
Reproducible always with steps:

- create Anagram game sample
- start profiling (Memory, Advanced, tick all check boxes)
- while instrumenting it throws OOME
Comment 3 Tomas Hurka 2014-01-10 16:35:13 UTC
I am not able to reproduce it on Mac OS X with JDK 7.
Comment 4 Jiri Skrivanek 2014-01-10 19:03:32 UTC
Yes, with JDK7 it works. You have to try Windows 7 and JDK 1.8.0-ea-b122.
Comment 5 Tomas Hurka 2014-01-10 19:34:26 UTC
Ok, to reproduce it, _profiled_ application must run JDK 8 b122. It is irrelevant what JDK is used for NetBeans.
Comment 6 Tomas Hurka 2014-01-11 10:46:37 UTC
Fixed in profiler-main

changeset:   269742:88f6120c04f4
user:        Tomas Hurka <thurka@netbeans.org>
date:        Sat Jan 11 11:43:43 2014 +0100
summary:     bugfix #240227, size of invokedynamic instruction added
Comment 7 Jiri Skrivanek 2014-01-13 08:30:54 UTC
Verified in NetBeans IDE Dev (Build 201401130002).
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b65
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b122
Comment 8 Tomas Hurka 2014-01-13 08:33:28 UTC
Fixed in release80_beta branch:

changeset:   279118:7a9ebd1cfcd4
branch:      release80_beta
parent:      278980:4e5a48c82721
user:        Tomas Hurka <thurka@netbeans.org>
date:        Sat Jan 11 11:43:43 2014 +0100
summary:     bugfix #240227, size of invokedynamic instruction added
Comment 9 Jiri Skrivanek 2014-01-15 11:51:25 UTC
Verified in NetBeans IDE 8.0 Beta (Build 201401141042).
Comment 10 Petr Cyhelsky 2014-03-05 16:12:30 UTC
*** Bug 233781 has been marked as a duplicate of this bug. ***