TH1/MD/CrashSight_2026-06-05_0.7.2c_1day/blocking/007_map-click-move-keynotfound.md

5.5 KiB
Raw Blame History

点击移动字典 Key 缺失

  • 分类blocking
  • Issue 数1
  • 0.7.2c 最近一天次数4
  • 设备数合计4
  • 报告生成2026-06-05 12:00:37

Issue

Issue 类型 次数 设备 最近上报 消息
ab9f079f9f66a99ede0ba5a44ba49676 UnityLogError 4 4 2026-06-05 07:44:13 Timer任务执行异常: 错误信息: MapInteraction_OnTileClicked_Move 异常类型: System.Collections.Generic.KeyNotFoundException 异常信息: The given key '579' was not present in the dictionary. 调用堆栈: at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x00000] in <00000000000000000000000000000000>:0 at fj.bgn (System.UInt32 a) [0x00000] in <00000000000000000…

设备上下文

ab9f079f9f66a99ede0ba5a44ba49676

  • 样本 CrashIdafe9ccf1e48e4b2d957c56e4c8c393c4
  • 样本 DeviceIdfc-5c-ee-66-7f-30
  • CrashSight 附带日志文件:False

最终上报内容:

UnityLogError
Timer任务执行异常:
错误信息: MapInteraction_OnTileClicked_Move
异常类型: System.Collections.Generic.KeyNotFoundException
异常信息: The given key '852' was not present in the dictionary.
调用堆栈:   at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x00000] in <00000000000000000000000000000000>:0 
  at fj.bgn (System.UInt32 a) [0x00000] in <00000000000000000000000000000000>:0 
  at gi.bla (cfo a, bsr b) [0x00000] in <00000000000000000000000000000000>:0 
  at i.oj () [0x00000] in <00000000000000000000000000000000>:0 
  at TH1_Logic.Core.Main.Update () [0x00000] in <00000000000000000000000000000000>:0 
目标对象: gi
UnityEngine.Debug.LogError(Object)
hk.LogError(String, Object)
i.oj()
TH1_Logic.Core.Main.Update()

UnityEngine.Debug.LogError(Object)
hk.LogError(String, Object)
i.oj()
TH1_Logic.Core.Main.Update()

UnityEngine.Debug.LogError(Object)
hk.LogError(String, Object)
i.oj()
TH1_Logic.Core.Main.Update()

UnityLogError
Timer任务执行异常:
错误信息: MapInteraction_OnTileClicked_Move
异常类型: System.Collections.Generic.KeyNotFoundException
异常信息: The given key '852' was not present in the dictionary.
调用堆栈:   at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x00000] in <00000000000000000000000000000000>:0 
  at fj.bgn (System.UInt32 a) [0x00000] in <00000000000000000000000000000000>:0 
  at gi.bla (cfo a, bsr b) [0x00000] in <00000000000000000000000000000000>:0 
  at i.oj () [0x00000] in <00000000000000000000000000000000>:0 
  at TH1_Logic.Core.Main.Update () [0x00000] in <00000000000000000000000000000000>:0 
目标对象: gi
UnityEngine.Debug.LogError(Object)
hk.LogError(String, Object)
i.oj()
TH1_Logic.Core.Main.Update()

同设备最近 ERROR 上报序列:

时间 Issue 类型 消息
2026-06-05 07:44:13 ab9f079f9f66a99ede0ba5a44ba49676
2026-06-05 05:38:32 691253c2a412f07945231dd650f58213
2026-06-05 03:49:53 83c5b5b46447ac4e50101f1148f4ab70
2026-06-05 03:47:01 10d4df507992c1a66a90693df20b21c3
2026-06-05 03:31:21 bb81bce180d8672f500aa9f2021ec9f8

代码位置

  • Unity/Assets/Scripts\TH1_Logic\Map\MapInteraction.cs:251: },Table.Instance.AnimDataAssets.MoveAnimTime,"MapInteraction_OnTileClicked_Move");
  • Unity/Assets/Scripts\TH1_Logic\Map\MapInteraction.cs:299: },Table.Instance.AnimDataAssets.MoveAnimTime,"MapInteraction_OnTileClicked_Move");
  • Unity/Assets/Scripts\TH1_Renderer\MapRenderer.cs:594: public bool SetUnitAllMoveAttackTargetHighlight(uint uid) //渲染所有可移动位置的高亮,其中可以攻击的位置要标红,如果是自己人或者敌人在移动范围内但是不在攻击范围内,则不能高亮
  • Unity/Assets/Scripts\TH1_Renderer\MapRenderer.cs:642: ROGridMap[targetGridData.Id].SetMoveHighlight(true);
  • Unity/Assets/Scripts\TH1_Renderer\MapRenderer.cs:678: ROGridMap[targetGridData.Id].SetAttackHighlight(true);

解码结论

解码栈是 Timer.Update -> MapInteraction.OnTileClicked_Move 回调 -> TH1Renderer.MapRenderer.SetUnitAllMoveAttackTargetHighlight -> Dictionary<uint, ...>.get_Item,缺失 key 在样本里是 852,列表行里还有 579MapInteraction 在移动后延迟再次调用 OnTileClicked,若单位仍存活且 CheckUnitHasMoveAttackTarget 为真,就会重新计算移动攻击高亮;真正抛错点在 ROGridMap[targetGridData.Id]

这说明逻辑层算出的可移动/可攻击格子集合包含了渲染字典中不存在的 grid id或延迟回调执行时地图/渲染器状态已经变化。它与 009_maprenderer-highlight-keynotfound 是同一类根因,只是本 Issue 带有 MapInteraction_OnTileClicked_Move 定时器包装。后续症状可能包括移动后可继续攻击高亮不出现、错误格子高亮残留、或点击移动后 UI 交互中断。

判断

这是阻断类,因为 CrashSight 行或 LogError 包装内容中存在真实异常类型、异常对象或调用栈;不是单纯业务状态诊断。 本批样本 hasLogFile=falseAPI 能拿到的是最终上报内容和同设备 ERROR 上报序列,不包含完整 Unity 运行日志;根因上下文按可见上报链路记录。

建议

优先按次数最高的 Issue 样本复现并修复;若同设备上报序列中出现更早的异常,应以更早异常作为源头处理。