NationalSecurityAgency/ghidra · error · LSHException

Query signature data has no setting information

Error message

Query signature data has no setting information

What it means

Thrown by FunctionDatabase.checkSettingsForQuery when the incoming query signature data has no setting information (checkSignatureSettings returns 3, meaning the query's major version is 0 or its settings value is 0). BSim refuses to run a query against a database when the query payload itself carries no signature-settings metadata, because the results could not be meaningfully compared.

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/FunctionDatabase.java:222

	 * Send a query to the database.  The response is returned as a QueryResponseRecord.
	 * If this is null, an error has occurred and an error message can be obtained from getLastError
	 * @param query an object describing the query
	 * @return the response object or null if there is an error
	 */
	public QueryResponseRecord query(BSimQuery<?> query);

	public static void checkSettingsForQuery(DescriptionManager manage, DatabaseInformation info)
			throws LSHException {
		final int res = info.checkSignatureSettings(manage.getMajorVersion(),
			manage.getMinorVersion(), manage.getSettings());
		if (res <= 1) {
			return;
		}
		if (res == 4) {
			return;
		}
		if (res == 3) {
			throw new LSHException("Query signature data has no setting information");
		}
		throw new LSHException("Query signature data " +
			getFormattedVersion(manage.getMajorVersion(), manage.getMinorVersion(),
				manage.getSettings()) +
			" does not match database " +
			getFormattedVersion(info.major, info.minor, info.settings));
	}

	private static String getFormattedVersion(int maj, int min, int settings) {
		return String.format("%d.%d:0x%02x", maj, min, settings);
	}

	public static boolean checkSettingsForInsert(DescriptionManager manage,
			DatabaseInformation info) throws LSHException, DatabaseNonFatalException {
		if (manage.numFunctions() == 0) {
			throw new DatabaseNonFatalException("Empty signature file");
		}
		int res = info.checkSignatureSettings(manage.getMajorVersion(), manage.getMinorVersion(),

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Regenerate the query signature file with the current Ghidra/BSim tooling so it embeds a non-zero major version and non-zero signature settings.
  2. Open the signature file in a hex editor or BSim tool and confirm the version/settings header fields are populated rather than zero.
  3. Ensure the GenSignatures vector factory has a non-zero settings value (see error 730) before generating query signatures.

Example fix

// before: querying with a settings-less signature payload
FunctionDatabase.checkSettingsForQuery(manage, info);
// after: regenerate the signature file with a properly configured vector factory first
genSignatures.setVectorFactory(vectorFactory); // factory.getSettings() != 0
FunctionDatabase.checkSettingsForQuery(manage, info);
Defensive patterns

Strategy: validation

Validate before calling

// Validate signature payload has settings before querying
DescriptionManager manage = /* loaded */;
if (manage.getMajorVersion() == 0 || manage.getSettings() == 0) {
    throw new IllegalStateException(
        "Query signature file has no settings info (major=" + manage.getMajorVersion()
        + ", settings=" + manage.getSettings() + "); regenerate it with current BSim tooling");
}
FunctionDatabase.checkSettingsForQuery(manage, info);

Try / catch

try {
    FunctionDatabase.checkSettingsForQuery(manage, info);
} catch (LSHException e) {
    if (e.getMessage().contains("no setting information")) {
        log.error("Query signatures lack settings metadata; regenerate the file", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling checkSettingsForQuery with a DescriptionManager whose loaded signature file has major version 0 or settings 0. This happens when a .gsig/.bsim signature file was generated without embedding version/settings metadata, or was produced by a tool/older version that left those fields unset.

Common situations: Querying a BSim database with a signature file exported from a mismatched or older Ghidra version. Loading a corrupted or truncated signature file where the header metadata was lost. Manually constructing a DescriptionManager and forgetting to call setVersion/setSettings.

Related errors


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