NationalSecurityAgency/ghidra · error · IllegalArgumentException
Invalid generateupdates parameter use!
Error message
Invalid generateupdates parameter use!
What it means
Thrown by doGenerateUpdates() when more than one positional argument is supplied. Like generatesigs, generateupdates accepts at most one positional: an optional XML output directory. This is the update-file-generation variant of error 963, with identical structure.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:628
try (BulkSignatures bsim = getBulkSignatures()) {
if (commitOption) {
// Generate and commit signatures to BSim database
bsim.signatureRepo(ghidraURL, xmlDirectory, overwriteOption, monitor);
}
else {
// Generate sig XML files only
bsim.generateSignaturesFromServer(ghidraURL, xmlDirectory, overwriteOption,
configOption, monitor);
}
}
}
private void doGenerateUpdates(List<String> params, TaskMonitor monitor)
throws Exception, CancelledException {
// concurrent --bsim and --config option use already checked
if (params.size() > 1) {
throw new IllegalArgumentException("Invalid generateupdates parameter use!");
}
boolean commitOption = booleanOptions.contains(COMMIT_OPTION);
boolean overwriteOption = booleanOptions.contains(OVERWRITE_OPTION);
String configOption = optionValueMap.get(CONFIG_OPTION);
String xmlDirectory = null;
if (params.size() == 1) {
xmlDirectory = params.get(0);
if (configOption != null && commitOption) {
throw new IllegalArgumentException(
"Invalid option use with " + CONFIG_OPTION + " option: " + COMMIT_OPTION);
}
}
else {
if (overwriteOption) {
throw new IllegalArgumentException("Invalid option use: " + OVERWRITE_OPTION);
}View on GitHub (pinned to d5f144c24d)
Solutions
- Ensure at most one positional XML directory follows the ghidraURL.
- Use --config <template> rather than a bare positional for the template.
- Review the valid generateupdates forms at lines 1037-1039.
Example fix
// before bsim generateupdates ghidra://myhost/Repo /tmp/out medium_64 // after bsim generateupdates ghidra://myhost/Repo /tmp/out --config medium_64
Defensive patterns
Strategy: validation
Validate before calling
// For generateupdates: positional count must be 0 or 1
if ("generateupdates".equals(command) && positionalParams.size() > 1) {
throw new IllegalArgumentException("generateupdates accepts at most one XML directory positional");
} Prevention
- Share the positional-count validation between generatesigs and generateupdates.
- Pass templates via --config, never as a bare positional.
When it happens
Trigger: Running 'generateupdates <ghidraURL> dir1 dir2' or passing a template as a bare positional instead of via --config. params.size() > 1 at line 627.
Common situations: Confusing generatesigs and generateupdates syntax; passing the config template positionally; shell splitting a quoted path.
Related errors
- Unknown command: {}
- Unsupported command: {}
- Unsupported option use: {}
- Unexpected argument: {}
- Unsupported option specification: {}=
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/6b45cae2897410ea.
Report an issue: GitHub.