NationalSecurityAgency/ghidra · error · LSHException

Problems loading score cache:

Error message

Problems loading score cache: 

What it means

Thrown by FileScoreCaching.getSigThreshold() wrapping any IOException from loadCache(). Identical mechanism to getSimThreshold() but retrieves the significance threshold. The message string is the same ("Problems loading score cache: ") but the throw site is the sigThreshold accessor at line 130.

Solutions

  1. Fix or regenerate the cache file via resetStorage(simThresh, sigThresh).
  2. Inspect the wrapped IOException message to diagnose the specific parse or I/O failure.
  3. Validate the cache file format (two float header lines) before relying on it.

Example fix

// before
double sig = cache.getSigThreshold(); // throws if cache corrupt

// after
catch (LSHException e) {
    cache.resetStorage(defaultSimThresh, defaultSigThresh);
    double sig = cache.getSigThreshold();
}
Defensive patterns

Strategy: try-catch

Validate before calling

File cacheFile = new File(cachePath);
if (cacheFile.exists() && cacheFile.length() < 10) {
    cacheFile.delete();
}

Try / catch

try {
    double sig = cache.getSigThreshold();
} catch (LSHException e) {
    if (e.getMessage().startsWith("Problems loading")) {
        cache.resetStorage(defaultSimThresh, defaultSigThresh);
        double sig = cache.getSigThreshold();
    } else throw e;
}

Prevention

When it happens

Trigger: Calling getSigThreshold() when the cache file is corrupt or unreadable. Like getSimThreshold, this can fire during ExecutableScorerSingle construction which reads both thresholds from the cache.

Common situations: Same corrupt-file scenarios as the simThreshold variant — the cache file was truncated, has bad lines, or is unreadable. Typically both threshold accessors fail together if the cache is corrupt.

Related errors


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

Appendix: source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/FileScoreCaching.java:130

	@Override
	public double getSimThreshold() throws LSHException {
		try {
			loadCache();
		}
		catch (IOException e) {
			throw new LSHException("Problems loading score cache: " + e.getMessage());
		}
		return simThreshold;
	}

	@Override
	public double getSigThreshold() throws LSHException {
		try {
			loadCache();
		}
		catch (IOException e) {
			throw new LSHException("Problems loading score cache: " + e.getMessage());
		}
		return sigThreshold;
	}

	@Override
	public void prefetchScores(Set<ExecutableRecord> exeSet, List<ExecutableRecord> missing)
			throws LSHException {
		try {
			loadCache();
		}
		catch (IOException e) {
			throw new LSHException("Could not prefetch scores: " + e.getMessage());
		}
		if (missing != null) {
			if (cacheMap == null) {
				for (ExecutableRecord exeRec : exeSet) {
					missing.add(exeRec);			// Everything is missing
				}

View on GitHub (pinned to d5f144c24d)