Search Issue Tracker
Won't Fix
Votes
0
Found in
Issue ID
1266726
Regression
No
Failed bake related to GICache when doing concurrent bakes + docs issue
A user attempted to do concurrent player builds by executing Unity on the command line multiple times concurrently on the same machine.
This causes two separate bake processes to start and both processes modify the global GI cache. The user reports that the build process crashes with a message related to a GICache file operation. This is presumably because the GICache was never intended to handle multiple concurrent Editor instances manipulating the cache at the same time.
Error reported by user:
Error while rolling data back after failed file move operation from 'D:/Robocopy/HoloScene Dev_HoloScene Dev MR Proxy/HoloScene/HoloScene_MR/Unity_HoloScene_MR/Temp/UnityTempFile-d658c50bc17f9ea4ebd3afd5d7f50d6a' to 'C:/Users/jenkinsadmin/AppData/LocalLow/Unity/Caches/GiCache/91/9122ed471aedc4099b266da704788fae.LightingData.asset'. Backup is located at 'C:/Users/jenkinsadmin/AppData/LocalLow/Unity/Caches/GiCache/91/9122ed471aedc4099b266da704788fae.LightingData.asset.bak'
We may consider these potential solutions:
1) Somehow detect that two Unity instances are running and report a meaningful error to the console (or similar).
2) Make the GICache per-instance rather than global. This way each instance will not interfere with each other. Of course, the drawback here is that you cannot immediately reuse cached data across instance executions.
3) Wontfix. So far I have only heard about a single user running into this problem.
If we go with solution 2 we will probably also have to change this in the docs: "The cache is shared between all Unity projects on the computer, so projects with the same content and lightmapping backend can share the files." (https://docs.unity3d.com/Manual/GICache.html).
If we go with 1 or 3 we should probably update the docs to state that concurrent bakes are not support (maybe by updating this page https://docs.unity3d.com/Manual/lighting-precomputed-data.html).
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2021.2.X):
This can't be fixed in a robust way without a major rewrite of the caching system. This refactor is tracked in our backlog and will be prioritized accordingly.