NationalSecurityAgency/ghidra · error · LoadException
No progam to associate with trace was given
Error message
No progam to associate with trace was given
What it means
LoadException thrown by TenetLoader when the DOMAIN_FILE_OPTION_NAME option is missing or blank. A Tenet trace is meaningless without a Program to associate it with, so the loader requires the user to name an existing program domain file. Note the message has a typo ('progam') in the source.
Source
Thrown at Ghidra/Debug/Debugger-importers/src/main/java/ghidra/app/util/opinion/TenetLoader.java:269
public int getTierPriority() {
return 0;
}
@Override
public LoadResults<? extends DomainObject> load(final ImporterSettings settings)
throws IOException, CancelledException, VersionException, LoadException {
Trace trace;
String programPath = null;
for (final Option option : settings.options()) {
final String name = option.getName();
if (name.equals(DOMAIN_FILE_OPTION_NAME)) {
programPath = (String) option.getValue();
}
}
if ((programPath == null) || programPath.isBlank()) {
throw new LoadException("No progam to associate with trace was given");
}
Msg.info(this, "Loading trace for %s".formatted(programPath));
final DomainFile df = settings.project().getProjectData().getFile(programPath);
if (!df.getContentType().equals(ProgramContentHandler.PROGRAM_CONTENT_TYPE)) {
throw new LoadException("Selected file is not a program");
}
Program program = null;
try {
program = (Program) df.getDomainObject(this, false, false, settings.monitor());
final long start = System.currentTimeMillis();
trace = loadTrace(settings.provider(), settings.importName(), program,
settings.consumer(), settings.log(), settings.monitor());
View on GitHub (pinned to d5f144c24d)
Solutions
- When invoking the loader, add an Option named DOMAIN_FILE_OPTION_NAME whose value is the project path of the target program.
- In the GUI import flow, pick the program file in the loader's options panel before importing.
- Confirm the option name constant used by the caller matches TenetLoader.DOMAIN_FILE_OPTION_NAME exactly.
Example fix
// before LoadResults<Trace> res = loader.load(...); // options had no domain file // after List<Option> opts = new ArrayList<>(settings.options()); opts.add(new Option(TenetLoader.DOMAIN_FILE_OPTION_NAME, "/myproj/exe")); settings = settings.withOptions(opts); LoadResults<Trace> res = loader.load(...);
Defensive patterns
Strategy: validation
Validate before calling
String programPath = options.stream()
.filter(o -> TenetLoader.DOMAIN_FILE_OPTION_NAME.equals(o.getName()))
.map(Option::getValue).map(String::valueOf).findFirst().orElse(null);
if (programPath == null || programPath.isBlank()) {
throw new IllegalArgumentException("Set " + TenetLoader.DOMAIN_FILE_OPTION_NAME);
} Try / catch
try {
loader.load(settings);
} catch (LoadException e) {
if (e.getMessage().contains("progam to associate")) {
// prompt user to select the associated program
}
} Prevention
- Always set DOMAIN_FILE_OPTION_NAME to a non-blank program path before importing a Tenet trace.
- Reuse the loader's option name constant rather than a hardcoded string.
- Validate options in scripts before invoking the loader.
When it happens
Trigger: load() is called with settings whose options do not include DOMAIN_FILE_OPTION_NAME, or include it with a null/blank value. The loader iterates settings.options() looking for that name and never finds a usable programPath.
Common situations: Importing a Tenet trace via a script/batch flow that forgot to set the domain-file option; the import dialog closed without selecting an associated program; option renamed/misspelled so the name check does not match.
Related errors
- No progam to associate with trace was given
- Selected file is not a program
- Selected file is not a program
- Cannot add Trace to a program
- Encountered too many errors with this trace
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/8b194a35ad5fa0c5.
Report an issue: GitHub.