NationalSecurityAgency/ghidra · error · IllegalStateException
There must be a root object in the ObjectManager before…
Error message
There must be a root object in the ObjectManager before setting the TimeRadix
What it means
Thrown by DBTraceTimeManager.setTimeRadix as IllegalStateException: the TimeRadix (dec/HEX/hex display format for snapshot keys) is stored as an attribute on the trace's root object. If ObjectManager.getRootObject() is null there is nowhere to store it, so the call is rejected. This implies the trace is not an object-oriented/fully-initialised trace.
Solutions
- Ensure the trace's object manager has a root object before calling setTimeRadix (create the root object / complete object-schema initialisation first).
- Guard: call getRootObject() and only setTimeRadix when non-null.
- If the trace legitimately has no object model, do not set the TimeRadix (it is object-backed only).
Example fix
// before
trace.getTimeManager().setTimeRadix(TimeRadix.HEX_LOWER);
// after
if (trace.getObjectManager().getRootObject() != null) {
trace.getTimeManager().setTimeRadix(TimeRadix.HEX_LOWER);
} Defensive patterns
Strategy: validation
Validate before calling
if (trace.getObjectManager().getRootObject() != null) {
trace.getTimeManager().setTimeRadix(TimeRadix.HEX_LOWER);
} Prevention
- Create/confirm the trace root object before setting TimeRadix.
- Defer preference setting until after object-schema initialisation completes.
- Do not set TimeRadix on traces that intentionally have no object model.
When it happens
Trigger: Calling setTimeRadix(...) on a trace that has no root object yet, e.g. immediately after creating/opening a trace before its object schema is populated, or on a legacy trace without objects.
Common situations: Calling setTimeRadix too early in the import/initialisation pipeline; opening an old trace that predates the object model; headless tooling that builds a trace and sets preferences before creating the root object.
Related errors
- Address string should have at most one colon (:)
- All trace memory is initialized
- Another mapping would conflict
- Cannot advance a negative number
- Cannot convert register value
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/3d8d99bbad9ea0cf.
Report an issue: GitHub.
Appendix: source
Thrown at Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/time/DBTraceTimeManager.java:333
return snapshotStore.getRecordCount();
}
public void deleteSnapshot(DBTraceSnapshot snapshot) {
try (LockHold hold = LockHold.lock(lock.writeLock())) {
DBTraceFork foundFork = forksBySnap.getOne(snapshot.getKey());
snapshotStore.delete(snapshot);
if (foundFork != null) {
forkStore.delete(foundFork);
}
notifySnapshotDeleted(snapshot);
}
}
@Override
public void setTimeRadix(TimeRadix radix) {
DBTraceObject root = trace.getObjectManager().getRootObject();
if (root == null) {
throw new IllegalStateException(
"There must be a root object in the ObjectManager before setting the TimeRadix");
}
root.setAttribute(Lifespan.ALL, KEY_TIME_RADIX, switch (radix) {
case DEC -> "dec";
case HEX_UPPER -> "HEX";
case HEX_LOWER -> "hex";
});
}
@Override
public TimeRadix getTimeRadix() {
DBTraceObject root = trace.getObjectManager().getRootObject();
if (root == null) {
return TimeRadix.DEFAULT;
}
TraceObjectValue attribute = root.getAttribute(0, KEY_TIME_RADIX);
if (attribute == null) {
return TimeRadix.DEFAULT;View on GitHub (pinned to d5f144c24d)