{"record":{"id":"ab6deba0eca0f3f3","repo":"egametang/ET","slug":"actor-is-the-same-process-actorid","errorCode":null,"errorMessage":"actor is the same process: {actorId}","messagePattern":"actor is the same process: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"Packages/cn.etetet.netinner/Scripts/Hotfix/Server/ProcessOuterSenderSystem.cs","lineNumber":205,"sourceCode":"            self.SendInner(actorId, message as MessageObject);\n        }\n\n        private static void SendInner(this ProcessOuterSender self, ActorId actorId, MessageObject message)\n        {\n            if (actorId == default)\n            {\n                throw new Exception($\"actor id is 0: {message}\");\n            }\n            \n            if (message == null)\n            {\n                throw new Exception($\"message is null\");\n            }\n\n            // 如果发向同一个进程，则报错\n            if (actorId.Address == self.GetSingleton<AddressSingleton>().InnerAddress)\n            {\n                throw new Exception($\"actor is the same process: {actorId}\");\n            }\n            Session session = self.Get(actorId.Address);\n            session.Send(actorId.FiberInstanceId, message);\n        }\n\n        private static int GetRpcId(this ProcessOuterSender self)\n        {\n            return ++self.RpcId;\n        }\n\n        public static async ETTask<IResponse> Call(this ProcessOuterSender self, ActorId actorId, IRequest iRequest, bool needException = true)\n        {\n            if (actorId == default)\n            {\n                throw new Exception($\"actor id is 0: {iRequest}\");\n            }\n            Fiber fiber = self.Fiber();\n            ","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/egametang/ET/blob/5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f/Packages/cn.etetet.netinner/Scripts/Hotfix/Server/ProcessOuterSenderSystem.cs#L187-L223","documentation":"ProcessOuterSender is the cross-process channel; if the destination actorId.Address equals the current process's own InnerAddress, the framework refuses to send — outer sends to self indicate a routing logic error (you should use ProcessInnerSender for same-process delivery). Thrown to catch misconfigured routing early.","triggerScenarios":"The caller resolved a target process address that is actually this process's own address; a configuration error maps a scene type to the local process when it should be remote; the ProcessFiberAddressSingleton returned the local address for a scene that lives here.","commonSituations":"Misconfigured start/config files that assign the same address to two roles; logic that assumes a scene is on another process but it co-locates here; during single-process development where everything runs locally but outer-channel calls are still made.","solutions":["Check whether the intended channel is ProcessInnerSender (same process) instead of ProcessOuterSender.","Verify the address configuration: the target scene's address should differ from InnerAddress for outer sends.","Route based on SceneType location — if the scene is local, use the inner sender path."],"exampleFix":"// before — always uses outer sender\nouterSender.Send(actorId, msg);\n\n// after — choose channel by address\nif (actorId.Address == innerAddress)\n{\n    processInnerSender.Send(actorId.FiberInstanceId, msg);\n}\nelse\n{\n    outerSender.Send(actorId, msg);\n}","handlingStrategy":"validation","validationCode":"var innerAddr = self.GetSingleton<AddressSingleton>().InnerAddress;\nif (actorId.Address == innerAddr) { /* use ProcessInnerSender instead */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Choose the sender by address: inner for same-process, outer for cross-process.","Validate address configuration so scenes are not mapped to the local process when remote is intended.","Add a routing helper that picks the channel automatically."],"tags":["et-framework","validation","routing","network"],"backgroundTag":null,"analyzedSha":"5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f","analyzedAt":"2026-08-13T21:10:40.377Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}