Search Issue Tracker
Fixed in 2021.2.X
Duplicate in 2019.4.X, 2020.1.X
Fixed in 2020.2.X, 2021.1.X
Votes
70
Found in
2019.3.15f1
2019.4
2021.1
Issue ID
1276854
Regression
No
CPU usage spikes in the Loading.LockPersistentManager when async loading/unloading Scenes with Terrain
How to reproduce:
1. Open the attached "ReproProject.zip" project
2. Open the "Game Streamer Scene" Scene (Assets/NatureManufacture Assets/WorldStreamer/Tutorial Work and Game Scenes)
3. Make sure the Profiler window is opened (Window -> Analysis -> Profiler)
4. Enter Play Mode
5. Move the Camera in the Game view with WASD keys while holding the shift key on the keyboard
6. Press the Pause button when huge CPU usage spikes in the Profiler window are visible
7. Observe the Profiler's Overview section of the spikes
Expected result: No CPU usage spikes are in the Loading.LockPersistentManager in the Profiler's Overview section
Actual result: A huge CPU usage spike in the Loading.LockPersistentManager (Around 60 % usage can be seen in the Profiler's Overview section)
Reproducible with: 2019.4.13f1, 2020.1.10f1, 2020.2.0b8, 2021.1.0a1
Could not test with: 2018.4.28f1 (Due to errors with missing functionality)
Note:
- In 2020.2.0b8, 2021.1.0a1 CPU usage spikes are instead from "LogStringToConsole" and the whole Scene freezes for 1-2 seconds when moving around it, but the CPU usage spikes are still coming from Camera's Culling
-
Ryan-Hayle
Feb 04, 2021 21:45
Can you say what version of Unity 2020.2.x you plan to release the fix on please?
-
amynox
Nov 18, 2020 00:02
We really need a fix for this ASAP !
-
Ryan-Hayle
Nov 07, 2020 22:36
You have stated that the above issue was fixed in Unity 2019.4.14f1, however it is still broken. Please reopen and fix ASAP.
-
amynox
Oct 26, 2020 11:00
Same issue here. Please fix this Unity.
-
potvinp
Oct 21, 2020 19:13
Same issue here. Please fix this Unity.
-
tystevens2323
Oct 21, 2020 19:11
Suck my anus unity fix this!
-
marcrem
Oct 21, 2020 18:31
Same.
-
MostHated
Oct 19, 2020 19:33
I am, unfortunately, having this issue, too.
-
pokruchin
Oct 19, 2020 18:52
Agree, experiencing the same issue as well.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- SpeedTree importer fails to import .st files when path to the project includes a special character
- [VFX Graph] HSLS Redefinition error when input have the same name as attributes
- [VFX Graph] HLSL VFXFIXED_RAND isn't working
- Crash on Meta Quest 2 when using Vulkan
- Greyed out Icon for Tool Context is misaligned in the Tools Overlay in the URP 3D Sample Template
Resolution Note (fix version 2021.2):
The Terrain Team has managed to fix this issue within the Terrain code but after investigation we found the true reason behind it was that the PersistentManager locks up all PPtr dereferences while scenes are being asynchronously loaded. We fixed this in the Terrain code by avoiding PPtr dereferencing as much as possible.
A deeper fix is still yet to be made because PPtr can still happen anywhere, including in user scripts, we're tracking this secondary fix over in this issue: https://issuetracker.unity3d.com/issues/cpu-usage-spikes-in-the-loading-dot-lockpersistentmanager-when-async-loading-slash-unloading-scenes