Regression: Crash when accessing animated 'object.data' property in a driver of a Mesh #96289
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#96289
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
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65
blender_system_info.txt
Blender Version
Broken: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash:
c77597cd0e
Worked: version: 3.1.0 Alpha, branch: master, commit date: 2022-01-23 19:27, hash:
abf30007ab
Apparently, this is caused by
56407432a6
Short description of error
Drivers accessing properties of other Meshes may crash.
This was noticed when performing F12 render or spacebar animation on certain models
As far as I can tell, more than half of the models I have checked do not allow most operations (I suspect my models are biased).
No problem in 3.0. All daily builds are unconfirmed, but 3.1.0 Alpha, branch: master, commit date: 2022-01-23 19:27 was the latest I checked that works.
Crash Log:
qulle-3.1test.crash.txt
Exact steps for others to reproduce the error
data.shape_keys.key_blocks["Key 1"].value
)Simplified file:
drivers_crash-simplied_only_one_shapekey.blend
Original file:
qulle-3.1test.blend
Added subscriber: @poopoo
#97710 was marked as duplicate of this issue
Crash when performing F12 render or spacebar animation on certain modelsto Crash when performing F12 render or spacebar animation on certain models in 3.1Added subscriber: @PratikPB2123
Added subscriber: @mano-wii
I can confirm the crash. It happens inside some driver.
But the .blend file is too complex. It needs to be simplified before we confirm and forward it to the developers.
Changed status from 'Needs Triage' to: 'Confirmed'
I was able to simplify the file but I couldn't do a bisect to find the causing commit, because the behavior changes between Debug and RelWithDebInfo and many of the commits had to be skipped due to the error:
LNK1201 error writing to program database 'D:\Dev\BlenderDev\x64-Debug\source\creator\Debug\tf.pdb'; check for insufficient disk space, invalid path, or insufficient privilege blender D:\Dev\BlenderDev\x64-Debug\source\creator\LINK 1
I've spent a long time trying to bisect without success.
drivers_crash.blend
Crash when performing F12 render or spacebar animation on certain models in 3.1to Crash when accessing a shapekey property of a Mesh in a driver of another MeshThis comment was removed by @poopoo
Thanks for identifying the cause.
I have created a simplified version with only one shape key from your file.
drivers_crash-simplied_only_one_shapekey.blend
"accessing a shapekey property of a Mesh in a driver of another Mesh" does not necessarily cause a crash.
Manually moving the A shape key does not cause a crash
Crashes when keyframes are set on A and animation is performed.
Thanks for the info and for simplifying the file even further. It sure helps!
I will update the description.
Crash when accessing a shapekey property of a Mesh in a driver of another Meshto Crash when accessing an animated shapekey property of a Mesh in a driver of another MeshThis comment was removed by @poopoo
Sorry to keep writing additional information.
I have found one more crashing condition to report.
Safe Driver setting in 3.1
SingleProperty
Prop = Key
Path=key_blocks["Key 1"].value
Crash Driver setting in 3.1 ( safe in 3.0)
SingleProperty
Prop = object
Path=data.shape_keys.key_blocks["Key 1"].value
driver=object-crash.blend
driver=key-safe.blend
Crash when accessing an animated shapekey property of a Mesh in a driver of another Meshto Crash when accessing animated 'object.data' property in a driver of a MeshCrash when accessing animated 'object.data' property in a driver of a Meshto Regression: Crash when accessing animated 'object.data' property in a driver of a MeshAdded subscribers: @kevindietrich, @lichtwerk
Apparently, this is caused by
56407432a6
CC @kevindietrich : mind checking?
Added subscribers: @Sergey, @dr.sybren
Better to share than to keep secret :)
This seems to be the same issue as #97710 (Regression: Crash When Appending Items and Editing Expressions).
Having
data.shape_keys.key_blocks["Key 1"].value
as driver variable expression has never (AFAIK, anyway) been safe since Blender 2.80 (which introduced the new-at-the-time depsgraph). #97710 has an example file that can crash 2.80 as well, even though it looked like56407432a6
caused the issue. I think that commit simply changed the threading behaviour and caused the prior problem to become more prominent.You can have the driver variable target the key directly, but the problem is that the shapekey names are not shown anywhere in the UI. They're always called
Key.nnn
, making it hard to work with. What you can do is target the Mesh instead, and useshape_keys.key_blocks["Key 1"].value
(i.e. just remove thedata.
from the old path).@Sergey do you think this analysis is correct?
Added subscriber: @ChrisJones
@dr.sybren, I vaguely remember the issue. Also remember some work was done on it. The crash is never good, and it is not an implicit design limitation of drivers referring to other IDs. In contrast, it should be totally possible to reference any ID from the expression. Think either we are missing a relation, or we need to do something special to keep shapekeys on the result so that values can be used from them (the latter one is AFAIR the patch you've worked on a while ago. Think it was committed but some of the optimization work later one might have undone it).
Thanks for the info.
I will comment on one point.
In Japanese amateur 3D user, a tool called MMD (Miku Miku Dance) is very popular and has a extensive collection of animation style model and motion assets.
There is an add-on called mmd_tools that uses this asset for MMD in blender, but since this add-on uses this crashing shape key setting internally, mmd_tools users are unable to use blender 3.1 or later.
I understand that blender has various priorities for adding features and bug fixes, and usually, if there is a simple workaround, bug fixes are not a priority, but I wanted to tell you above that in some communities this bug has a significant impact.
Another idea is to address the issue on the mmd_tools side, but the maintainer does not intend to fix this issue with the bug/spec on the blender side yet to be finalized.
My earlier analysis wasn't quite correct, as it turns out adding an
RNAPathKey
relation already does the RNA path parsing. The crash seems to be caused by the changed semantics ofobject.data
: before56407432a6
it was safe to use when the pointer is valid, so even when the data it points to was not yet evaluated properly. This has now changed, but the depsgraph relations haven't been updated to account for this.This issue was referenced by
a2dacefb46
Changed status from 'Confirmed' to: 'Resolved'