Blender Git Loki

Git Commits -> Revision 3f8edc5

March 3, 2021, 17:15 (GMT)
Fix Node UI Storage Threading Issues

Since the same node tree can be used in modifiers on different objects,
there can be multiple threads writing to the maps in the node tree UI
storage at the same time. The additions for attribute name hints and
error messages made it so this would often cause a crash or at least
an ASAN report. This patch adds locks to prevent multiple threads
from using the maps concurrently.

In a brief test I actually didn't observe a crash without the global
`bNodeTree` UI storage mutex, but I think it's necessary for the change
to be correct, and I did notice some unfreed memory without it anyway.
Ideally it would be in a node tree runtime struct though.

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

Commit Details:

Full Hash: 3f8edc5da15e42a2043260cca76bba2ab9e0be89
Parent Commit: 8e126c3
Committed By: Julian Eisel
Lines Changed: +18, -1

2 Modified Paths:

/source/blender/blenkernel/BKE_node_ui_storage.hh (+3, -0) (Diff)
/source/blender/blenkernel/intern/node_ui_storage.cc (+15, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021