{"record":{"id":"b83a2936f7856611","repo":"NationalSecurityAgency/ghidra","slug":"method-requires-trace-binding","errorCode":null,"errorMessage":"Method requires trace binding","messagePattern":"Method requires trace binding","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-rmi-trace/src/main/py/src/ghidratrace/client.py","lineNumber":1274,"sourceCode":"        return self._batch_or_now(root, 'reply_get_object', _handle)\n\n    @staticmethod\n    def _read_values(reply: bufs.ReplyGetValues) -> List[Tuple[\n            DetachedObject, Lifespan, str, Tuple[Any, sch.Schema]]]:\n        return [\n            (Client._read_obj_desc(v.parent), Client._read_span(v.span),\n             v.key, Client._read_value(v.value))\n            for v in reply.values\n        ]\n\n    @staticmethod\n    def _read_argument(arg: bufs.MethodArgument,\n                       trace: Optional[Trace]) -> Tuple[str, Any]:\n        name = arg.name\n        value, schema = Client._read_value(arg.value)\n        if schema is sch.OBJECT:\n            if trace is None:\n                raise TypeError(\"Method requires trace binding\")\n            if not isinstance(value, DetachedObject):\n                raise TypeError(\n                    \"Internal: sch.OBJECT expects DetachedObject in args\")\n            id, path = value.id, value.path\n            return name, trace.proxy_object(id=id, path=path)\n        return name, value\n\n    @staticmethod\n    def _read_arguments(arguments: Iterable[bufs.MethodArgument],\n                        trace: Optional[Trace]) -> Dict[str, Any]:\n        kwargs = {}\n        for arg in arguments:\n            name, value = Client._read_argument(arg, trace)\n            kwargs[name] = value\n        return kwargs\n\n    def _get_values(self, id: int, span: Lifespan, pattern: str) -> Union[\n        List[Tuple[DetachedObject, Lifespan, str, Tuple[Any, sch.Schema]]],","sourceCodeStart":1256,"sourceCodeEnd":1292,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-rmi-trace/src/main/py/src/ghidratrace/client.py#L1256-L1292","documentation":"Raised as TypeError by Client._read_argument() when an incoming method argument has schema OBJECT but there is no Trace bound to the invocation (trace is None). An OBJECT argument must be materialized as a TraceObject belonging to a specific Trace; with no trace binding there is nowhere to anchor the object, so the deserialization cannot proceed.","triggerScenarios":"The server invokes a registered method whose argument list includes an OBJECT-typed parameter, but the request carried no oid (no trace was bound). This happens when a method is registered as not requiring a trace yet declares an object argument, or when a client invokes a method without an oid but passes an object.","commonSituations":"Registering a method with @method decorators where the trace binding flag disagrees with the presence of object arguments; client/server method-schema disagreement.","solutions":["Ensure methods that declare OBJECT arguments are bound to a trace (include an oid in the invocation).","Re-check the method's registration metadata so the trace-required flag matches its argument schema.","If the method is genuinely trace-less, do not declare object-typed arguments."],"exampleFix":"// before: method registered as trace-less but takes an object arg\n// after: bind the invocation to a trace / mark the method as trace-required","handlingStrategy":"validation","validationCode":"if arg_schema == sch.OBJECT and trace is None:\n    raise TypeError('Cannot bind object arg without a trace')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep method trace-binding flags consistent with their object arguments.","Bind trace-scoped invocations to a valid oid."],"tags":["internal","trace-rmi","method-invocation","object-model"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}