In our Unity game, we're seeing a problem that we cannot solve for weeks. At random points in the game, the FPS drops to zero and nothing moves for 3-4 seconds, then everything gets updated in 1 frame as if the freeze has not happened. It seems it's a rendering problem because absolutely nothing goes wrong with the game's logic and functionalities, everything works as expected after the mini-freeze. Even the user's touches in that time window are processed afterward.
- Unity version: 2019.4.31f1
- Optimized Frame Pacing: Disabled
- Use incremental GC: Enabled
- Target Architectures: ARMv7 + ARM64 built as an AAB file
- Scripting Backend: IL2CPP
- Graphics API: OpenGLES2
- Application.targetFrameRate : 60
- Vsync count: Don't Sync
- Multithreaded Rendering: Enabled
- It is not a full freeze. New frames do get rendered if you wait long enough.
- In the unity profiler we can see, that when the issue occurs the main thread seems to be waiting for "gfx.presentframe" on the render thread.
We could reproduce the issue on these devices: (All are 64-bit, Androids are 11 or 12)
- Samsung Galaxy A30
- Samsung S20 FE
- Xiaomi Poco X3
- Samsung A21s
- Huawei Honor 50
- Samsung S22 Ultra
Our problem is exactly like this Question, The difference is that in our game, Optimized Frame Pacing is already disabled, so disabling it cannot solve the issue for us.
Here's a Screenshot of the Unity profiler when this problem occurred, Look at the selected frame.
We are really stuck with the problem and any helpful thoughts or suggestions will make us smile! Thanks in Advance!