Blender Git Commit Log

Git Commits -> Revision b998a7b

Revision b998a7b by Sergey Sharybin (master)
June 4, 2019, 07:34 (GMT)
Fix T64247: Crash on playback with special shader node tree

The root of the problem goes to the fact that node tree copying
uses source tree and nodes for a temporary storage.

This makes it so multiple dependency graphs can not be reliably
evaluated from different threads if they are using same original
node tree.

Solved by doing the following:

- Commonly used tree copying function (which is used by library
manager) keeps source tree, nodes and sockets untouched.

- All the related areas (like node tree's callback) now have
const qualifier on the input.

- Areas which needs to have those temporary pointers assigned are
now using explicit function.

Would be really cool to get rid of those temporary pointers
completely, but this is a bit tricky due to hairy nature of the
code. Can happen any time now though: is easy enough to generalize
the new pointers mapping.

Note that this change is only intended to solve the crash.
The fact that icons shouldn't be updated on playback will be fixed
as a separate change.

Reviewers: brecht, fclem

Reviewed By: brecht, fclem

Subscribers: brecht, fclem

Differential Revision: https://developer.blender.org/D5002

Commit Details:

Full Hash: b998a7b384c6a598ea851fbc06a2df8829c34329
Parent Commit: 351e68e
Lines Changed: +154, -61

15 Modified Paths:

/source/blender/blenkernel/BKE_node.h (+19, -4) (Diff)
/source/blender/blenkernel/intern/node.c (+71, -17) (Diff)
/source/blender/editors/space_node/node_edit.c (+4, -3) (Diff)
/source/blender/editors/space_node/node_group.c (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+1, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c (+3, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_image.c (+17, -14) (Diff)
/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c (+1, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_outputFile.c (+3, -1) (Diff)
/source/blender/nodes/composite/node_composite_tree.c (+23, -11) (Diff)
/source/blender/nodes/intern/node_util.c (+4, -2) (Diff)
/source/blender/nodes/intern/node_util.h (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_script.c (+3, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.c (+1, -1) (Diff)
/source/blender/nodes/texture/nodes/node_texture_output.c (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021