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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user