Page MenuHome

Fix T64247: Crash on playback with special shader node tree
ClosedPublic

Authored by Sergey Sharybin (sergey) on Jun 3 2019, 5:16 PM.

Details

Summary

Despite common belief that "DEG::depsgraph" substrings in the back trace means
a bug in the dependency graph, the actual root of the problem goes to the fact
that node tree copying uses source tree and nodes for a temporary storage.

This makes it so multiple dependency graphs can not be reliably evaluated from
different threads if they are using same original node tree.

Solved by doing the following:

  • Commonly used tree copying function (which is used by library manager) keeps source tree, nodes and sockets untouched.
  • All the related areas (like node tree's callback) now have const qualifier on the input.
  • Areas which needs to have those temporary pointers assigned are now using explicit function.

    Would be really cool to get rid of those temporary pointers completely, but

this is a bit tricky due to hairy nature of the code. Can happen any time now
though: is easy enough to generalize the new pointers mapping.

Note that this change is only intended to solve the crash. The fact that icons
shouldn't be updated on playback will be fixed as a separate change.

@Brecht Van Lommel (brecht), @Clément Foucault (fclem), this is a threading related issue, so the fact that it doesn't
currently crash for me does not necessary mean it's indeed solved. Please give
it an extra test :)

Diff Detail

Repository
rB Blender

Event Timeline

Sergey Sharybin (sergey) planned changes to this revision.Jun 3 2019, 5:20 PM

Compositor localization is broken. Fix coming soon.

Fix for compositor.

More fixes for compositor.

Sorry for the noise.

Harbormaster completed remote builds in B3805: Diff 15748.

Compiler warning fix.

Becoming ridcilous on noise. Will wait for the first round of review now.

This revision is now accepted and ready to land.Jun 3 2019, 5:54 PM

Fixes it here too

This revision was automatically updated to reflect the committed changes.