diff --git a/src/AcDream.App/Rendering/Wb/WbMeshAdapter.cs b/src/AcDream.App/Rendering/Wb/WbMeshAdapter.cs index 0d8dee8..9893e31 100644 --- a/src/AcDream.App/Rendering/Wb/WbMeshAdapter.cs +++ b/src/AcDream.App/Rendering/Wb/WbMeshAdapter.cs @@ -175,7 +175,30 @@ public sealed class WbMeshAdapter : IDisposable, IWbMeshAdapter } else if (t.IsCompletedSuccessfully && t.Result is null) { - Console.WriteLine($"[indoor-upload] NULL_RESULT cellId=0x{cellId:X8}"); + // Phase 2 cause-narrowing: WB's PrepareMeshData can return + // null for several reasons (ResolveId empty / TryGet + // failed / type Unknown). Cross-check against acdream's own + // DatCollection — if WE find the cell but WB doesn't, the + // divergence is between dat readers, not a missing record. + bool ourCellFound = false; + try + { + ourCellFound = _dats?.Cell.TryGet( + (uint)cellId, out _) ?? false; + } + catch { /* swallow — this is best-effort diagnostic */ } + + int wbResolveCount = -1; + try + { + wbResolveCount = _wbDats?.ResolveId((uint)cellId).Count() ?? -1; + } + catch { /* swallow — best-effort */ } + + Console.WriteLine( + $"[indoor-upload] NULL_RESULT cellId=0x{cellId:X8} " + + $"ourCellDb.TryGet={ourCellFound} " + + $"wbResolveId.Count={wbResolveCount}"); } }, TaskScheduler.Default); }