Blender

Blender

Blender 5.3 Cycles Crashes When Hiding a Volume Scatter Object (RTX 4070 / OptiX)
I'm experiencing a strange issue with Blender 5.3 and Cycles using OptiX on my NVIDIA RTX 4070.

I created a cube to simulate volumetric fog using a Volume Scatter shader. Everything works perfectly fine as long as the cube remains visible.

However, whenever I try to hide the volume cube, Cycles crashes.

What happens:
- The volume cube works normally while visible.
- Hiding the cube causes Cycles to crash immediately.
- After reopening Blender, the Cycles viewport only displays a gray screen and rendering produces no results.
- The same issue occurs even in a completely new Blender file.
- Setting Cycles Render Devices to None restores normal rendering through the CPU.

Error messages from the Blender system console:

cycles | ERROR Invalid value in cuCtxPushCurrent(device->cuContext)
cycles | ERROR Invalid context in cuCtxPopCurrent(nullptr)
cycles | ERROR Failed to retain CUDA context (Illegal address)

Solution: Clear the NVIDIA OptiX Cache

I managed to fix the issue by clearing the OptiX cache.

Here is how to do it:

1. Close Blender completely.
2. Press `Win + R` to open the Run dialog.
3. Enter the following path:

%LOCALAPPDATA%\NVIDIA\OptixCache

4. Press Enter.
5. Delete all files inside the OptixCache folder.
6. Restart Blender and use Cycles with OptiX again.

After clearing the OptiX cache, the problem disappeared and Cycles started working normally again.

System information:
- Blender: 5.3
- GPU: NVIDIA RTX 4070
- Render Engine: Cycles
- GPU Backend: OptiX
- Volume Shader: Volume Scatter

I'm sharing this in case anyone else encounters the same issue. I'm not sure whether this is a Blender 5.3 bug, an NVIDIA driver issue or a corrupted OptiX cache but clearing the cache fixed it in my case.