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 158750

Summary: com.sun.jdi.IncompatibleThreadStateException at com.sun.tools.jdi.ThreadReferenceImpl.privateFrames
Product: debugger Reporter: Filip Zamboj <fzamboj>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: CLOSED FIXED    
Severity: blocker CC: hendrikf, pavaneshwar
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=145300
Issue Type: DEFECT Exception Reporter: 145300
Attachments: stacktrace

Description Filip Zamboj 2009-02-18 15:28:15 UTC
Build: NetBeans IDE Dev (Build 200902180201)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-ea-b03
OS: Linux, 2.6.27-11-generic, amd64

User Comments:
fzamboj: This one happened when I was stepping over method in java.awt.Container.java

sreimers: Stepping over in debugger

cyhelsky: on step over while debugging netbeans

fzamboj: This one happened when I was stepping over method in java.awt.Container.java



Stacktrace: 
com.sun.jdi.IncompatibleThreadStateException
        at com.sun.tools.jdi.ThreadReferenceImpl.privateFrames(ThreadReferenceImpl.java:365)
        at com.sun.tools.jdi.ThreadReferenceImpl.frame(ThreadReferenceImpl.java:277)
        at org.netbeans.modules.debugger.jpda.jdi.ThreadReferenceWrapper.frame(ThreadReferenceWrapper.java:118)
        at org.netbeans.modules.debugger.jpda.actions.StepActionProvider.exec(StepActionProvider.java:334)
        at org.netbeans.modules.debugger.jpda.util.Operator$1.run(Operator.java:327)
        at java.lang.Thread.run(Thread.java:619)
Comment 1 Filip Zamboj 2009-02-18 15:28:28 UTC
Created attachment 77109 [details]
stacktrace
Comment 2 Martin Entlicher 2009-02-25 14:11:15 UTC
The cause is likely the same as in issue #156408.

*** This issue has been marked as a duplicate of 156408 ***
Comment 3 limo42 2009-06-15 13:52:03 UTC
Either not fixed or mapping to here is incorrect, because there are two new duplicates of Exception Report #145300 in
6.7rc2.
Comment 4 Martin Entlicher 2009-06-15 14:34:15 UTC
Yes, since this still occurs, it does not seem to be fully fixed by issue #156408.
I wonder why exception reporter did not open it by itself.
Comment 5 Martin Entlicher 2009-06-30 14:40:00 UTC
*** Issue 167304 has been marked as a duplicate of this issue. ***
Comment 6 Martin Entlicher 2009-06-30 14:41:07 UTC
Similar problem can be encountered when a breakpoint is hit (see
http://www.netbeans.org/nonav/issues/showattachment.cgi/83750/stacktrace.txt).
Comment 7 Martin Entlicher 2009-07-02 15:18:54 UTC
A possible way how this can happen is:
1) A step is about to be finished or a breakpoint is about to be hit in a thread T.
2) User invokes Continue action
3) We notify thread T that it's about to be resumed (the thread is running anyway)
4) step finishes or breakpoint is hit and we start to explore stack frames
5) We call VirtualMachine.resume() which unexpectedly resumes the thread.

It looks like similar mechanism may cause method invocations to be unexpectedly paused by Pause action when it's invoked
while some method invocation is being performed.
Comment 8 Martin Entlicher 2009-07-07 15:47:20 UTC
Fixed in changeset:   137391:b8f16f4a60fa
http://hg.netbeans.org/main/rev/b8f16f4a60fa
Comment 9 Quality Engineering 2009-07-08 05:35:08 UTC
Integrated into 'main-golden', will be available in build *200907080200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b8f16f4a60fa
User: mentlicher@netbeans.org
Log: #158750 - Do not use VirtualMachine.resume() when there are running threads. If the threads hit an event, they get immediately resumed by this call and get out of control.
Comment 10 Quality Engineering 2010-04-29 09:48:05 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.