Search Issue Tracker


Planned for 2021.2.X



Found in




Issue ID




[GPU PLM] Crash after enabling Auto at the end of Bake - OpenCLRenderLightmapBuffers.HasBakingBuffers()

Progressive Lightmapper


Steps to repro:
1. Open the attached project and 'ProgressiveLightmappingExample' scene;
2. In the Preferences window (Edit > Preferences) go to the GICache tab and click the 'Clean Cache" button;
3. In the Lighting window (Window > Rendering > Lighting) click Generate Lighting button;
4. At the end of GI baking (observe the progress bar for spotting it) enable Auto Generate checkbox in the Lighting window.

Expected result:
Editor finishes an auto-bake without crashes.

Actual result:
Editor crashes in 0x00007FF926234207 (nvopencl64) clGetPlatformInfo and following assertion shown: "Assertion failed on expression: 'm_OpenCLRenderLightmapBuffers.HasBakingBuffers()'
". See attached video.

Reproduced in: 2021.2.1f1, 2021.2.2f1, 2022.1.0a15
Not Reproduced in: 2019.4.28f1, 2020.3.22f1, 2021.1.28f1, 2021.2.0f1

Full callstack:
0x00007FF926234207 (nvopencl64) clGetPlatformInfo
0x00007FF926216935 (nvopencl64) clGetPlatformInfo
0x00007FF92623E8C3 (nvopencl64) clGetExtensionFunctionAddress
0x00007FF92623FC25 (nvopencl64) clGetExtensionFunctionAddress
0x00007FF92623211B (nvopencl64) clGetPlatformInfo
0x00007FF9262326B4 (nvopencl64) clGetPlatformInfo
0x00007FF7989E97B8 (Unity) OpenCLKernelWrapper::EnqueueNDRangeKernel
0x00007FF798A44B4C (Unity) GPULightmapperHelper::DoDirectAndOcclusionForAnalyticalLights
0x00007FF798A50775 (Unity) RadeonRaysBakeLightmapTechnique::Render
0x00007FF798A103E2 (Unity) BakeJobRenderLightmaps::Execute
0x00007FF7989C7B11 (Unity) ProcessJobs
0x00007FF7989D139A (Unity) BakeContextManager::UpdateFunction
0x00007FF7989BDB15 (Unity) BakeContextManager::DispatchUpdateFunction
0x00007FF7975E9887 (Unity) Thread::RunThreadWrapper
0x00007FF9DE887034 (KERNEL32) BaseThreadInitThunk
0x00007FF9DEA22651 (ntdll) RtlUserThreadStart

- Reproducible on Windows with NVIDIA GeForce RTX 2080Ti GPU;
- The case might not be reproducible consistently. To increase the reproduction rate please consider the following:
- Restart Editor and repeat all the steps;
- The case might be timing-specific: consider executing step 4 at different stages of the bake;
- The case seems to have more symptoms: sometimes a bake might stall completely instead of crash, a fallback to CPU happens and sometimes only the aforementioned assertion is shown;
- Ensure that you've baked the scene successfully prior to executing the repro steps, this seems to have an effect on the case repro rate;
- Changing the Lighting settings (i.e. Direct/Indirect Samples) between the bakes or during the bake (sometimes) might also trigger the crash.

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.