{"record":{"id":"2b363bc2703457e2","repo":"NationalSecurityAgency/ghidra","slug":"cannot-find-path-to-breakpoint-locations","errorCode":null,"errorMessage":"Cannot find path to breakpoint locations","messagePattern":"Cannot find path to breakpoint locations","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/breakpoint/PlaceEmuBreakpointActionItem.java","lineNumber":93,"sourceCode":"\t\tString name = createName(address);\n\t\tTraceObject container = findBreakpointContainer();\n\t\tif (container == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\"Address is not associated with a breakpoint container\");\n\t\t}\n\t\tPathFilter specFilter = container.getSchema().searchFor(TraceBreakpointSpec.class, true);\n\t\tif (specFilter == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot find path to breakpoint specifications\");\n\t\t}\n\t\tKeyPath specRelPath = specFilter.applyKeys(name).getSingletonPath();\n\t\tif (specRelPath == null) {\n\t\t\tthrow new IllegalArgumentException(\"Too many wildcards to breakpoint specification\");\n\t\t}\n\t\tPathFilter locFilter = container.getSchema()\n\t\t\t\t.getSuccessorSchema(specRelPath)\n\t\t\t\t.searchFor(TraceBreakpointLocation.class, true);\n\t\tif (locFilter == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot find path to breakpoint locations\");\n\t\t}\n\t\tKeyPath locRelPath = locFilter.applyIntKeys(0).getSingletonPath();\n\t\tif (locRelPath == null) {\n\t\t\tthrow new IllegalArgumentException(\"Too many wildcards to breakpoint location\");\n\t\t}\n\t\treturn container.getCanonicalPath().extend(specRelPath).extend(locRelPath).toString();\n\t}\n\n\t@Override\n\tpublic CompletableFuture<Void> execute() {\n\t\ttry (Transaction tx = trace.openTransaction(\"Place Emulated Breakpoint\")) {\n\t\t\t// Defaults with emuEnable=true\n\t\t\tTraceBreakpointLocation loc = trace.getBreakpointManager()\n\t\t\t\t\t.addBreakpoint(computePath(), Lifespan.at(snap),\n\t\t\t\t\t\tBreakpointActionItem.range(address, length), Set.of(), kinds, false, null);\n\t\t\tloc.setName(snap, createName(address));\n\t\t\tloc.setEmuSleigh(snap, emuSleigh);\n\t\t\treturn AsyncUtils.nil();","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/breakpoint/PlaceEmuBreakpointActionItem.java#L75-L111","documentation":"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.","triggerScenarios":"container.getSchema().getSuccessorSchema(specRelPath).searchFor(TraceBreakpointLocation.class, true) returns null on a schema that models specs but not their locations.","commonSituations":"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.","solutions":["Adopt the standard managed-object schema that pairs breakpoint specifications with locations.","Ensure the schema defines a TraceBreakpointLocation-typed successor under the spec path.","Recreate the trace using the debugger's default schema.","Disable emu breakpoint placement for schemas lacking location support."],"exampleFix":"// before\nPathFilter locFilter = container.getSchema()\n    .getSuccessorSchema(specRelPath)\n    .searchFor(TraceBreakpointLocation.class, true);\nif (locFilter == null) throw ...; // 'Cannot find path to breakpoint locations'\n\n// after (precondition guard)\nif (locFilter == null) {\n    throw new IllegalStateException(\n        \"Schema lacks breakpoint locations under \" + specRelPath);\n}","handlingStrategy":"validation","validationCode":"PathFilter f = container.getSchema().getSuccessorSchema(specRelPath)\n    .searchFor(TraceBreakpointLocation.class, true);\nboolean ok = f != null;","typeGuard":"static boolean schemaHasLocPath(TraceObject container, KeyPath specRelPath) {\n    return container.getSchema().getSuccessorSchema(specRelPath)\n        .searchFor(TraceBreakpointLocation.class, true) != null;\n}","tryCatchPattern":"try {\n    item.execute();\n} catch (IllegalArgumentException e) {\n    Msg.showError(this, null, \"Schema missing locations\", e.getMessage());\n}","preventionTips":["Ensure schemas pair spec and location interfaces.","Use the default managed-object schema."],"tags":["breakpoint","emu","schema","location","path","trace"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}