Page MenuHome

Fix crash enabling disabled collection containing curves.
ClosedPublic

Authored by Brecht Van Lommel (brecht) on Jul 26 2018, 9:00 PM.

Details

Summary

The "Eval Init" operation that is supposed to ensure the object data is
evaluated at least once is skipped due to DEPSREL_FLAG_NO_FLUSH added in
rBf849567. In rBd37929c85 an exception was added for meshes but not curves.

When loading a .blend the update always happens due to setting recalc in
deg_graph_on_visible_update, but when toggling collections on/off it doesn't.

Fixes T55948, T56016, T55926, T55947.

@Sergey Sharybin (sergey), not sure this is the right fix, I guess "Eval Init" is somehow
special and should not follow typical flushing rules?

Diff Detail

Repository
rB Blender

Event Timeline

This NO_FLUSH is needed for meshes because evaluated mesh might reference arrays which will be re-allocated by copy-on-write. This isn't a case for curves/larttices where display list is a self-contained unit. So technically, this change is not correct.

Think better approach would be something like this: P758

P.S. This is sort of duplicated logic of what's happening in on_visible_update, but we should get rid of it in the longer term, and do all related logic in deg_graph_build_finalize. This is because it's not very well defined when on_visible_update is to be called, it really more like hey, new entity is added to depsgraph, how do i make it up to date (without ruining possible caches).

This revision was not accepted when it landed; it landed in state Needs Review.Jul 27 2018, 2:18 PM
This revision was automatically updated to reflect the committed changes.