From 8d1978a8e0131ab59e94e7e37e063db305166711 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Mon, 26 Oct 2020 00:28:54 +0100 Subject: Fix T81250: Crash after undoing with prefetching Main DB and it's structs can point to different address after undoing. In this case problem was that bmain was not updated. Same fix was done for scene as well. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9240 --- source/blender/sequencer/intern/prefetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c index 013abb716d4..65b2b6c02cf 100644 --- a/source/blender/sequencer/intern/prefetch.c +++ b/source/blender/sequencer/intern/prefetch.c @@ -319,6 +319,7 @@ static void seq_prefetch_update_scene(Scene *scene) return; } + pfjob->scene = scene; seq_prefetch_free_depsgraph(pfjob); seq_prefetch_init_depsgraph(pfjob); } @@ -499,15 +500,14 @@ static PrefetchJob *seq_prefetch_start(const SeqRenderData *context, float cfra) BLI_mutex_init(&pfjob->prefetch_suspend_mutex); BLI_condition_init(&pfjob->prefetch_suspend_cond); - pfjob->bmain = context->bmain; pfjob->bmain_eval = BKE_main_new(); - pfjob->scene = context->scene; seq_prefetch_init_depsgraph(pfjob); } } seq_prefetch_update_scene(context->scene); seq_prefetch_update_context(context); + pfjob->bmain = context->bmain; pfjob->cfra = cfra; pfjob->num_frames_prefetched = 1; -- cgit v1.2.3 From 3deb4f4cb8ba4558adbb24597fb799252449a799 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Mon, 26 Oct 2020 00:30:27 +0100 Subject: Fix T81426: Infinite loop building VSE relations It is possible to create scene strips pointing to each other. This is sanitized when rendering, but in dependency graph such setup will cause infinite loop. This patch fixes loop in dependency graph, but same problem exists in audaspace Reviewed By: sergey Differential Revision: https://developer.blender.org/D9262 --- source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 86a365a4901..ec5cbc5c605 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -2667,6 +2667,9 @@ void DepsgraphRelationBuilder::build_scene_sequencer(Scene *scene) if (scene->ed == nullptr) { return; } + if (built_map_.checkIsBuiltAndTag(scene, BuilderMap::TAG_SCENE_SEQUENCER)) { + return; + } build_scene_audio(scene); ComponentKey scene_audio_key(&scene->id, NodeType::AUDIO); /* Make sure dependencies from sequences data goes to the sequencer evaluation. */ -- cgit v1.2.3 From 8eb7344731f2e8cc910b03beb13722a31fc46f61 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Mon, 26 Oct 2020 00:31:49 +0100 Subject: Fix Recursion when rendering scene strip Recursion happens in case when scene strip point to it's own scene indirectly by using SEQ_SCENE_STRIPS option. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9264 --- source/blender/sequencer/intern/sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/sequencer/intern/sequencer.c b/source/blender/sequencer/intern/sequencer.c index c8dfb6b886f..068d836d1e6 100644 --- a/source/blender/sequencer/intern/sequencer.c +++ b/source/blender/sequencer/intern/sequencer.c @@ -6045,6 +6045,12 @@ static Sequence *sequencer_check_scene_recursion(Scene *scene, ListBase *seqbase return seq; } + if (seq->type == SEQ_TYPE_SCENE && (seq->flag & SEQ_SCENE_STRIPS)) { + if (sequencer_check_scene_recursion(scene, &seq->scene->ed->seqbase)) { + return seq; + } + } + if (seq->type == SEQ_TYPE_META && sequencer_check_scene_recursion(scene, &seq->seqbase)) { return seq; } -- cgit v1.2.3