NationalSecurityAgency/ghidra · error · IllegalArgumentException
The given entry is not in this space
Error message
The given entry is not in this space
What it means
Thrown by DBTraceAddressSnapRangePropertyMapSpace.deleteData(DR data) when the data entry's tree reference (data.tree) does not match this space's tree (this.tree). This ensures you only delete entries that belong to the correct address space's underlying DB tree structure. An IllegalArgumentException (unchecked) signals a cross-space misuse: the entry was created in a different space.
Source
Thrown at Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/map/DBTraceAddressSnapRangePropertyMapSpace.java:93
}
public <K> DBCachedObjectIndex<K, DR> getUserIndex(Class<K> fieldClass, DBObjectColumn column) {
return tree.getUserIndex(fieldClass, column);
}
@Override
@SuppressWarnings({ "unchecked" })
public void deleteValue(T value) {
if (!(value instanceof AbstractDBTraceAddressSnapRangePropertyMapData)) {
throw new UnsupportedOperationException(
"Can only directly delete values for maps where the entry is the value");
}
deleteData((DR) value);
}
public void deleteData(DR data) {
if (data.tree != this.tree) {
throw new IllegalArgumentException("The given entry is not in this space");
}
try (LockHold hold = LockHold.lock(lock.writeLock())) {
tree.doDeleteEntry(data);
}
}
@Override
public T put(TraceAddressSnapRange shape, T value) {
return map.put(shape, value);
}
@Override
public boolean remove(TraceAddressSnapRange shape, T value) {
return map.remove(shape, value);
}
@Override
public boolean remove(Entry<TraceAddressSnapRange, T> entry) {View on GitHub (pinned to d5f144c24d)
Solutions
- Ensure the entry is deleted from the same space it was created in: resolve the correct space via data.range.getAddressSpace() and call deleteData on that space's map.
- Use the map-level deleteData(DR data) method on DBTraceAddressSnapRangePropertyMap, which resolves the correct space automatically via delegateDeleteV.
- Verify data.tree == spaceMap.tree before calling deleteData().
Example fix
// before spaceMap.deleteData(entry); // may belong to different space // after // Let the top-level map dispatch to the correct space map.deleteData(entry);
Defensive patterns
Strategy: validation
Validate before calling
// Verify the entry belongs to this space's tree before deleting // Best: use the top-level map which resolves the space automatically map.deleteData(entry); // Or check manually: // AbstractDBTraceAddressSnapRangePropertyMapData<?, ?> data = entry; // AddressSpace space = data.range.getAddressSpace(); // DBTraceAddressSnapRangePropertyMapSpace<T, ?> correctSpace = // map.getForSpace(space, false);
Prevention
- Use the top-level DBTraceAddressSnapRangePropertyMap.deleteData() to avoid cross-space issues.
- Never pass entries from one space to another space's deleteData().
- Resolve the correct space from entry.range.getAddressSpace() before deletion.
When it happens
Trigger: Calling deleteData(entry) on a DBTraceAddressSnapRangePropertyMapSpace with an entry (AbstractDBTraceAddressSnapRangePropertyMapData) that was created by or belongs to a different address space's tree. This occurs when entries are collected from one space and deletion is attempted on another space's map.
Common situations: Iterating entries across multiple address spaces and attempting batch deletion on the wrong space. Storing entry references across space boundaries and later deleting them from the incorrect space. Register space vs. memory space confusion.
Related errors
- Can only directly delete values for maps where the entry is
- Could not instantiate saveable of type
- Saveable must have a default constructor
- Can only directly delete values for maps where the entry is
- Platform and prototype disagree in language
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/faccc964ece170c7.
Report an issue: GitHub.