System Information
System: Linux 4.11.4, x86_64 GNU/Linux
Processor AMD Ryzen 7
Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290/390] (rev 80)
Blender Version
Broken: 2.78a, 2.79a, 2.79b
Short description of error
SIGSEGV on running a frame_change_pre handler in the presence of a rigid body model. Problem disappears when most objects are deleted, the frame_change handler is not installed or the (python) string formatting is not used. Tested on 2.78a, 2.79a, 2.79 and a build from the git repository (hash: 96fba1e1016)
Exact steps for others to reproduce the error
- load attached .blend file
- run script
- animate
typically crashes on rendering frame 2-18
The problem appears to involve a race condition in dag_get_node() (blender-git/blender/source/blender/blenkernel/intern/depsgraph.c). Introducing an (existing) spinlock guard solves the problem, but I'm new to the project and don't have enough oversight to decide whether it's a fix or a work-around.
DagNode *dag_get_node(DagForest *forest, void *fob)
{
DagNode *node;
+++ BLI_spin_lock(&threaded_update_lock);
node = dag_find_node(forest, fob);
if (!node)
node = dag_add_node(forest, fob);
+++ BLI_spin_unlock(&threaded_update_lock);
return node;
}