NationalSecurityAgency/ghidra · error · LoadException
Encountered too many errors with this trace
Error message
Encountered too many errors with this trace
What it means
LoadException('Encountered too many errors with this trace') is thrown during line-by-line parsing once errorCount reaches ERROR_THRESHOLD (a static final int set to 10 in TenetLoader). Each line where parseRegisterOperations returns false increments errorCount; the check fires inside the per-line loop after setupMemoryAndMapping for a snapshot. It is an abort-on-repeated-failure guard, not a single-record error.
Source
Thrown at Ghidra/Debug/Debugger-importers/src/main/java/ghidra/app/util/opinion/TenetLoader.java:384
lineNumber++;
line = reader.readLine();
}
TraceSnapshot snapshot =
trace.getTimeManager().createSnapshot("Snapshot %d".formatted(snapNumber));
snapshot.setEventThread(traceThread);
long snap = snapshot.getKey();
snapNumber++;
setupMemoryAndMapping(program, trace, slideValue, snap);
try {
while (line != null) {
monitor.checkCancelled();
if (errorCount >= ERROR_THRESHOLD) {
throw new LoadException("Encountered too many errors with this trace");
}
final Matcher ipMatcher = ipPattern.matcher(line);
if (ipMatcher.find()) {
curIp = Long.parseLong(ipMatcher.group(1), 16);
if (parseRegisterOperations(snap, curIp, line, lineNumber, traceThread,
trace, log, monitor)) {
parseMemoryOperations(snap, curIp, line, trace, monitor);
}
else {
errorCount++;
}
}
else {
log.appendMsg(
"Line %d: Unable to find PC, skipping...".formatted(lineNumber));
errorCount++;View on GitHub (pinned to d5f144c24d)
Solutions
- Open the trace in a text editor and confirm its format matches what TenetLoader expects (IP line pattern, register op syntax).
- Re-verify the associated Program is the exact executable the trace was recorded against (correct language/compiler spec).
- Re-export the trace from the recorder if it is corrupt or partially written.
- Temporarily lower verbosity / inspect the MessageLog entries logged before the threshold to find the first failing line and its pattern.
Defensive patterns
Strategy: validation
Validate before calling
if (errorCount >= TenetLoader.ERROR_THRESHOLD) {
// inspect MessageLog for first failing line before re-attempting import
} Try / catch
try {
loader.load(settings);
} catch (LoadException e) {
if (e.getMessage().contains("too many errors")) {
// check log for the failing trace lines and the associated program
}
} Prevention
- Confirm the trace file is intact and matches the Tenet format the loader expects.
- Associate the exact Program the trace was recorded against (matching language/compiler spec).
- Watch the MessageLog for the first parse failures to localize the corruption.
When it happens
Trigger: Loading a Tenet trace where 10 or more lines fail register-operation parsing (parseRegisterOperations returns false), e.g. lines whose IP/opcode format does not match ipPattern or whose payload cannot be parsed against the chosen program. The throw happens mid-snapshot after the threshold check.
Common situations: Corrupt or truncated trace file; wrong Program associated with the trace so register/memory layouts do not match; Tenet format version produced by a newer/different recorder than the loader expects; locale/encoding issues altering line content.
Related errors
- Encountered too many errors with this trace
- No progam to associate with trace was given
- Cannot add Trace to a program
- No progam to associate with trace was given
- Selected file is not a program
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/dcb04b2b45680713.
Report an issue: GitHub.