Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2021-11-02 20:36:24 +0300
committerSergey Sharybin <sergey@blender.org>2021-11-02 20:36:24 +0300
commit978f2cb900b75110a3bc9dbcec9d4aeae5df4565 (patch)
tree87474692c1a7501b9dfe086b712e6d9b7b7470c4
parent3a454beae73cdfe9c07e7308f78b00c79b502e19 (diff)
Fix T89487: Crash adding Rigid Body to object with shared mesh data
Not sure why this bug was only discovered by such an elaborate steps and why it took so long to be discovered. The root of the issue is that in the 956c539e597a the typical flow of tag+flush+evaluate was violated and tagging for visibility change happened after flush.
-rw-r--r--source/blender/depsgraph/intern/depsgraph_eval.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index cc7ce871419..0314219b725 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@ -44,6 +44,7 @@
#include "intern/node/deg_node_time.h"
#include "intern/depsgraph.h"
+#include "intern/depsgraph_tag.h"
namespace deg = blender::deg;
@@ -54,6 +55,7 @@ static void deg_flush_updates_and_refresh(deg::Depsgraph *deg_graph)
BKE_scene_frame_set(deg_graph->scene_cow, deg_graph->frame);
}
+ deg::graph_tag_ids_for_visible_update(deg_graph);
deg::deg_graph_flush_updates(deg_graph);
deg::deg_evaluate_on_refresh(deg_graph);
}
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index c816c7b8db5..d6877adb66b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -370,8 +370,6 @@ static TaskPool *deg_evaluate_task_pool_create(DepsgraphEvalState *state)
*/
void deg_evaluate_on_refresh(Depsgraph *graph)
{
- graph_tag_ids_for_visible_update(graph);
-
/* Nothing to update, early out. */
if (graph->entry_tags.is_empty()) {
return;