Bug 465366 - DE in JDIStackFrame.getUnderlyingStackFrame (1151)
Change-Id: I9364807c2b1897279d3ab6d6cff7cb5e13db902e
Signed-off-by: Sarika Sinha <sarika.sinha@in.ibm.com>
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
index a95ed02..32e8cc5 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
@@ -1308,11 +1308,12 @@
// re-index stack frames - See Bug 47198
fThread.computeStackFrames();
if (fDepth == -1) {
+ // try it once more before throwing error
+ fThread.computeStackFrames();
+ if (fDepth == -1) {
// If depth is -1, then this is an invalid frame
- throw new DebugException(new Status(IStatus.ERROR,
- JDIDebugPlugin.getUniqueIdentifier(),
- IJavaStackFrame.ERR_INVALID_STACK_FRAME,
- JDIDebugModelMessages.JDIStackFrame_25, null));
+ throw new DebugException(new Status(IStatus.ERROR, JDIDebugPlugin.getUniqueIdentifier(), IJavaStackFrame.ERR_INVALID_STACK_FRAME, JDIDebugModelMessages.JDIStackFrame_25, null));
+ }
}
} else {
throw new DebugException(new Status(IStatus.ERROR,