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 213788

Summary: com.sun.jdi.IncompatibleThreadStateException at com.sun.tools.jdi.ThreadReferenceImpl.privateFrames
Product: debugger Reporter: mjr_1974 <mjr_1974>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal CC: bburette, mgoe
Priority: P3    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 189188
Attachments: stacktrace

Description mjr_1974 2012-06-07 23:55:03 UTC
This bug was originally marked as duplicate of bug 156408, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.1.2 (Build 201204101705)
VM: Java HotSpot(TM) 64-Bit Server VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b04
OS: Linux

User Comments:
bburette: Debugging

mjr_1974: debugging swing code

GUEST: When debugging an application (Netbeans 6.8), if the debugger options are set to:
"New breakpoints suspend all threads" and "Steps resume all threads"

Anytime you single step after hitting a breakpoint, the application continues as if continue were hit instead of single stepping.

This is reproducible even with a very simple hellp world application.

There appears to be an existing bug on this, # 156408, but apperantly they couldn't reproduce it. I believe the abocve debugger settings ("New breakpoints suspend all threads" and "Steps resume all threads") are the key to being able to reproduce this.

The following exception also appears in the IDE log:

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:132)
	at org.netbeans.modules

GUEST: while debugging liferay 
tomcat version 6.0
liferay version 5.2
attach debugger at port 11500

bburette: Stepping over while debugging

bburette: Debugging program, the debugger apparently crashed and the debugee has been terminated.




Stacktrace: 
com.sun.jdi.IncompatibleThreadStateException
   at com.sun.tools.jdi.ThreadReferenceImpl.privateFrames(ThreadReferenceImpl.java:436)
   at com.sun.tools.jdi.ThreadReferenceImpl.frame(ThreadReferenceImpl.java:355)
   at org.netbeans.modules.debugger.jpda.jdi.ThreadReferenceWrapper.frame(ThreadReferenceWrapper.java:165)
   at org.netbeans.modules.debugger.jpda.actions.StepActionProvider.setLastOperation(StepActionProvider.java:512)
   at org.netbeans.modules.debugger.jpda.actions.StepActionProvider.setLastOperation(StepActionProvider.java:502)
   at org.netbeans.modules.debugger.jpda.actions.StepActionProvider.exec(StepActionProvider.java:367)
Comment 1 mjr_1974 2012-06-07 23:55:08 UTC
Created attachment 120528 [details]
stacktrace
Comment 2 Martin Entlicher 2012-11-23 17:47:55 UTC
Fixed by changeset:   240841:b54cf67c8495
http://hg.netbeans.org/core-main/rev/b54cf67c8495
Comment 3 Quality Engineering 2012-11-25 03:10:14 UTC
Integrated into 'main-golden', will be available in build *201211250002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b54cf67c8495
User: mentlicher@netbeans.org
Log: #213788: Use the event's thread instead of the step request's thread to be sure... Also, check the thread's state.