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

Progressive Lightmapper

-

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).

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.