Blender Crashes when multiple Data Transfer modifiers are used #46672
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#46672
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?
Blender Version
Broken: development version (after 2.76)
Short description of error
I have 3 objects A, B, C
data transfer modifier on A transfers data from B
data transfer modifier on C transfers data from B
When i move one of the objects around in object mode then occasionally Blender crashes.
I can reproduce this behavior when all addons are disabled.
And the problem goes away when i disable the data transfer modifiers.
Exact steps for others to reproduce the error
Open the included blend file data_transfer_normals.blend
select the middle object and move it around a bit.
what seems to work "best" is:
G z then move the mouse frantically on your desk.
Sometimes the crash happens right away, sometimes it takes minutes to get it to appear.
The crash takes longer to show up when blender is in debug mode,
but i can get it to break there within a minuite.
The crash happens always here:
The reason for this is the last data layer (5) is not initialized or contains broken data.
Here is the content of data->layers- [x] when the crash happens:
The Main thread works on Object A (which has a data transfer modifier defined with source Object B)
The Stack of the Blender Main Thread is:
Besides this there is another concurrent thread that currently executes BKE_mesh_calc_normals_poly()
This thread works on object C (which has a data transfer modifier defined with source Object B)
The Stack of the concurrent Thread is:
I hope this is enough to reproduce the issue.
Changed status to: 'Open'
Added subscriber: @GaiaClary
Added subscriber: @ideasman42
Seems 2+ modifiers will try to recalculate data on the source mesh at once.
https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/data_transfer.c$277
Solutions could be...
calcLoopNormals
call.calcLoopNormals
to take a data argument, so the data layersdm_src
of aren't manipulated by multiple threads.Added subscriber: @Sergey
Pfff… This actually ends up being a nice can of worms… :(
I spent some time this afternoon implementing idea we discussed with Campbell (making some kind of
dm->getLoopNormals()
which would take array of lnors as output arg, instead of modifying own CDlayers.This is easy to add to DM, the problem here is data transfer code - it means we'll have to pass around
poly_nors_src
andloop_nors_src
around in a bunch of functions, making even more complicated a piece of code that does not really need it. Even worse, it breaks the generic CDLayer interpolation system, which means we'd have to implement own handling for clnors, triple yuck. I’m really not inclined to keep going in that direction…We could go to the quick and dirty solution (mutex lock for those DM functions that can modify internal CDlayers - I think we could have same kind of issues with even
calcNormals()
itself e.g., since it may create a vertex layer in case it's using orig mesh data...). But again finding all possible broken case will probably turn into can of you-know-what.So, my idea currently would simply be to make a copy of source dm. That one would be local, so there should be no problem adding data layers to it… Not that nice for performances, but…
@ideasman42, @Sergey, what do you think?
This issue was referenced by
e43b6e2f97
Changed status from 'Open' to: 'Resolved'