Blender Crash - Probably node network - probably linked to new hashing code for displacement
Closed, ResolvedPublic

Description

System Information
Windows 10 5820K GTX 970

Blender Version
Broken: 2.79 q6968e8-win64

Short description of error
Blender crashes. This can sometimes be whilst editing in the node editor and sometimes whilst rendering. However, the debugger leads me to think it is the same error both times.

I believe it is linked to the new hashing code related to whether displacement needs updating.

I have attached output from Visual Studio in case it is any help.

The crash always seems to be (although clearly not everytime) whilst working out the hash for a FLOAT_ARRAY input to a COLOR_RAMP.

My scene file is quite big and I am struggling to reproduce in a simpler scene. Will keep trying.

Exact steps for others to reproduce the error
It is quite hard to do as sometimes it crashes a few minutes into using node editor and sometimes 20. The same with rendering, sometimes (at the start) of the first frame and sometimes (at the start) of the 30th frame.

Pretty sure it has nothing to do with GPU and rendering as my debug blender is not compiled with CUDA.

Related Objects

Sergey Sharybin (sergey) triaged this task as Normal priority.

@Brecht Van Lommel (brecht), not sure this is something to do with the root of this issue, but there are reports of uninitialized memory used in this function

1​==3152== Use of uninitialised value of size 8
2​==3152== at 0x13842ED1: _itoa_word (_itoa.c:180)
3​==3152== by 0x1384667F: vfprintf (vfprintf.c:1642)
4​==3152== by 0x138688A0: vsprintf (iovsprintf.c:42)
5​==3152== by 0x1384E7D3: sprintf (sprintf.c:32)
6​==3152== by 0x6712244: ccl::MD5Hash::get_hex() (util_md5.cpp:377)
7​==3152== by 0x3ABD644: ccl::ShaderGraph::compute_displacement_hash() (graph.cpp:710)
8​==3152== by 0x3B9AF58: ccl::Shader::set_graph(ccl::ShaderGraph*) (shader.cpp:242)
9​==3152== by 0x3A59E31: ccl::BlenderSync::sync_materials(bool) (blender_shader.cpp:1250)
10​==3152== by 0x3A5AC9D: ccl::BlenderSync::sync_shaders() (blender_shader.cpp:1440)
11​==3152== by 0x3A106CA: ccl::BlenderSync::sync_data(BL::RenderSettings&, BL::SpaceView3D&, BL::Object&, int, int, void**, char const*) (blender_sync.cpp:201)
12​==3152== by 0x39FFB45: ccl::BlenderSession::render() (blender_session.cpp:444)
13​==3152== by 0x39F7D68: ccl::render_func(_object*, _object*) (blender_python.cpp:289)
14​==3152== Uninitialised value was created by a stack allocation
15​==3152== at 0x3A513B4: ccl::get_float3(PointerRNA&, char const*) (blender_util.h:336)
16​==3152==
17​==3152== Conditional jump or move depends on uninitialised value(s)
18​==3152== at 0x13842ED8: _itoa_word (_itoa.c:180)
19​==3152== by 0x1384667F: vfprintf (vfprintf.c:1642)
20​==3152== by 0x138688A0: vsprintf (iovsprintf.c:42)
21​==3152== by 0x1384E7D3: sprintf (sprintf.c:32)
22​==3152== by 0x6712244: ccl::MD5Hash::get_hex() (util_md5.cpp:377)
23​==3152== by 0x3ABD644: ccl::ShaderGraph::compute_displacement_hash() (graph.cpp:710)
24​==3152== by 0x3B9AF58: ccl::Shader::set_graph(ccl::ShaderGraph*) (shader.cpp:242)
25​==3152== by 0x3A59E31: ccl::BlenderSync::sync_materials(bool) (blender_shader.cpp:1250)
26​==3152== by 0x3A5AC9D: ccl::BlenderSync::sync_shaders() (blender_shader.cpp:1440)
27​==3152== by 0x3A106CA: ccl::BlenderSync::sync_data(BL::RenderSettings&, BL::SpaceView3D&, BL::Object&, int, int, void**, char const*) (blender_sync.cpp:201)
28​==3152== by 0x39FFB45: ccl::BlenderSession::render() (blender_session.cpp:444)
29​==3152== by 0x39F7D68: ccl::render_func(_object*, _object*) (blender_python.cpp:289)
30​==3152== Uninitialised value was created by a stack allocation
31​==3152== at 0x3A513B4: ccl::get_float3(PointerRNA&, char const*) (blender_util.h:336)
32​==3152==
33​==3152== Conditional jump or move depends on uninitialised value(s)
34​==3152== at 0x13846737: vfprintf (vfprintf.c:1642)
35​==3152== by 0x138688A0: vsprintf (iovsprintf.c:42)
36​==3152== by 0x1384E7D3: sprintf (sprintf.c:32)
37​==3152== by 0x6712244: ccl::MD5Hash::get_hex() (util_md5.cpp:377)
38​==3152== by 0x3ABD644: ccl::ShaderGraph::compute_displacement_hash() (graph.cpp:710)
39​==3152== by 0x3B9AF58: ccl::Shader::set_graph(ccl::ShaderGraph*) (shader.cpp:242)
40​==3152== by 0x3A59E31: ccl::BlenderSync::sync_materials(bool) (blender_shader.cpp:1250)
41​==3152== by 0x3A5AC9D: ccl::BlenderSync::sync_shaders() (blender_shader.cpp:1440)
42​==3152== by 0x3A106CA: ccl::BlenderSync::sync_data(BL::RenderSettings&, BL::SpaceView3D&, BL::Object&, int, int, void**, char const*) (blender_sync.cpp:201)
43​==3152== by 0x39FFB45: ccl::BlenderSession::render() (blender_session.cpp:444)
44​==3152== by 0x39F7D68: ccl::render_func(_object*, _object*) (blender_python.cpp:289)
45​==3152== by 0x6D3F195: _PyCFunction_FastCallDict (methodobject.c:209)
46​==3152== Uninitialised value was created by a stack allocation
47​==3152== at 0x3A513B4: ccl::get_float3(PointerRNA&, char const*) (blender_util.h:336)
48​==3152==
49​==3152== Conditional jump or move depends on uninitialised value(s)
50​==3152== at 0x1384719C: vfprintf (vfprintf.c:1642)
51​==3152== by 0x138688A0: vsprintf (iovsprintf.c:42)
52​==3152== by 0x1384E7D3: sprintf (sprintf.c:32)
53​==3152== by 0x6712244: ccl::MD5Hash::get_hex() (util_md5.cpp:377)
54​==3152== by 0x3ABD644: ccl::ShaderGraph::compute_displacement_hash() (graph.cpp:710)
55​==3152== by 0x3B9AF58: ccl::Shader::set_graph(ccl::ShaderGraph*) (shader.cpp:242)
56​==3152== by 0x3A59E31: ccl::BlenderSync::sync_materials(bool) (blender_shader.cpp:1250)
57​==3152== by 0x3A5AC9D: ccl::BlenderSync::sync_shaders() (blender_shader.cpp:1440)
58​==3152== by 0x3A106CA: ccl::BlenderSync::sync_data(BL::RenderSettings&, BL::SpaceView3D&, BL::Object&, int, int, void**, char const*) (blender_sync.cpp:201)
59​==3152== by 0x39FFB45: ccl::BlenderSession::render() (blender_session.cpp:444)
60​==3152== by 0x39F7D68: ccl::render_func(_object*, _object*) (blender_python.cpp:289)
61​==3152== by 0x6D3F195: _PyCFunction_FastCallDict (methodobject.c:209)
62​==3152== Uninitialised value was created by a stack allocation
63​==3152== at 0x3A513B4: ccl::get_float3(PointerRNA&, char const*) (blender_util.h:336)
64​==3152==

Worth solving them anyway, could cause some false-positives and considering unchanged graph as changed?

The crash and uninitialized memory were different issues, but both should be fixed now.