From 4491c6226051799f4415ba50abbc4861e09af862 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Tue, 1 Mar 2022 23:35:21 +0100 Subject: Fix potential crash during proxy building Last step of proxy building caused crash due to thread race contition when acessing ed->seqbase. Looking at code, it seems that calling IMB_close_anim_proxies on original strips is unnecessary so this code was removed to resolve this issue. Locking seqbase data may be possible, but it's not very practical as many functions access this data on demand which can easily cause program to freeze. Reviewed By: sergey Differential Revision: https://developer.blender.org/D14210 --- source/blender/sequencer/intern/proxy.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'source/blender/sequencer/intern') diff --git a/source/blender/sequencer/intern/proxy.c b/source/blender/sequencer/intern/proxy.c index d87da1557e0..91b69bfe01f 100644 --- a/source/blender/sequencer/intern/proxy.c +++ b/source/blender/sequencer/intern/proxy.c @@ -549,18 +549,6 @@ void SEQ_proxy_rebuild(SeqIndexBuildContext *context, } } -static bool seq_orig_free_anims(Sequence *seq_iter, void *data) -{ - SessionUUID orig_seq_uuid = ((SeqIndexBuildContext *)data)->orig_seq_uuid; - - if (BLI_session_uuid_is_equal(&seq_iter->runtime.session_uuid, &orig_seq_uuid)) { - for (StripAnim *sanim = seq_iter->anims.first; sanim; sanim = sanim->next) { - IMB_close_anim_proxies(sanim->anim); - } - } - return true; -} - void SEQ_proxy_rebuild_finish(SeqIndexBuildContext *context, bool stop) { if (context->index_context) { @@ -570,9 +558,6 @@ void SEQ_proxy_rebuild_finish(SeqIndexBuildContext *context, bool stop) IMB_close_anim_proxies(sanim->anim); } - /* `context->seq_orig` may have been removed during building. */ - SEQ_for_each_callback(&context->scene->ed->seqbase, seq_orig_free_anims, context); - IMB_anim_index_rebuild_finish(context->index_context, stop); } -- cgit v1.2.3