{"record":{"id":"0af12b1871bcd2eb","repo":"NationalSecurityAgency/ghidra","slug":"saved-launcher-args-are-corrupt-or-launcher-param","errorCode":null,"errorMessage":"Saved launcher args are corrupt, or launcher parameters changed. Not launching.","messagePattern":"Saved launcher args are corrupt, or launcher parameters changed\\. Not launching\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/gui/tracermi/launcher/TraceRmiLauncherServicePlugin.java","lineNumber":466,"sourceCode":"\t\t * Re-examine this if/when that gets merged\n\t\t */\n\t\tProgramUserData userData = program.getProgramUserData();\n\t\tString property = userData.getStringProperty(PREFIX_DBGLAUNCH + name, null);\n\t\tif (property == null) {\n\t\t\treturn new SaveState();\n\t\t}\n\t\ttry {\n\t\t\tElement element = XmlUtilities.fromString(property);\n\t\t\treturn new SaveState(element);\n\t\t}\n\t\tcatch (JDOMException | IOException e) {\n\t\t\tif (forPrompt) {\n\t\t\t\tMsg.error(this,\n\t\t\t\t\t\"Saved launcher args are corrupt, or launcher parameters changed. Defaulting.\",\n\t\t\t\t\te);\n\t\t\t\treturn new SaveState();\n\t\t\t}\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\"Saved launcher args are corrupt, or launcher parameters changed. Not launching.\",\n\t\t\t\te);\n\t\t}\n\t}\n\n\tprotected SaveState readToolLaunchConfig(String name) {\n\t\tif (!toolLaunchConfigs.hasValue(name)) {\n\t\t\treturn new SaveState();\n\t\t}\n\t\treturn toolLaunchConfigs.getSaveState(name);\n\t}\n\n\tprotected void writeProgramLaunchConfig(Program program, String name, SaveState state) {\n\t\tProgramUserData userData = program.getProgramUserData();\n\t\tstate.putLong(KEY_LAST, System.currentTimeMillis());\n\t\ttry (Transaction tx = userData.openTransaction()) {\n\t\t\tElement element = state.saveToXml();\n\t\t\tuserData.setStringProperty(PREFIX_DBGLAUNCH + name, XmlUtilities.toString(element));","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-rmi-trace/src/main/java/ghidra/app/plugin/core/debug/gui/tracermi/launcher/TraceRmiLauncherServicePlugin.java#L448-L484","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the launcher configuration dialog (the prompt path) once to regenerate defaults — this rewrites a valid config.","If the error persists, clear the corrupt saved config: remove/replace the stored launch property for that launcher in the program's user data.","After a Ghidra upgrade, re-enter and re-save your launch parameters to migrate the schema."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Before launching, validate the saved config is parseable\ntry {\n    Element el = XmlUtilities.fromString(property);\n    new SaveState(el);\n} catch (Exception e) {\n    // treat as corrupt; clear and use defaults\n    property = null;\n}","typeGuard":null,"tryCatchPattern":"try { readProgramLaunchConfig(name, /*forPrompt*/false); }\ncatch (RuntimeException e) {\n    // open the prompt path (forPrompt=true) to regenerate defaults, then retry\n}","preventionTips":["After a Ghidra upgrade, re-open and re-save launch configs to migrate the schema.","Open the launch prompt once to regenerate a valid config if launch fails.","Avoid manually editing program user-data launch properties."],"tags":["config-corruption","xml","version-migration","launcher","ghidra-debug"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}