Blender 2.70 test build 1 suddenly closes without errors while opening .blend file #38755

Closed
opened 2014-02-22 13:47:48 +01:00 by Alessandro Sala · 15 comments

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.narghilè.zip

**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.[narghilè.zip](https://archive.blender.org/developer/F78462/narghilè.zip)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @xela-1

Added subscriber: @xela-1

Added subscriber: @mont29

Added subscriber: @mont29
Bastien Montagne self-assigned this 2014-02-22 15:10:33 +01:00
Bastien Montagne removed their assignment 2014-02-22 15:27:01 +01:00
Sergey Sharybin was assigned by Bastien Montagne 2014-02-22 15:27:01 +01:00

Added subscriber: @Sergey

Added subscriber: @Sergey

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, thoughts? ;)

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, thoughts? ;)
Member

Added subscriber: @LukasTonne

Added subscriber: @LukasTonne
Member

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

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

Added subscriber: @brecht

Added subscriber: @brecht

@LukasTonne, sorry for the delay and you're exactly right. But i need to summon @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, 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?

@LukasTonne, sorry for the delay and you're exactly right. But i need to summon @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, 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?
Member

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.

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.

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.

This issue was referenced by blender/blender-addons-contrib@1130c53cdb

This issue was referenced by blender/blender-addons-contrib@1130c53cdb24b68d1871a03bad59fad9e6418f29

This issue was referenced by 1130c53cdb

This issue was referenced by 1130c53cdb24b68d1871a03bad59fad9e6418f29

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 1130c53cdb.

Closed by commit 1130c53cdb.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#38755
No description provided.