IDEA-190076 Incorrect frame state after thread death

This commit is contained in:
Egor Ushakov
2018-04-11 19:11:50 +03:00
parent 383c209272
commit 0184a4e611
3 changed files with 14 additions and 5 deletions
@@ -119,11 +119,12 @@ public class JavaExecutionStack extends XExecutionStack {
@Override
public void contextAction(@NotNull SuspendContextImpl suspendContext) {
if (container.isObsolete()) return;
if (!myThreadProxy.isCollected() && myDebugProcess.getSuspendManager().isSuspended(myThreadProxy)) {
int status = myThreadProxy.status();
if (!(status == ThreadReference.THREAD_STATUS_UNKNOWN) &&
!(status == ThreadReference.THREAD_STATUS_NOT_STARTED) &&
!(status == ThreadReference.THREAD_STATUS_ZOMBIE)) {
int status = myThreadProxy.status();
if (status == ThreadReference.THREAD_STATUS_ZOMBIE) {
container.errorOccurred(DebuggerBundle.message("frame.panel.thread.finished"));
}
else if (!myThreadProxy.isCollected() && myDebugProcess.getSuspendManager().isSuspended(myThreadProxy)) {
if (!(status == ThreadReference.THREAD_STATUS_UNKNOWN) && !(status == ThreadReference.THREAD_STATUS_NOT_STARTED)) {
try {
int added = 0;
Iterator<StackFrameProxyImpl> iterator = myThreadProxy.frames().iterator();
@@ -142,6 +142,13 @@ public class JavaStackFrame extends XStackFrame implements JVMStackFrameInfoProv
buildVariablesThreadAction(getFrameDebuggerContext(getDebuggerContext()), children, node);
node.addChildren(children, true);
}
@Override
protected void commandCancelled() {
if (!node.isObsolete()) {
node.addChildren(XValueChildrenList.EMPTY, true);
}
}
});
}
@@ -492,6 +492,7 @@ breakpoint.properties.panel.option.dependency.type.lable=After breakpoint was hi
watchs.add.text=Add to watches
breakpoint.properties.panel.option.suspend.default=Make De&fault
frame.panel.frames.not.available=Frames not available for unsuspended thread
frame.panel.thread.finished=Thread has finished execution
frame.panel.async.stacktrace=Async stacktrace
error.corrupt.debug.info=Debug info might be corrupt: {0}
action.kill.process.text=Kill Process