NationalSecurityAgency/ghidra · error · IllegalArgumentException

Cannot find path to breakpoint locations

Error message

Cannot find path to breakpoint locations

What it means

Thrown by computePath when, after resolving the spec path, the successor schema's searchFor(TraceBreakpointLocation.class, true) returns null. The schema defines a breakpoint specification but no corresponding location element under it, so the location half of the path cannot be computed.

Source

Thrown at Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/breakpoint/PlaceEmuBreakpointActionItem.java:93

		String name = createName(address);
		TraceObject container = findBreakpointContainer();
		if (container == null) {
			throw new IllegalArgumentException(
				"Address is not associated with a breakpoint container");
		}
		PathFilter specFilter = container.getSchema().searchFor(TraceBreakpointSpec.class, true);
		if (specFilter == null) {
			throw new IllegalArgumentException("Cannot find path to breakpoint specifications");
		}
		KeyPath specRelPath = specFilter.applyKeys(name).getSingletonPath();
		if (specRelPath == null) {
			throw new IllegalArgumentException("Too many wildcards to breakpoint specification");
		}
		PathFilter locFilter = container.getSchema()
				.getSuccessorSchema(specRelPath)
				.searchFor(TraceBreakpointLocation.class, true);
		if (locFilter == null) {
			throw new IllegalArgumentException("Cannot find path to breakpoint locations");
		}
		KeyPath locRelPath = locFilter.applyIntKeys(0).getSingletonPath();
		if (locRelPath == null) {
			throw new IllegalArgumentException("Too many wildcards to breakpoint location");
		}
		return container.getCanonicalPath().extend(specRelPath).extend(locRelPath).toString();
	}

	@Override
	public CompletableFuture<Void> execute() {
		try (Transaction tx = trace.openTransaction("Place Emulated Breakpoint")) {
			// Defaults with emuEnable=true
			TraceBreakpointLocation loc = trace.getBreakpointManager()
					.addBreakpoint(computePath(), Lifespan.at(snap),
						BreakpointActionItem.range(address, length), Set.of(), kinds, false, null);
			loc.setName(snap, createName(address));
			loc.setEmuSleigh(snap, emuSleigh);
			return AsyncUtils.nil();

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Adopt the standard managed-object schema that pairs breakpoint specifications with locations.
  2. Ensure the schema defines a TraceBreakpointLocation-typed successor under the spec path.
  3. Recreate the trace using the debugger's default schema.
  4. Disable emu breakpoint placement for schemas lacking location support.

Example fix

// before
PathFilter locFilter = container.getSchema()
    .getSuccessorSchema(specRelPath)
    .searchFor(TraceBreakpointLocation.class, true);
if (locFilter == null) throw ...; // 'Cannot find path to breakpoint locations'

// after (precondition guard)
if (locFilter == null) {
    throw new IllegalStateException(
        "Schema lacks breakpoint locations under " + specRelPath);
}
Defensive patterns

Strategy: validation

Validate before calling

PathFilter f = container.getSchema().getSuccessorSchema(specRelPath)
    .searchFor(TraceBreakpointLocation.class, true);
boolean ok = f != null;

Type guard

static boolean schemaHasLocPath(TraceObject container, KeyPath specRelPath) {
    return container.getSchema().getSuccessorSchema(specRelPath)
        .searchFor(TraceBreakpointLocation.class, true) != null;
}

Try / catch

try {
    item.execute();
} catch (IllegalArgumentException e) {
    Msg.showError(this, null, "Schema missing locations", e.getMessage());
}

Prevention

When it happens

Trigger: container.getSchema().getSuccessorSchema(specRelPath).searchFor(TraceBreakpointLocation.class, true) returns null on a schema that models specs but not their locations.

Common situations: A partial or custom object schema that includes TraceBreakpointSpec but omits TraceBreakpointLocation; incompatible schema versions; schemas for object models that separate spec and location incorrectly.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/2b363bc2703457e2. Report an issue: GitHub.