NationalSecurityAgency/ghidra · error · IllegalArgumentException

Missing directory containing update files

Error message

Missing directory containing update files

What it means

Thrown by doCommitUpdates() when no positional directory argument is supplied. commitupdates requires a directory containing update XML files (produced by generateupdates). The commit step sends those updates to the BSim server, so a source directory is mandatory.

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:695

			throw new IllegalArgumentException("Missing directory containing signature files");
		}

		String xmlDirectory = params.get(0);

		File dir = checkDirectory(xmlDirectory);

		boolean hasOverride = optionValueMap.containsKey(OVERRIDE_OPTION);
		String md5Filter = optionValueMap.get(MD5_OPTION);

		try (BulkSignatures bsim = getBulkSignatures()) {
			bsim.sendXmlToQueryServer(dir, hasOverride ? ghidraURL : null, md5Filter, monitor);
		}
	}

	private void doCommitUpdates(List<String> params)
			throws IOException, SAXException, LSHException {
		if (params.size() < 1) {
			throw new IllegalArgumentException("Missing directory containing update files");
		}
		String xmlDirectory = params.get(0);

		File dir = checkDirectory(xmlDirectory);

		try (BulkSignatures bsim = getBulkSignatures()) {
			bsim.sendUpdateToServer(dir);
		}
	}

	private boolean isAllNull(String... strings) {
		for (String s : strings) {
			if (s != null) {
				return false;
			}
		}
		return true;
	}

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Supply the update directory: commitupdates <bsimURL> </xmldirectory>.
  2. Check usage at line 1040: commitupdates <bsimURL> </xmldirectory>.

Example fix

// before
bsim commitupdates postgresql://myhost/BsimDB
// after
bsim commitupdates postgresql://myhost/BsimDB /tmp/updates
Defensive patterns

Strategy: validation

Validate before calling

// commitupdates requires a positional directory
if ("commitupdates".equals(command) && positionalParams.isEmpty()) {
    throw new IllegalArgumentException("commitupdates requires the update XML directory argument");
}

Prevention

When it happens

Trigger: Running 'bsim commitupdates <bsimURL>' with no positional argument. params.size() < 1 at line 694.

Common situations: Forgetting the directory; confusing commitsigs and commitupdates argument shapes; omitting a shell variable that expanded to empty.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/d396c843bf57b261. Report an issue: GitHub.