NationalSecurityAgency/ghidra · error · InvalidParameterException
Executable
Error message
Executable
What it means
CompareExecutablesScript queries the BSim database for an executable by name; if exeResult.recordCount is 0 it throws InvalidParameterException indicating the named executable is not present. This is a user-input validation error: the executable name provided via askString does not match any record in the target BSim database.
Source
Thrown at Ghidra/Features/BSim/ghidra_scripts/CompareExecutablesScript.java:70
private ExecutableComparison exeCompare;
@Override
protected void run() throws Exception {
String urlString = askString("Enter BSim database URL", "URL: ");
String execName =
askString("Enter name of executable to compare against database", "Name: ");
URL url = BSimClientFactory.deriveBSimURL(urlString);
try (FunctionDatabase database = BSimClientFactory.buildClient(url, true)) {
QueryExeInfo exeInfo = new QueryExeInfo();
exeInfo.filterExeName = execName;
ResponseExe exeResult = exeInfo.execute(database);
if (exeResult == null) {
String message = database.getLastError() != null ? database.getLastError().message
: "Unrecoverable error";
throw new IOException(message);
}
else if (exeResult.recordCount == 0) {
throw new InvalidParameterException(
"Executable " + execName + " is not present in database");
}
else if (exeResult.recordCount > 1) {
println("Multiple executables with the name - " + execName);
ExecutableRecord exeRecord = exeResult.records.get(0);
print("Using ");
println(exeRecord.printRaw());
}
String baseMd5 = exeResult.records.get(0).getMd5();
ScoreCaching cache = null; // If null, self scores will not be cached
// Scores can be cached in the local file system by using FileScoreCaching
// cache = new FileScoreCaching("/tmp/test_scorecacher.txt");
// Scores can be cached in a dedicated table within the database by using TableScoreCaching
// TableScoreCaching is currently only supported for the PostgreSQL back-end.
// cache = new TableScoreCaching(database);View on GitHub (pinned to d5f144c24d)
Solutions
- Verify the executable name spelling and case against the BSim database contents (query exe info without a filter to list available executables).
- Confirm the correct BSim server URL was provided — the executable may exist in a different repository.
- Run GenerateSignatures/ingestion for the target executable first to populate the database.
- Check whether the database stores full paths vs. basenames and adjust the queried name accordingly.
Defensive patterns
Strategy: validation
Validate before calling
// Before throwing, query available executables to validate the name
QueryExeInfo check = new QueryExeInfo();
check.filterExeName = null; // list all
ResponseExe all = check.execute(database);
boolean exists = all.records.stream()
.anyMatch(r -> r.getName().equals(execName));
if (!exists) {
// prompt user to pick from available names
} Try / catch
try {
// run comparison
} catch (InvalidParameterException e) {
if (e.getMessage().contains("is not present in database")) {
// re-prompt user with a list of available executables
} else {
throw e;
}
} Prevention
- Present a dropdown of available executable names from the BSim DB instead of free-text input.
- Strip path components from the name to match how BSim stores it (basename only).
- Validate the executable name against the DB before starting the comparison workflow.
When it happens
Trigger: Running CompareExecutablesScript, providing an execName (via askString) and a database URL; QueryExeInfo.execute(database) returns a ResponseExe with recordCount == 0. The name filter matched no executable records.
Common situations: Typo in the executable name; the executable was never ingested into this BSim database; the wrong BSim server/database URL was specified; the executable was ingested under a different name (full path vs. basename mismatch); case sensitivity in the name filter.
Related errors
- Expecting privilege option (admin or user)
- host required
- Non-empty dbName required
- Invalid {} dbName: {}
- Remote file URL not supported: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/d457e8a517a14df6.
Report an issue: GitHub.