NationalSecurityAgency/ghidra · error · IllegalArgumentException
Address string should have at most one colon (:)
Error message
Address string should have at most one colon (:)
What it means
Thrown by DBTraceStaticMapping.parseSpace when an address string contains more than one colon character. Ghidra's trace static-mapping address format is 'space:offset' (space name + hex offset) or just 'offset' (hex offset with no space). More than one colon makes the string ambiguous and unparseable.
Source
Thrown at Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/module/DBTraceStaticMapping.java:58
* <ul>
* <li>1: Change {@link #traceAddress} to 10-byte fixed encoding</li>
* <li>0: Initial version and previous unversioned implementation</li>
* </ul>
*/
@DBAnnotatedObjectInfo(version = 1)
public class DBTraceStaticMapping extends DBAnnotatedObject
implements TraceStaticMapping, DecodesAddresses {
public static final String TABLE_NAME = "StaticMappings";
protected static String parseSpace(String addrStr) {
String[] parts = addrStr.split(":");
if (parts.length == 1) {
return null;
}
if (parts.length == 2) {
return parts[0];
}
throw new IllegalArgumentException("Address string should have at most one colon (:)");
}
protected static long parseOffset(String addrStr) {
String[] parts = addrStr.split(":");
assert parts.length <= 2;
return Long.parseUnsignedLong(parts[parts.length - 1], 16); // TODO: Use BigInteger?
}
static final String TRACE_ADDRESS_COLUMN_NAME = "TraceAddress";
static final String LENGTH_COLUMN_NAME = "Length";
static final String START_SNAP_COLUMN_NAME = "StartSnap";
static final String END_SNAP_COLUMN_NAME = "EndSnap";
static final String STATIC_PROGRAM_COLUMN_NAME = "StaticProgram";
static final String STATIC_ADDRESS_COLUMN_NAME = "StaticAddress";
@DBAnnotatedColumn(TRACE_ADDRESS_COLUMN_NAME)
static DBObjectColumn TRACE_ADDRESS_COLUMN;
@DBAnnotatedColumn(LENGTH_COLUMN_NAME)View on GitHub (pinned to d5f144c24d)
Solutions
- Format static addresses as 'spaceName:hexOffset' or plain 'hexOffset' only, ensuring at most one colon.
- Strip protocol/host prefixes from URLs before building the address string; only pass the address-space-and-offset portion.
- Validate with addrStr.split(":").length <= 2 before calling the mapping API.
Example fix
// before String staticAddress = "ram:0x00401000:extra"; mappingManager.add(range, lifespan, programURL, staticAddress); // after String staticAddress = "ram:00401000"; mappingManager.add(range, lifespan, programURL, staticAddress);
Defensive patterns
Strategy: validation
Validate before calling
// Ensure the address string has at most one colon before passing to mapping APIs
static String sanitizeAddr(String addrStr) {
long colons = addrStr.chars().filter(c -> c == ':').count();
if (colons > 1) {
throw new IllegalArgumentException("Address has " + colons + " colons: " + addrStr);
}
return addrStr;
} Prevention
- Format static addresses as 'space:hexOffset' with at most one colon.
- Strip URL protocol/host prefixes before building the address string.
- Validate colons count before calling mapping APIs.
When it happens
Trigger: Passing a staticAddress or traceAddress string with two or more colons to DBTraceStaticMapping.set or any code path that calls parseSpace/parseOffset (e.g. DBTraceStaticMappingManager.add with a malformed toAddress).
Common situations: Using a full URL-like string ('file:/path:offset') instead of the expected 'space:offset' format. Including a namespace separator or port-style colon in the offset. Passing an address from another tool that embeds colons.
Related errors
- More than one state is present in
- Section path must be a successor of this module's path
- endpoint cannot be -1
- Another mapping would conflict
- Given bookmark is not present at this view's snap
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/b7ce1aa19335326e.
Report an issue: GitHub.