NationalSecurityAgency/ghidra · error · IllegalArgumentException
No such address space: %s
Error message
No such address space: %s
What it means
Ghidra DebuggerGoToTrait.tryAddress() looks up the named address space via factory.getAddressSpace(spaceName); if it returns null the method throws IllegalArgumentException. This is the platform/address-factory path used before falling back to Sleigh expression evaluation.
Source
Thrown at Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/action/DebuggerGoToTrait.java:99
TracePlatform platform = current.getPlatform();
goToDialog.show(platform.getAddressFactory(), getDefaultInput());
}
protected String adjustOffset(String offset) {
offset = offset.strip();
if (offset.startsWith("+")) {
return ".+(%s)".formatted(offset.substring(1));
}
if (offset.startsWith("-")) {
return ".-(%s)".formatted(offset.substring(1));
}
return offset;
}
protected Address tryAddress(AddressFactory factory, String spaceName, String offset) {
AddressSpace space = factory.getAddressSpace(spaceName);
if (space == null) {
throw new IllegalArgumentException("No such address space: " + spaceName);
}
try {
Address address = space.getAddress(offset);
if (address == null) {
address = factory.getAddress(offset);
}
return address;
}
catch (AddressFormatException e) {
return null;
}
}
public void validate(AddressFactory factory, String spaceName, String offset, LitIdMode mode) {
offset = adjustOffset(offset);
/**
* NOTE: Even though the SleighParser can how handle bare addresses, we still want toView on GitHub (pinned to d5f144c24d)
Solutions
- Use a space name that exists for the current platform: enumerate via factory.getAddressSpaces().
- Let the offset be resolved without an explicit space, or use the register/ram convention for the active language.
- Switch to a trace whose language provides the expected space.
- Catch IllegalArgumentException and report available spaces to the user.
Example fix
// before Address a = tryAddress(factory, "mem", "1000"); // 'mem' not defined -> throws // after String space = factory.getDefaultAddressSpace().getName(); // e.g. "ram" Address a = tryAddress(factory, space, "1000");
Defensive patterns
Strategy: validation
Validate before calling
AddressSpace space = factory.getAddressSpace(spaceName);
if (space == null) {
// list valid spaces: factory.getAddressSpaces()
return;
} Type guard
boolean spaceExists(ghidra.program.model.address.AddressFactory f, String name) {
return f.getAddressSpace(name) != null;
} Try / catch
try {
Address a = tryAddress(factory, spaceName, offset);
} catch (IllegalArgumentException ex) {
// 'No such address space'; pick factory.getDefaultAddressSpace()
} Prevention
- Enumerate spaces via getAddressSpaces() before offering them in the UI.
- Prefer the default address space when the user gives a bare offset.
- Clear stale space names when switching traces.
When it happens
Trigger: A Go-To request names an address space that the current platform's AddressFactory does not provide (e.g., 'ram' vs 'mem' vs 'register'), or a typo in the space name.
Common situations: Trace's language defines different space names than the user typed; cross-language copy-paste of an address expression; stale plugin state after switching traces.
Related errors
- Unsupported value: {}
- Invalid value for {}
- Current trace does not use Sleigh
- Failed to read memory
- No saved offers to launch {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/36399919887c63f2.
Report an issue: GitHub.