Page MenuHome

Blender 2.70 test build 1 suddenly closes without errors while opening .blend file
Closed, ResolvedPublicBUG

Description

System Information
OS: Windows 7 Professional 64 bit, Service Pack 1
CPU: Intel Core i7-4700MQ @2.40GHz
RAM: 16 GB
NVidia GeForce GT 750M, driver v332.21

Blender Version
Broken: 2.70 test build 1, Date: 2014-02-20 05:32 Hash: 4789793
Worked: 2.69.0 r60995

Short description of error
When trying to open the attached .blend file, Blender immediately closes without any message.

Exact steps for others to reproduce the error
Run Blender and open the attached .blend file.

Event Timeline

Alessandro Sala (xela) raised the priority of this task from to 90.
Alessandro Sala (xela) updated the task description. (Show Details)
Alessandro Sala (xela) edited a custom field.
Bastien Montagne (mont29) lowered the priority of this task from 90 to 50.

Well, another Curve object with a NULL curve_cache (happens in MOD_array.c:380).

Adding a NULL check here is trivial, but not sure this is expected, it smells again like threading issue… @Sergey Sharybin (sergey), thoughts? ;)

Bastien Montagne (mont29) raised the priority of this task from 50 to High.Feb 22 2014, 3:27 PM

I think the problem here might be a dependency cycle: The Tubo dx object has an array modifier making it dependent on the Forma tubo dx curve object, while at the same time Forma tubo dx is a child of Tubo dx:

Dependency cycle detected:
  Forma tubo dx depends on Tubo dx through Parent.
  Tubo dx depends on Forma tubo dx through Array Modifier.

This means the DAG_EVAL_NEED_CURVE_PATH flag doesn't have the desired effect, the curve cache is not updated by the depgraph.
https://developer.blender.org/diffusion/B/browse/master/source/blender/modifiers/intern/MOD_array.c;d92f6b9903c8b914523ef7b3aa228a11f34bd605$128

@Lukas Tönne (lukastoenne), sorry for the delay and you're exactly right. But i need to summon @Brecht Van Lommel (brecht) here to the discussion :)

There're three ways to prevent the crash:

  • Just add NULL-check and do nothing in case of dependency cycle (so we don't evaluate path on-demand and so and allow having regressions in case of cycles)
  • Add n-demand path evaluation to mimic old behavior. We can put such evaluation inside if(is_main_thread) thread to avoid possible threading conflicts..
  • Separate curve data into own node in the DAG and evaluate it separately. This _seems_ to solve the issue -- path will be evaluated before other DAG node requests it and evaluation order wouldn't matter in this case.

@Brecht Van Lommel (brecht), ideally i think #3 is the way to go, but it's the least trivial change. Do you have any suggestions on what to do at this BCon state?

IMO the depgraph should work in a way that it can never leave the scene in a crashable state. I'm not sure how such curve dependencies can be handled properly, perhaps we need a special case hack to ensure valid curve_cache after depgraph eval.

Option 3 would be cleaner, but i have a feeling it doesn't really fit into the depgraph design (however lacking it may be). Do we have any precedence for multiple nodes per object? I guess the new "curve cache node" would never have any dependencies on other nodes itself, so that would prevent any cycles and ensure the condition above.

Even if we evaluate the curve data as a separate node, it is still possible to have a cyclic dependency. So we need to avoid that kind of crash and add a NULL check whatever the solution?

Option 3 seems like the proper solution as there isn't really a cyclic dependency here in a more find gained dependency graph, but I think it is too late for that in this release. If option 2 is possible without much code/risk it would be good to keep such files working, if not then we should do option 1.

Sergey Sharybin (sergey) changed the task status from Unknown Status to Resolved.Feb 24 2014, 2:16 PM

Closed by commit rB1130c53cdb24.