[hg] main-silver: #223439: Handle the case when the thread was a...

  • From:
  • To:
  • Subject: [hg] main-silver: #223439: Handle the case when the thread was a...
  • Date: Tue, 08 Jan 2013 16:36:03 -0800

changeset e0f87a0aa3e1 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/e0f87a0aa3e1
description:
        #223439: Handle the case when the thread was already resumed after 
the step by some other means.

diffstat:

 
debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
 |  13 ++++++++-
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (36 lines):

diff --git 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
--- 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
+++ 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java
@@ -378,13 +378,22 @@
         lock.lock();
         try {
             st.setInStep(false, null);
+            removeStepRequests (tr);
+            try {
+                boolean suspended = ThreadReferenceWrapper.isSuspended0(tr);
+                if (!suspended) {
+                    // The thread was already resumed in the mean time by 
someone else.
+                    return false;
+                }
+            } catch (IllegalThreadStateExceptionWrapper itsex) {
+                return false;
+            }
             /*if (stepWatch != null) {
                 stepWatch.done();
                 stepWatch = null;
             }*/
             String className = 
ReferenceTypeWrapper.name(LocationWrapper.declaringType(LocatableWrapper.location(event)));
             setLastOperation(tr);
-            removeStepRequests (tr);
             //S ystem.out.println("/nStepAction.exec");
 
             int suspendPolicy = getDebuggerImpl().getSuspend();
@@ -533,7 +542,7 @@
                     status == ThreadReference.THREAD_STATUS_ZOMBIE ||
                     status == ThreadReference.THREAD_STATUS_NOT_STARTED)) {
                     
-                    
Exceptions.printStackTrace(Exceptions.attachMessage(itsex, "Thread's status = 
"+status));
+                    
Exceptions.printStackTrace(Exceptions.attachMessage(itsex, "Thread's status = 
"+status+", suspended = "+ThreadReferenceWrapper.isSuspended0(tr)));
                 }
             } catch (IllegalThreadStateExceptionWrapper ex) {
                 // A bad state - ignore

[hg] main-silver: #223439: Handle the case when the thread was a...

mentlicher 01/09/2013

Project Features

About this Project

Debugger was started in November 2009, is owned by tpavek, and has 29 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close