Page MenuHome

Crash with more then 8 suns on NVidia card
Closed, ResolvedPublic

Description

System Information
Windows 10, NVidia GTX 1050Ti

Blender Version
2.78
Worked: on ATI HD7750

Short description of error
Blender crashes when there are more then 8 suns in scene and I turn on Material viewport mode

Exact steps for others to reproduce the error
Please open attached file. There are 10 suns there, so it will crash when switched to Material mode. Delete 2 of them to prevent crash.

Event Timeline

There is shadow enabled for sun object. When I reduce shadow resolution (in Blender Grame mode) to 9000 Blender doesn't crash.

Confirm. But I'm not getting much info from VC2015 debugger other than this:

The thread 0xbe50 has exited with code 3 (0x3).
The thread 0xca40 has exited with code 3 (0x3).
The thread 0x940c has exited with code 3 (0x3).
The thread 0xdd58 has exited with code 3 (0x3).
The thread 0xe704 has exited with code 3 (0x3).
The thread 0x154e0 has exited with code 3 (0x3).
The thread 0x14ab4 has exited with code 3 (0x3).
The thread 0x1595c has exited with code 3 (0x3).
The thread 0xce74 has exited with code 3 (0x3).
The thread 0xc070 has exited with code 3 (0x3).
The thread 0x1e24 has exited with code 3 (0x3).
The thread 0xda54 has exited with code 3 (0x3).
The thread 0x15618 has exited with code 3 (0x3).
The thread 0x240c has exited with code 3 (0x3).
The thread 0x15ba8 has exited with code 3 (0x3).
The thread 0xcb2c has exited with code 3 (0x3).
The thread 0x14dec has exited with code 3 (0x3).
The program '[54804] blender.exe' has exited with code 3 (0x3).

Can't reproduce with latest master on Linux on a GTX780, might be a Windows driver issue.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Unknown Status.Aug 11 2017, 1:26 AM
Brecht Van Lommel (brecht) claimed this task.

The suns are hidden from rendering in the test .blend, they must be enabled first to have any effect. When duplicating them to get 24 suns I got a crash, where Blender was terminated by the out-of-memory killer. The same thing will happen on Windows.

The suns have shadow maps with resolution 10240x10240, and each will take up 400MB so that's 3.2GB total, which is way beyond what fits in GPU memory. In some cases we can catch out-of-memory cases and handle them gracefully with an error message. In this the crash happens inside the graphics driver before Blender has a chance to do anything about it, so not much we can improve here.

On windows I don't have to enable them (render icon on). I got crash only by enabling material preview. As I understand crash happens inside graphics driver because of lack of memory, but still why shadow maps are enabled for hidden suns and take memory?

Ok, it seems to crash also when they are disabled, just needs a few extra lamps here. It seems to compute shadow buffers even if the lamps are hidden in the viewport, I'll fix that.