Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

fix: 历史原生棋盘初始化时原生卡牌构造空引用 #338

Description

@cauyxy

历史原生棋盘初始化失败

背景

历史面板使用独立的 MonsterBoardTooltip 实例展示双方物品、技能和默认地毯;战斗舞台已移除。

当前问题

运行日志反复报告 history_panel.card_preview.degraded。异常为 NullReferenceException,栈位于 AssetLoader.ConstructAndInstantiateUICard 中的 GameObject.get_transform,随后经过 MonsterBoardTooltip.AddCard、HandleBoardState 到 OwnedMonsterBoardPreview.ReplaceAfter。不是素材地址未找到或默认地毯缺失。

排查候选

  • 原生 InstantiateUICardAsync 对传入实例存在额外构造要求,导致实例化结果为空。
  • 原生池返回失效对象。
  • 异步期间对象被回收,访问 transform 时失效。

验证方法

保留当前故障日志,核对安装版本的反编译代码与异常 IL 偏移。以相同历史记录的物品和技能构造过程建立回归检查;修复后重新打开该记录,确认双方棋盘展示且对应异常不再出现。编译和通用测试不能替代实机验证。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions