Page MenuHome

Cycles world MIS segfault
Closed, ResolvedPublic

Description

System Information
Arch Linux 64bit
GCC 4.9.0

Blender Version
Broken: git master
Worked: official + buildbot

Short description of error
Turning on MIS for world environment texture crashes Blender with either CPU or GPU/CUDA

Exact steps for others to reproduce the error
In Cycles world tab, use an environment texture (.exr/.hdr). Pressing shift+z and it is working - enabling MIS crashes Blender, whether in rendered mode or not. Without knowing, I suspect it is related to GCC 4.9.0, like with previous crash bugs some weeks ago.

Crash log

Blender 2.70 (sub 5), Commit date: 2014-06-05 20:14, Hash 98bf395

bpy.context.space_data.context = 'WORLD' # Property
bpy.ops.image.open(filepath="/projects/textures/uffizi-large.exr", directory="/projects/textures/", files=[{"name":"uffizi-large.exr", "name":"uffizi-large.exr"}], relative_path=True) # Operator
bpy.context.scene.world.cycles.sample_as_light = True # Property
bpy.context.scene.world.cycles.sample_as_light = True # Property

backtrace

./blender() [0x8d3d88]
/usr/lib/libc.so.6(+0x33df0) [0x7f46e4734df0]
./blender(_ZN3ccl12LightManager24device_update_backgroundEPNS_6DeviceEPNS_11DeviceSceneEPNS_5SceneERNS_8ProgressE+0x799) [0x159b239]
./blender(_ZN3ccl12LightManager13device_updateEPNS_6DeviceEPNS_11DeviceSceneEPNS_5SceneERNS_8ProgressE+0xdc) [0x159baac]
./blender(_ZN3ccl5Scene13device_updateEPNS_6DeviceERNS_8ProgressE+0x4ef) [0x15c72bf]
./blender(_ZN3ccl7Session12update_sceneEv+0x146) [0x15ca4e6]
./blender(_ZN3ccl7Session7run_cpuEv+0x15f) [0x15cc28f]
./blender(_ZN3ccl7Session3runEv+0x1a5) [0x15cd1d5]
./blender(_ZN3ccl6thread3runEPv+0x19) [0x15cdef9]
/usr/lib/libpthread.so.0(+0x7124) [0x7f46f0b01124]
/usr/lib/libc.so.6(clone+0x6d) [0x7f46e47ea4bd]

Event Timeline

Ejner Fergo (ejnersan) set Type to Bug.
Ejner Fergo (ejnersan) created this task.
Ejner Fergo (ejnersan) raised the priority of this task from to Needs Triage by Developer.

Please always post blend files, this way if we can't redo the bug, we know its not because of some minor difference in the configuration.

Campbell Barton (campbellbarton) triaged this task as Needs Information from User priority.Jun 6 2014, 8:09 AM

Sorry Campbell, it happened on the default Cube scene (and eg. koro_final.blend where MIS is enabled) so didn't think to save a .blend! Here is one now. It isn't even necessary to load an environment texture first - just enabling the world MIS and shift to rendered mode crashes Blender for me.

I can't redo here but also don't have GCC 4.9 installed. Looking at https://gcc.gnu.org/gcc-4.9/porting_to.html, I see there is one memset in this part of the code but it looks ok to me. There's also some tricky array indexing but it stays within bounds as far as I can tell.

Does anyone have a backtrace with debug symbols for this? Seems like something that could be easy to solve, but it's not clear to me what exactly is crashing.