Commit 0184a4e6 authored by Egor Ushakov's avatar Egor Ushakov
Browse files

IDEA-190076 Incorrect frame state after thread death

parent 383c2092
Branches unavailable Tags unavailable
No related merge requests found
Showing with 14 additions and 5 deletions
+14 -5
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment