NationalSecurityAgency/ghidra · error · LSHException
Old XML layout is no longer supported
Error message
Old XML layout is no longer supported
What it means
Thrown by DescriptionManager.restoreXml when the parsed XML 'description' element's layout_version attribute is less than the code's current LAYOUT_VERSION constant. BSim changed its XML serialization format and the loader refuses documents written by the older layout because it cannot interpret them reliably.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/description/DescriptionManager.java:672
/**
* Reconstruct a container by deserializing an XML stream
* @param parser is the XML parser
* @param vectorFactory is the factory to use for building feature vectors
* @throws LSHException if there are inconsistencies in the XML
*/
public void restoreXml(XmlPullParser parser, LSHVectorFactory vectorFactory)
throws LSHException {
major = 0;
minor = 0;
settings = 0;
int layout_version = 0;
XmlElement el = parser.start("description");
if (el.hasAttribute("layout_version")) {
layout_version = SpecXmlUtils.decodeInt(el.getAttribute("layout_version"));
}
if (layout_version < LAYOUT_VERSION) {
throw new LSHException("Old XML layout is no longer supported");
}
if (layout_version > LAYOUT_VERSION) {
throw new LSHException("XML layout for newer version of BSIM");
}
if (el.hasAttribute("major")) {
major = (short) SpecXmlUtils.decodeInt(el.getAttribute("major"));
minor = (short) SpecXmlUtils.decodeInt(el.getAttribute("minor"));
}
if (el.hasAttribute("settings")) {
settings = SpecXmlUtils.decodeInt(el.getAttribute("settings"));
}
while (parser.peek().isStart()) {
parser.start("execlist");
ExecutableRecord erec = ExecutableRecord.restoreXml(parser, this);
while (parser.peek().isStart()) {
FunctionDescription.restoreXml(parser, vectorFactory, this, erec);
}
parser.end();View on GitHub (pinned to d5f144c24d)
Solutions
- Re-export the BSim data with the current Ghidra version so it carries the new layout_version.
- Upgrade the source Ghidra installation to a version whose layout_version matches, then re-export.
- Locate an intermediate Ghidra version that supports both layouts to migrate the data.
- If the data is expendable, regenerate the BSim database from the original binaries.
Defensive patterns
Strategy: validation
Validate before calling
int docLayout = readLayoutVersionFromXml(xmlFile);
if (docLayout < DescriptionManager.LAYOUT_VERSION) {
// migrate/re-export with current version; do not call restoreXml
} Try / catch
try {
man.restoreXml(parser, factory);
} catch (LSHException e) {
if (e.getMessage().contains("Old XML layout")) {
// prompt user to re-export with current Ghidra
} else throw e;
} Prevention
- Keep producer and consumer Ghidra versions aligned.
- Re-export BSim data after major Ghidra upgrades.
- Discard or archive old layout documents and regenerate from binaries.
When it happens
Trigger: Calling restoreXml(parser, vectorFactory) on a 'description' document whose layout_version attribute (or absence, defaulting to 0) is below LAYOUT_VERSION. Happens when loading BSim data exported by an older Ghidra/BSim release.
Common situations: Loading BSim XML or database dumps produced by an older Ghidra version after upgrading; using a backup file from a previous schema; the layout_version attribute was stripped or is missing (treated as 0).
Related errors
- XML layout for newer version of BSIM
- Read bad library placeholder md5 for ExecutableRecord
- Query signature data has no setting information
- Query signature data does not match database
- Trying to insert signature data with slight differences in s
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/5924567fa3f28acd.
Report an issue: GitHub.