NationalSecurityAgency/ghidra · error · LSHException
XML layout for newer version of BSIM
Error message
XML layout for newer version of BSIM
What it means
Thrown by DescriptionManager.restoreXml when the document's layout_version attribute is greater than the running code's LAYOUT_VERSION. This is the forward-incompatibility guard: the newer layout may use fields or semantics this code cannot safely read.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/description/DescriptionManager.java:675
* @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();
}
parser.end();
}View on GitHub (pinned to d5f144c24d)
Solutions
- Upgrade this Ghidra installation to the version that produced the document.
- Re-export the data from the newer Ghidra using an export path compatible with this version if available.
- Confirm the file actually came from a newer version (check the layout_version value) and align versions across producers/consumers.
Defensive patterns
Strategy: validation
Validate before calling
int docLayout = readLayoutVersionFromXml(xmlFile);
if (docLayout > DescriptionManager.LAYOUT_VERSION) {
// upgrade Ghidra before loading
} Try / catch
try {
man.restoreXml(parser, factory);
} catch (LSHException e) {
if (e.getMessage().contains("newer version of BSIM")) {
// upgrade Ghidra to the producing version
} else throw e;
} Prevention
- Upgrade the consumer Ghidra to at least the version that produced the document.
- Avoid downgrading Ghidra below the data's layout version.
- Standardize the Ghidra version across teams that share BSim data.
When it happens
Trigger: Calling restoreXml on a 'description' document whose layout_version attribute exceeds the value compiled into the current DescriptionManager.LAYOUT_VERSION. Happens when opening data produced by a newer Ghidra/BSim release on an older install.
Common situations: Downgrading Ghidra and trying to read a database/XML exported by a newer version; sharing BSim data across teams with mismatched Ghidra versions; the document was partially migrated.
Related errors
- Old XML layout is no longer supported
- 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/20e984aca99ebead.
Report an issue: GitHub.