From 0173a138310a84f21d9042cd5073cb53f9cc023f Mon Sep 17 00:00:00 2001 From: Karoliine Holter Date: Thu, 31 Oct 2024 21:52:05 +0200 Subject: [PATCH] When setting a breakpoint to the paper demo on line 21, stepping results in an "internal error" --- .../java/abstractdebugging/AbstractDebuggingServer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/abstractdebugging/AbstractDebuggingServer.java b/src/main/java/abstractdebugging/AbstractDebuggingServer.java index ccc7afd..382a87f 100644 --- a/src/main/java/abstractdebugging/AbstractDebuggingServer.java +++ b/src/main/java/abstractdebugging/AbstractDebuggingServer.java @@ -811,9 +811,11 @@ private void stepAllThreadsIntoMatchingEdge(int primaryThreadId, EdgeInfo primar for (var step : steps) { ThreadState thread = step.getLeft(); EdgeInfo targetEdge = step.getRight(); - NodeInfo targetNode = resultsService.lookupNode(targetEdge.nodeId()); - boolean isNewThread = targetEdge instanceof FunctionCallEdgeInfo fce && fce.createsNewThread(); - thread.pushFrame(new StackFrameState(targetNode, false, thread.getCurrentFrame().getLocalThreadIndex() - (isNewThread ? 1 : 0))); + if (targetEdge != null) { + NodeInfo targetNode = resultsService.lookupNode(targetEdge.nodeId()); + boolean isNewThread = targetEdge instanceof FunctionCallEdgeInfo fce && fce.createsNewThread(); + thread.pushFrame(new StackFrameState(targetNode, false, thread.getCurrentFrame().getLocalThreadIndex() - (isNewThread ? 1 : 0))); + } } onThreadsStopped("step", primaryThreadId);