NationalSecurityAgency/ghidra · error · RuntimeException

Saved launcher args are corrupt, or launcher parameters chan

Error message

Saved launcher args are corrupt, or launcher parameters changed. Not launching.

What it means

Thrown as RuntimeException by readProgramLaunchConfig when the saved launcher-arguments XML (stored in program user data) fails to parse via XmlUtilities.fromString / SaveState construction (JDOMException or IOException). Critically, this only throws when forPrompt is false — i.e., when actually launching. When merely prompting the user, it logs and falls back to defaults. The corruption usually stems from a launcher-parameter schema change across Ghidra versions.

Source

Thrown at Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/gui/tracermi/launcher/TraceRmiLauncherServicePlugin.java:466

		 * Re-examine this if/when that gets merged
		 */
		ProgramUserData userData = program.getProgramUserData();
		String property = userData.getStringProperty(PREFIX_DBGLAUNCH + name, null);
		if (property == null) {
			return new SaveState();
		}
		try {
			Element element = XmlUtilities.fromString(property);
			return new SaveState(element);
		}
		catch (JDOMException | IOException e) {
			if (forPrompt) {
				Msg.error(this,
					"Saved launcher args are corrupt, or launcher parameters changed. Defaulting.",
					e);
				return new SaveState();
			}
			throw new RuntimeException(
				"Saved launcher args are corrupt, or launcher parameters changed. Not launching.",
				e);
		}
	}

	protected SaveState readToolLaunchConfig(String name) {
		if (!toolLaunchConfigs.hasValue(name)) {
			return new SaveState();
		}
		return toolLaunchConfigs.getSaveState(name);
	}

	protected void writeProgramLaunchConfig(Program program, String name, SaveState state) {
		ProgramUserData userData = program.getProgramUserData();
		state.putLong(KEY_LAST, System.currentTimeMillis());
		try (Transaction tx = userData.openTransaction()) {
			Element element = state.saveToXml();
			userData.setStringProperty(PREFIX_DBGLAUNCH + name, XmlUtilities.toString(element));

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Open the launcher configuration dialog (the prompt path) once to regenerate defaults — this rewrites a valid config.
  2. If the error persists, clear the corrupt saved config: remove/replace the stored launch property for that launcher in the program's user data.
  3. After a Ghidra upgrade, re-enter and re-save your launch parameters to migrate the schema.
Defensive patterns

Strategy: fallback

Validate before calling

// Before launching, validate the saved config is parseable
try {
    Element el = XmlUtilities.fromString(property);
    new SaveState(el);
} catch (Exception e) {
    // treat as corrupt; clear and use defaults
    property = null;
}

Try / catch

try { readProgramLaunchConfig(name, /*forPrompt*/false); }
catch (RuntimeException e) {
    // open the prompt path (forPrompt=true) to regenerate defaults, then retry
}

Prevention

When it happens

Trigger: Launching a debugger whose saved per-program launch configuration is unreadable. The XML was written by an older (or incompatible newer) version of the launcher whose parameter set has since changed, or the program user data was externally corrupted.

Common situations: Upgrading Ghidra after a launcher's parameters were renamed/added/removed; a program file restored from backup with an incompatible launch-config schema; manual editing of program user data; a partially-written save due to a prior crash.

Related errors


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