Blender crashes trying to load character file #41703
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#41703
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Fedora 20 GNU/Linux 64 bit on Intel CPU / Nvidia GPU
Blender Version
Broken: git master hash
f7062ff
Worked: 2.71 release from b.o.
Short description of error
Open a specific file (gilgamesh.blend) crashes on file load (almost all the time) with the following in terminal:
the crash.txt is here:gilgameshpacked.crash.txt
Exact steps for others to reproduce the error
It might crash if your setup reproduces mine....
Changed status to: 'Open'
Added subscriber: @BassamKurdali
Added subscribers: @Sergey, @LukasTonne, @mont29
Confirmed, looks like a threading issue in particle code, from quick look to asan backtrace:
P133: (An Untitled Masterwork)
Thanks Bastien!
@BassamKurdali: temp workaround: launch Blender with
-t 1
option (no multi-threading, things will be a bit slower, but at least it loads!).cool, thanks! will do for now.
Ok, tech dev notes.
Here is exactly what happens: a same curve, used as CurveForceField, is evaluated by several hair systems at the same time (threaded depsgraph), without any protection.
More precisely, in effect.c,
precalculate_effector()
ends being called with effectors using the same curve object in parallel, which crashes when callingBKE_displist_make_curveTypes()
, as one can expects!This very simple patch fixes it, not quite sure it would be considered as correct though… :P
P136: #41703
This is not gonna to work -- it doesn't protect you from cases when effector and object which shares the same curve datablock are handled in separate thread simultaneously. Ideally the cache is to be existing here. Not sure we can add a proper dependency in the graph to make it handled all nicely without hack.
f not, better workaround would be to make sure effectors' dependencies are up to date before doing threading in the
scene_update_objects()
.Ok, so depsgraph does create valid dependencies between particle systems and forcefields.
Issue here is that when curve objects are updated (in
BKE_object_handle_update_ex()
), OB_RECALC_DATA is not set, so for curves, curve_cache is not handled, even if empty.In following patch, it's creation is forced in this update func, when empty, so that
precalculate_effector()
never has to call it later:P137: #41703
As usual, not sure we want to do this, or to do this here, etc. ;)
That's suffers exactly the same issue as the previous fix -- in certain circumstances it's still possible to have threading conflict.
Plus it should not be applied for curve objects in general (the patch simply makes it so any tag for curve update will imply data re-evaluation here, which is screwing up the system even more.
If the dependency between an effector and curve exists, check whether effector depends on both object and object data.
Ok, digging more and more, and understanding less and less… :(
Think core of the issue is that, during first evaluation of brand new DAG (just after file loading), all curve guides objects are tagged as not needing any recalc. I tried to reproduce a somewhat simpler similar situation, with only a few hairs & curve_guides (see file attached below), but with this one curve guides are always tagged to recalc after loading…
depsgraph_curve_field.blend
Note I tried to force curveguides to recalc in several places (including while building DAG, which is not nice I guess), but curveguides always remain with a 0 recalc when DAG is evaluated, which means I think their recalc flags are reset somewhere after DAG construction, but before its evaluation… Tbh, I’m lost at this point…
Found more: what happens is,
flush_update_node()
untag our curve guids as needing recalc, since they are on hidden layers.Do not understand why it still evaluates hair emitters, though, since they are also on hidden layer!
Long story short:
flush_pointcache_reset()
set 'pointcache' objects (like those having a psys etc.) recalc flag toOB_RECALC_DATA
regardless of whether they are on invisible layer or not, which breaks work done previously byflush_update_node()
on this aspect.That small patch (yeah, one more) does fix crash, but as usual I’m not quite sure it is valid - maybe a better solution would be to add a temp 'OB_RECALC_HIDDEN' flag, set by
flush_update_node()
and which would prevent any later code to re-enable those objects' recalc? Very hard to take everything into account here, I feel a bit like fighting in a giant plate of spaghetti!P138: #41703
This issue was referenced by
9c19ad1f79
Changed status from 'Open' to: 'Resolved'
Closed by commit
9c19ad1f79
.woot! so does this win trickiest bug of 2.72 cycle?