Page MenuHome

Fix T81426: Infinite loop building VSE relations
ClosedPublic

Authored by Richard Antalik (ISS) on Oct 19 2020, 9:14 AM.

Details

Summary

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

Diff Detail

Repository
rB Blender
Branch
T81426 (branched from master)
Build Status
Buildable 10792
Build 10792: arc lint + arc unit

Event Timeline

Richard Antalik (ISS) requested review of this revision.Oct 19 2020, 9:14 AM
Richard Antalik (ISS) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.Oct 19 2020, 10:49 AM

First of all, the relations builder should be doing same tag as in nodes builder:

if (built_map_.checkIsBuiltAndTag(scene, BuilderMap::TAG_SCENE_SEQUENCER)) {
  return;
}

See the beginning of DepsgraphNodeBuilder::build_scene_sequencer. Basically, the nodes and relations builders are to be symmetrical.
This is an obvious oversight. If fixing it will not solve the recursion bug you're fixing here I'd need to think harder :)

This revision now requires changes to proceed.Oct 19 2020, 10:49 AM

Use BuilderMap to check for recursivity

First of all, the relations builder should be doing same tag as in nodes builder:

if (built_map_.checkIsBuiltAndTag(scene, BuilderMap::TAG_SCENE_SEQUENCER)) {
  return;
}

See the beginning of DepsgraphNodeBuilder::build_scene_sequencer. Basically, the nodes and relations builders are to be symmetrical.
This is an obvious oversight. If fixing it will not solve the recursion bug you're fixing here I'd need to think harder :)

Indeed this worked. Thanks for suggestion.

I will need to implement original solution for rendering though, because it isn't properly sanitized now when I checked.

This part seems fine. Please commit it.

If fix in rendering is needed, make it a separate commit.

This revision is now accepted and ready to land.Oct 19 2020, 11:14 AM