NationalSecurityAgency/ghidra · error · UnsupportedOperationException
Traces do not support externals
Error message
Traces do not support externals
What it means
Thrown as UnsupportedOperationException by getExternalManager because trace program views do not model external locations. Externals (library functions referenced but not defined in the program) are a regular-Program concept that traces intentionally do not support, since traces capture dynamic recorded state rather than static external-linkage metadata.
Source
Thrown at Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/program/DBTraceProgramView.java:786
@Override
public FunctionManager getFunctionManager() {
return functionManager;
}
@Override
public ProgramUserData getProgramUserData() {
// TODO Auto-generated method stub
return null;
}
@Override
public SymbolTable getSymbolTable() {
return symbolTable;
}
@Override
public ExternalManager getExternalManager() {
throw new UnsupportedOperationException("Traces do not support externals");
}
@Override
public EquateTable getEquateTable() {
return equateTable;
}
@Override
public DBTraceProgramViewMemory getMemory() {
return memory;
}
@Override
public ReferenceManager getReferenceManager() {
return referenceManager;
}
@OverrideView on GitHub (pinned to d5f144c24d)
Solutions
- Guard the call: check whether the program is a trace view (instanceof DBTraceProgramView) before calling getExternalManager().
- Branch your analysis to skip external handling entirely for trace program views.
- If you need externals, operate on the original static Program that the trace maps to, not the trace view itself.
Example fix
// before
ExternalManager ext = program.getExternalManager();
// after
if (!(program instanceof DBTraceProgramView)) {
ExternalManager ext = program.getExternalManager();
// ... use externals
} Defensive patterns
Strategy: validation
Validate before calling
// Avoid calling getExternalManager on trace program views
if (!(program instanceof DBTraceProgramView)) {
ExternalManager ext = program.getExternalManager();
} Type guard
static boolean isTraceProgramView(Program p) {
return p instanceof DBTraceProgramView;
} Prevention
- Type-check the Program before calling getExternalManager.
- Skip external-handling code for trace views.
- Access externals on the original static Program when needed.
When it happens
Trigger: Calling getExternalManager() on a DBTraceProgramView (the trace-backed Program implementation).
Common situations: Running generic Program-analysis tooling that unconditionally calls getExternalManager() on any Program, including trace views. Scripting that iterates external symbols/functions without checking the program type.
Related errors
- All trace memory is initialized
- Mapped blocks are not supported in traces
- Cannot use program view to set the trace name
- Region is from a forked snapshot
- More than one state is present in
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/5412f631e65e186c.
Report an issue: GitHub.