Unity-Technologies / Unity-Technologies/com.unity.netcode.gameobjects

Potential bug. NGO causes Nintendo Switch to freeze.

未关闭
#3,053 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

priority:high stat:imported type:bug
主要语言
C#
星标
2.3k
派生
461
平均合并
3 天 16 小时
30 天内合并 PR
20

描述

Description

If you put the console to sleep for a long period of time the console will hang for a period of time.

Reproduce Steps
  1. Start the game or test project
  2. Start a host but do not let any client in
  3. Put the console sleep
  4. Wait a few hours (The longer it sleeps the longer will be the freeze)
  5. Turn the console back on and return to the game.
Actual Outcome

The game is frozen for a certain amount of time. After a while the game is playable again.

Expected Outcome

The game doesn't freeze and Gameplay continue, (Except when playing online)

Environment
  • Unity Version: 2022.3.30f
  • Netcode Version: 1.9
Additional Context

Looking at a nxdump, it seems like the game is freezing in some loop somewhere involving NetworkTime, I did not have the chance to look deeper but I wanted to bring more eyes on the issue. This was the "suspicious" part I found in the dump.

IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void NetworkTime__ctor_mD40214D6A925F3027C77DA7051C210F487C0CC55 (NetworkTime_t2E4697E4558B217C431021D2CC30A9306E778B5F* __this, uint32_t ___0_tickRate, int32_t ___1_tick, double ___2_tickOffset, const RuntimeMethod* method)

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在只有一个 host 且没有客户端的情况下重现睡眠和恢复场景,然后检查 NetworkTime__ctor_mD40214D6A925F3027C77DA7051C210F487C0CC55 附近的 nxdump。跟踪疑似的 NetworkTime 循环,并验证游戏在 Nintendo Switch 上经过长时间睡眠后能够恢复,且不会长时间卡死。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp, unity
领域
game-dev, networking
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。