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:
parent
bfe37b7255
commit
4491c62260
Notes:
blender-bot
2023-02-14 05:41:57 +01:00
Referenced by issue #95688, Blender crashes randomly when editing video
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue