JetBrains/intellij-community · warning · EvaluateException
Internal exception - invalid stackframe
Error message
Internal exception - invalid stackframe
What it means
NodeDescriptorImpl.updateRepresentationNoNotify catches InvalidStackFrameException — thrown by JDI when an operation references a StackFrame that is no longer valid (the thread resumed or popped its frame) — while computing a node label, and converts it into this EvaluateException. The node's label then shows the 'invalid stackframe' message instead of a value.
Source
Thrown at java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/NodeDescriptorImpl.java:73
myUserData.put(key, value);
}
public void updateRepresentation(EvaluationContextImpl context, DescriptorLabelListener labelListener) {
updateRepresentationNoNotify(context, labelListener);
labelListener.labelChanged();
}
public void updateRepresentationNoNotify(EvaluationContextImpl context, DescriptorLabelListener labelListener) {
try {
try {
myEvaluateException = null;
myLabel = calcRepresentation(context, labelListener);
}
catch (InconsistentDebugInfoException e) {
throw new EvaluateException(JavaDebuggerBundle.message("error.inconsistent.debug.info"));
}
catch (InvalidStackFrameException e) {
throw new EvaluateException(JavaDebuggerBundle.message("error.invalid.stackframe"));
}
catch (ObjectCollectedException e) {
throw EvaluateExceptionUtil.OBJECT_WAS_COLLECTED;
}
catch (VMDisconnectedException e) {
throw e;
}
catch (RuntimeException e) {
if (e.getCause() instanceof InterruptedException) {
throw e;
}
if (context != null && context.getVirtualMachineProxy().canBeModified()) { // do not care in read only vms
LOG.debug(e);
}
else {
LOG.warn(e);
}
throw new EvaluateException(JavaDebuggerBundle.message("internal.debugger.error"));View on GitHub (pinned to be881553f2)
Solutions
- Refresh the debugger view (click the frame/thread again in the Frames panel) to rebuild the tree against the current, valid frame
- Avoid evaluate-with-side-effects while the variables tree is updating; pause first, then evaluate
- If it happens constantly, disable asynchronous labels (Registry: debugger.async.stack.traces / related async label options) or update the IDE — races here have been fixed over versions
- Restart the debug session if the VM state is fully desynchronized
Defensive patterns
Strategy: try-catch
Validate before calling
// check frame validity before triggering label computation boolean frameValid = threadReference.isSuspended() && frame != null && frame.is_valid();
Try / catch
try {
descriptor.updateRepresentationNoNotify(context, listener);
} catch (EvaluateException e) {
// frame went invalid (thread resumed): simply skip — tree refresh will rebuild
} Prevention
- Do not resume/step while the Variables view is still loading
- Avoid debugger evaluations that invoke methods (they resume the thread) during tree updates
- Refresh the frames view after each step to resynchronize descriptors
When it happens
Trigger: The debugged thread resumed (step over/return, resume, evaluate expression with side effects) between the moment the variables tree queued label updates and the moment they ran; or the frame was invalidated by a breakpoint hit or frame pop while the tree was still refreshing.
Common situations: Rapidly stepping while the Variables view is still asynchronously computing labels; evaluating an expression that resumes the thread (method invocation in the debugger); breakpoints that trigger during label evaluation; race after VM resume.
Related errors
- Inconsistent debug information
- Thread has been collected
- Interface method invocation is not supported in JVM {}. Use
- Cannot construct wrapper object for value of type {}: Unable
- Cannot convert to primitive value of type
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/e875469ac0dcf1d1.
Report an issue: GitHub.