Unity-Technologies / com.unity.netcode.gameobjects

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.15k stars 435 forks source link

Potential bug. NGO causes Nintendo Switch to freeze. #3053

Open qjonathan opened 2 months ago

qjonathan commented 2 months ago

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

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 NetworkTimector_mD40214D6A925F3027C77DA7051C210F487C0CC55 (NetworkTime_t2E4697E4558B217C431021D2CC30A9306E778B5F* this, uint32_t _0_tickRate, int32t 1_tick, double ___2_tickOffset, const RuntimeMethod* method)