NationalSecurityAgency/ghidra · error · SQLException
No desctable rows matching id
Error message
No desctable rows matching id
What it means
Thrown by DescriptionTable.querySingleDescriptionId when a SELECT on desctable for a specific row id returns no rows (extractSingleDescriptionRow yields null). The requested function-description row id does not exist in the desctable, indicating a stale or invalid id was passed — likely an id from a different/older database or a referential integrity break.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/tables/DescriptionTable.java:115
/**
* Given the row id of the function within desctable, extract the FunctionDescription object
* @param descManager is the container which will hold the object
* @param rowId is the row id of the function within desctable
* @return the FunctionDescription
* @throws SQLException if there is a problem creating or executing the query
* @throws LSHException if there is a problem parsing the result set
*/
public FunctionDescription querySingleDescriptionId(DescriptionManager descManager, long rowId)
throws SQLException, LSHException {
PreparedStatement s = selectByRowIdStatement.prepareIfNeeded(
() -> db.prepareStatement("SELECT ALL * FROM desctable WHERE id = ?"));
s.setLong(1, rowId);
try (ResultSet rs = s.executeQuery()) {
FunctionDescription fres;
fres = extractSingleDescriptionRow(rs, descManager);
if (fres == null) {
throw new SQLException("No desctable rows matching id");
}
return fres;
}
}
/**
* Process a result set (expected to contain a single row) from desctable,
* building the FunctionDescription object described by the row
* @param resultSet is the result set
* @param descManager is the container that will hold the resulting FunctionDescription
* @return the new FunctionDescription
* @throws SQLException if there is a problem creating or executing the query
* @throws LSHException if there is a problem creating the executable record
*/
private FunctionDescription extractSingleDescriptionRow(ResultSet resultSet,
DescriptionManager descManager) throws SQLException, LSHException {
boolean finished = false;
DescriptionRow currow = null;View on GitHub (pinned to d5f144c24d)
Solutions
- Verify the rowId was obtained from the same database instance you are querying.
- Check referential integrity of the database (desctable vs. vector/callgraph tables) using a consistency check.
- If the database was rebuilt, re-resolve functions by metadata instead of by stale id.
- Recover from a known-good backup if rows are missing due to corruption.
Defensive patterns
Strategy: validation
Validate before calling
// Confirm a desctable row exists before/around the lookup.
// Cheap guard: only use ids from the same database session.
if (!descTable.rowExists(rowId)) { // if such a helper exists
throw new IllegalArgumentException("No desctable row for id " + rowId);
} Try / catch
try {
return descTable.querySingleDescriptionId(descMgr, rowId);
} catch (SQLException e) {
if (e.getMessage().contains("No desctable rows")) {
// resolve by metadata instead of stale id
return resolveByNameAndExe(descMgr, name, exe);
}
throw e;
} Prevention
- Only use row ids obtained from the same live database.
- Run referential-integrity checks after migrations or restores.
- Prefer resolving by metadata (name+exe) when id freshness is uncertain.
When it happens
Trigger: Calling querySingleDescriptionId(descManager, rowId) with a rowId that has no matching row in desctable. Occurs when an id obtained from one database is used against another, when the row was deleted, or when a corrupted/partial database is missing rows. The function id stored in a vector or callgraph entry points to a non-existent desctable row.
Common situations: Cross-database id references (ids are only valid within their origin database). Database corruption or partial restore losing desctable rows. Concurrent delete removing the row between id capture and lookup. Using ids from a database that was rebuilt/recreated (sequence reset).
Related errors
- Id is not present in string table: {name}
- Could not delete executable record
- Bad exetable rowid
- SQL database does not have callgraph information enabled
- Did not get desctable sequence number after insertion
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/62a64025f968491b.
Report an issue: GitHub.