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 242054 - StackOverflowError at com.sun.tools.jdi.ReferenceTypeImpl.methods
Summary: StackOverflowError at com.sun.tools.jdi.ReferenceTypeImpl.methods
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: 8.0_HR_FIX
: 242192 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-18 14:07 UTC by Alexander Simon
Modified: 2014-02-26 03:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 207734


Attachments
stacktrace (104.62 KB, text/plain)
2014-02-18 14:07 UTC, Alexander Simon
Details
stacktrace (104.01 KB, text/plain)
2014-02-21 12:52 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2014-02-18 14:07:45 UTC
Build: NetBeans IDE Dev (Build 20140218-327ae9d967a5)
VM: Java HotSpot(TM) Client VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: SunOS

User Comments:
alexvsimon: IDE debugger cannot work with StackOverflowError exeption due to ErrStackOverflowError in debugger ;-)




Stacktrace: 
java.lang.StackOverflowError
   at com.sun.tools.jdi.ReferenceTypeImpl.methods(ReferenceTypeImpl.java:454)
   at com.sun.tools.jdi.InterfaceTypeImpl.addVisibleMethods(InterfaceTypeImpl.java:94)
   at com.sun.tools.jdi.ClassTypeImpl.addVisibleMethods(ClassTypeImpl.java:395)
   at com.sun.tools.jdi.ClassTypeImpl.addVisibleMethods(ClassTypeImpl.java:400)
   at com.sun.tools.jdi.ClassTypeImpl.addVisibleMethods(ClassTypeImpl.java:400)
   at com.sun.tools.jdi.ClassTypeImpl.addVisibleMethods(ClassTypeImpl.java:400)
Comment 1 Alexander Simon 2014-02-18 14:07:47 UTC
Created attachment 145359 [details]
stacktrace
Comment 2 Alexander Simon 2014-02-19 07:19:02 UTC
My steps were:
- set exception "java.lang.StackOverflowError" breakpoint.
- start application which has an infinite recursion.
- IDE stops on java.lang.StackOverflowError
Result:
- some IDE views hung: debugging view, variables view
- cannot stop debugging
Comment 3 Alexander Simon 2014-02-21 12:49:58 UTC
P2 because IDE cannot debug StackOverflowError
Comment 4 Alexander Simon 2014-02-21 12:51:27 UTC
*** Bug 242192 has been marked as a duplicate of this bug. ***
Comment 5 Alexander Simon 2014-02-21 12:52:42 UTC
Created attachment 145469 [details]
stacktrace

cannot debug
Comment 6 Martin Entlicher 2014-02-24 06:32:12 UTC
Fixed by changeset:   272594:0f9031d1f5ae
http://hg.netbeans.org/core-main/rev/0f9031d1f5ae
Comment 7 Martin Entlicher 2014-02-24 11:19:34 UTC
Worth to fix into 8.0, IMHO.
Comment 8 Jaroslav Havlin 2014-02-24 14:41:19 UTC
> Worth to fix into 8.0, IMHO.
I agree. The commit looks fine to me.
Comment 9 Jiri Kovalsky 2014-02-24 17:47:29 UTC
The behavior is better with the fix than without it. IDE is usable. Debugging session is finishable. However, both "Variables" and "Debugging" views refresh themselves after 1/2 a minute with the example below. I approve the fix for integration into the release80 branch though. Thanks!


public static void main(String[] args) {
  new JavaApplication().start(0);
}

private void start(int i) {
  if (i < 0) return;
  start(i + 1);
}
Comment 10 Jiri Kovalsky 2014-02-24 18:04:28 UTC
Verified in NetBeans IDE Dev (Build Trunk-Build-792-on-20140224).
Comment 11 Martin Entlicher 2014-02-24 18:09:49 UTC
Thanks for the review and verification, the fix is pushed into release80 branch:
changeset:   281372:c209f8ad6136
http://hg.netbeans.org/releases/rev/c209f8ad6136
Comment 12 Quality Engineering 2014-02-25 01:36:20 UTC
Integrated into 'releases/release80', will be available in build *201402242200* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/c209f8ad6136
User: mentlicher@netbeans.org
Log: #242054: Prevent from looping when invocation exception is thrown from methods on an exception. Also, handle frequent refreshes of debugging view (that happen on long stack traces) more efficiently.
(transplanted from 0f9031d1f5aee0fc579d6a56624b5eacde1f23b1)
Comment 13 Quality Engineering 2014-02-26 03:04:06 UTC
Integrated into 'main-silver', will be available in build *201402260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0f9031d1f5ae
User: mentlicher@netbeans.org
Log: #242054: Prevent from looping when invocation exception is thrown from methods on an exception. Also, handle frequent refreshes of debugging view (that happen on long stack traces) more efficiently.