feat(wb): extend NULL_RESULT probe with reader-divergence diagnostic
Phase 2 Task 1's continuation logged [indoor-upload] NULL_RESULT when WB's PrepareMeshDataAsync returned null. Extend the line to include two cross-checks: ourCellDb.TryGet=<bool> — acdream's DatCollection.Cell.TryGet<EnvCell> wbResolveId.Count=<int> — WB's DefaultDatReaderWriter.ResolveId().Count This narrows the cause among WB's null-return paths (ResolveId empty vs TryGet<EnvCell> failure vs wrong type). Best-effort: both calls wrapped in try/catch so diagnostic failures don't propagate. Capture: 55 NULL_RESULTs across multiple landblocks ALL show ourCellDb.TryGet=True + wbResolveId.Count=1. Both readers find the cells in their indices, but WB's downstream PrepareMeshData logic still returns null. Divergence is downstream of ResolveId. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
011a5e43f4
commit
914638819d
1 changed files with 24 additions and 1 deletions
|
|
@ -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<EnvCell>
|
||||
// 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<DatReaderWriter.DBObjs.EnvCell>(
|
||||
(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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue