diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerListingProvider.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerListingProvider.java index 90cc369b33..9054ae7f2b 100644 --- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerListingProvider.java +++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/listing/DebuggerListingProvider.java @@ -915,6 +915,9 @@ public class DebuggerListingProvider extends CodeViewerProvider { } protected void cleanMissingModuleMessages(Set affectedTraces) { + if (consoleService == null) { + return; + } nextCtx: for (ActionContext ctx : consoleService.getActionContexts()) { if (!(ctx instanceof DebuggerMissingModuleActionContext mmCtx)) { continue; diff --git a/Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/agent/DefaultTargetObject.java b/Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/agent/DefaultTargetObject.java index a381546f31..ef75886b17 100644 --- a/Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/agent/DefaultTargetObject.java +++ b/Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/agent/DefaultTargetObject.java @@ -198,7 +198,7 @@ public class DefaultTargetObject @Override public Map getCachedElements() { synchronized (model.lock) { - return Map.copyOf(elements); + return elements == null ? Map.of() : Map.copyOf(elements); } } @@ -394,7 +394,7 @@ public class DefaultTargetObject @Override public Map getCachedAttributes() { synchronized (model.lock) { - return Map.copyOf(attributes); + return attributes == null ? Map.of() : Map.copyOf(attributes); } } @@ -406,7 +406,8 @@ public class DefaultTargetObject @Override public Object getCachedAttribute(String name) { synchronized (model.lock) { - return attributes.get(name); + // Could get called during object's constructor + return attributes == null ? null : attributes.get(name); } }