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 165269 - StackOverflowError at org.netbeans.lib.profiler.results.cpu.cct.CPUCCTWalker
Summary: StackOverflowError at org.netbeans.lib.profiler.results.cpu.cct.CPUCCTWalker
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: J Bachorik
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-15 12:39 UTC by matusdekanek
Modified: 2011-10-04 14:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 143747


Attachments
stacktrace (106.32 KB, text/plain)
2009-05-15 12:39 UTC, matusdekanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matusdekanek 2009-05-15 12:39:48 UTC
Build: NetBeans IDE Dev (Build 200905121401)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: SunOS, 5.11, x86

User Comments:
matusdekanek: waiting for the sample aplication (netbeans module|paint application) to end

GUEST: Happened when profiling a simple program with a recursive call (100000 deep). Probably the depth of the recursion caused the problem.



Stacktrace: 
java.lang.StackOverflowError
        at java.util.Vector.addElement(Vector.java:573)
        at java.util.Stack.push(Stack.java:50)
        at org.netbeans.lib.profiler.results.cpu.cct.CCTFlattener.visit(CCTFlattener.java:228)
        at org.netbeans.lib.profiler.results.cpu.cct.CompositeCPUCCTWalker.visit(CompositeCPUCCTWalker.java:90)
        at org.netbeans.lib.profiler.results.cpu.cct.nodes.MethodCPUCCTNode.accept(MethodCPUCCTNode.java:110)
        at org.netbeans.lib.profiler.results.cpu.cct.nodes.BaseCPUCCTNode$ArrayChildren.accept(BaseCPUCCTNode.java:71)
Comment 1 matusdekanek 2009-05-15 12:39:53 UTC
Created attachment 82186 [details]
stacktrace
Comment 2 Andrei Chistiakov 2009-05-17 21:55:48 UTC
Reassigning to profiler
Comment 3 Jiri Sedlacek 2009-06-08 12:25:46 UTC
Not for 6.7.

As a workaround increasing the stack size should help: -Xss (http://forums.sun.com/thread.jspa?threadID=187774&forumID=27).
Comment 4 mzav 2011-07-04 14:04:14 UTC
I have similar problem when I try to profile a java code from http://developers.slashdot.org/story/11/06/15/0242237/C-the-Clear-Winner-In-Googles-Language-Performance-Tests

There is a little difference in my scenario - I do not see the exception.
I use -Xss20000k.
Program is normally terminated (according to my traces), CPU activity stays 0%, but I never have results of profiling. Profiler is reported as "running...".
I've detected that there is a recursive function in the code - doDFS - with very big depth. When I artifically limit the depth (1000) - profiler works.

This problem exists both on 6.9 and 7.0.1 RC1

Could you advise please.
Thanks,
Michael.
Comment 5 J Bachorik 2011-09-30 14:59:48 UTC
Fixed in http://hg.netbeans.org/profiler-main/rev/4afb0572131e

Replacing recursion based RuntimeCCTNode visitor implementation in favor of linearized hierarchy processor.
Comment 6 Quality Engineering 2011-10-04 14:08:03 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/4afb0572131e
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #165269: Replacing recursion based RuntimeCCTNode visitor implementation in favor of linearized hierarchy processor