egametang/ET · error · Exception

process fiber address not found, sceneType

Error message

process fiber address not found, sceneType: {sceneType}

What it means

ProcessFiberAddressSingleton.Get (line 50) throws when no fiber is registered for the requested sceneType. This singleton maps sceneType -> FiberInstanceId for in-process cross-fiber addressing; an unregistered sceneType means the process has no fiber serving that scene type to route to.

Solutions

  1. Confirm the sceneType is actually configured to run in this process (StartSceneConfig for the process/role).
  2. Ensure Get is called after the target fiber has registered (check startup ordering).
  3. Use TryGet(sceneType, out _) before Get to handle the absent case gracefully.
  4. Verify the sceneType id matches between the router and the scene config.

Example fix

// before
FiberInstanceId id = addressSingleton.Get(sceneType);

// after
if (!addressSingleton.TryGet(sceneType, out FiberInstanceId id))
{ Log.Warning($"no process fiber for sceneType {sceneType}"); return; }
Defensive patterns

Strategy: validation

Validate before calling

if (!addressSingleton.TryGet(sceneType, out var fid))
    throw new InvalidOperationException($"sceneType {sceneType} not registered in this process");

Type guard

static bool HasProcessFiber(ProcessFiberAddressSingleton s, int sceneType) => s.TryGet(sceneType, out _);

Prevention

When it happens

Trigger: Calling addressSingleton.Get(sceneType) for a sceneType that was never created/registered in this process (e.g. routing a message to a scene type not present in this process's StartConfig), or calling before the target fiber finished registering.

Common situations: Cross-process/routing configuration that assumes a scene type exists in a process where it is not configured, startup ordering (Get called before Register), wrong sceneType id, or a process role mismatch.

Related errors


AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13). Data as JSON: /api/errors/3bf7188ba85834c7. Report an issue: GitHub.

Appendix: source

Thrown at Packages/cn.etetet.core/Scripts/Core/Share/World/Fiber/ProcessFiberAddressSingleton.cs:50

            }

            if (existing == fiberInstanceId)
            {
                return;
            }

            throw new Exception(
                $"process fiber address already registered, sceneType: {sceneType}, existing: {existing}, new: {fiberInstanceId}");
        }

        public FiberInstanceId Get(int sceneType)
        {
            if (this.TryGet(sceneType, out FiberInstanceId fiberInstanceId))
            {
                return fiberInstanceId;
            }

            throw new Exception($"process fiber address not found, sceneType: {sceneType}");
        }

        public bool TryGet(int sceneType, out FiberInstanceId fiberInstanceId)
        {
            return this.fiberInstanceIds.TryGetValue(sceneType, out fiberInstanceId);
        }

        public void Unregister(int sceneType, FiberInstanceId fiberInstanceId)
        {
            if (!this.fiberInstanceIds.TryGetValue(sceneType, out FiberInstanceId existing))
            {
                return;
            }

            if (existing != fiberInstanceId)
            {
                return;
            }

View on GitHub (pinned to 5cab01f7a8)