diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-01-12 19:12:27 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-01-12 19:16:48 +0300 |
commit | abbc43e4e419c44e6d0134aec051d543a0944b3e (patch) | |
tree | 61539e0cdfecc9f638d7b910ef57263d8b7b9582 /source/blender/depsgraph/intern/builder/deg_builder_nodes.h | |
parent | 957e292c5864cba3cf62c7c59dc644422660034f (diff) |
Fix T84397: Creating and removing many objects very quickly causes a crash
The root of the issue was caused by the dependency graph using ID pointer
to map evaluated state from old depsgraph to new one upon relations update.
This was failing when IDs were re-allocated rapidly: was possible that
Object ID's evaluated state assigned to Mesh and vice versa.
Now depsgraph uses Session UUID to identify which IDs to restore evaluated
state to. The session UUID is stored in the IDNode, so that id_orig is not
dereferenced on depsgraph update since the ID might be freed.
The root of the issue is identified by Campbell, original patch was done
by Bastien, thanks! Also thanks to Oliver and Ray and everyone else for
testing!
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_nodes.h')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h index 6f7a8b1c6b5..174f9b129f9 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h @@ -285,8 +285,8 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder { * very root is visible (aka not restricted.). */ bool is_parent_collection_visible_; - /* Indexed by original ID, values are IDInfo. */ - Map<const ID *, IDInfo *> id_info_hash_; + /* Indexed by original ID.session_uuid, values are IDInfo. */ + Map<uint, IDInfo *> id_info_hash_; /* Set of IDs which were already build. Makes it easier to keep track of * what was already built and what was not. */ |