Search Issue Tracker

Fixed in 2022.2.X

Fixed in 2021.2.X, 2022.1.X

Votes

2

Found in

2020.2.0a7

2021.2.1f1

2022.1

2022.2

Issue ID

1389093

Regression

Yes

[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

Notes:
- Reproducible on Windows with NVIDIA GeForce RTX 2080Ti GPU;
- The crash is not reproducible on macOS (both Intel-based and M1) ; only the assertion in 'm_OpenCLRenderLightmapBuffers.HasBakingBuffers()' is shown;
- 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.

Comments (2)

  1. Kexo1

    Feb 29, 2024 08:23

    Same error, everyrhing turns white after baking.

    Unity 2023.3.20f1
    GPU: RX 6800 XT

  2. octaviotastico

    Feb 04, 2024 05:36

    I'm having this error. I'm using Unity 2022.3.16f1, I have an RTX 3060ti, my os is Windows 11.

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.