Blender Crashes when trying to create a Pivot Constraint for armature #104657

Closed
opened 2023-02-12 17:22:13 +01:00 by Jonathan-Pecany · 9 comments

System Information
Operating system: Windows 11
Graphics card: NVIDIA GeForce RTX 3050 Laptop GPU

Blender Version
Broken: 3.33, 3.34, 3.35 Beta
Worked: 2.79

Short description of error
When trying to set a bone in the Pivot Constraint for the Armature, it crashes.

Exact steps for others to reproduce the error

  1. Create an armature.
  2. Create a Pivot constraint from "Object Constraint Properties > Add Object Constraint > Relationship > Pivot".
  3. Select the armature in the Target field.
  4. Then select the Bone in the Bone field. (Blender crashes)
**System Information** Operating system: Windows 11 Graphics card: NVIDIA GeForce RTX 3050 Laptop GPU **Blender Version** Broken: 3.33, 3.34, 3.35 Beta Worked: 2.79 **Short description of error** When trying to set a bone in the Pivot Constraint for the Armature, it crashes. **Exact steps for others to reproduce the error** 1. Create an armature. 2. Create a Pivot constraint from "Object Constraint Properties > Add Object Constraint > Relationship > Pivot". 3. Select the armature in the Target field. 4. Then select the Bone in the Bone field. (Blender crashes)
Jonathan-Pecany added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-02-12 17:22:14 +01:00

Hello. I can't reproduce this in last 3.4 and 3.5 master. Can you check this in today builds?

Hello. I can't reproduce this in last `3.4` and `3.5` master. Can you check this in today builds?
Member

Can confirm.
Can even simplify the repro steps (will update the report description).

Seems DepsgraphRelationBuilder::build_constraints cant handle the empty component_subdata string passed in...

Can confirm. Can even simplify the repro steps (will update the report description). Seems `DepsgraphRelationBuilder::build_constraints` cant handle the empty `component_subdata` string passed in...

Can confirm.
Can even simplify the repro steps (will update the report description).

Seems DepsgraphRelationBuilder::build_constraints cant handle the empty component_subdata string passed in...

Thanks for the confirmation. Almost thought it was a local problem where only this happens on my PC for some odd reason.

Is this technically a confirmed bug then? If so, when could it get fix?

I used empties instead of the armatures as a temporarily fix.

> Can confirm. > Can even simplify the repro steps (will update the report description). > > Seems `DepsgraphRelationBuilder::build_constraints` cant handle the empty `component_subdata` string passed in... > > > Thanks for the confirmation. Almost thought it was a local problem where only this happens on my PC for some odd reason. Is this technically a confirmed bug then? If so, when could it get fix? I used empties instead of the armatures as a temporarily fix.
Bastien Montagne added
Type
Bug
and removed
Type
Report
labels 2023-02-17 10:45:42 +01:00
Member

Is this technically a confirmed bug then? If so, when could it get fix?

It is confirmed as bug, yes. Not sure when a fix will be ready, you'll get notifications about updates though.

> Is this technically a confirmed bug then? If so, when could it get fix? It is confirmed as bug, yes. Not sure when a fix will be ready, you'll get notifications about updates though.
Member

@Sergey @dr.sybren : while the usecase is a bit unclear here, will still raise priority (since this is a crasher)

Underlying problem is that we pass a NULL RootPChanMap for object constraints (as opposed to bone constraints where this map is built prior), see

build_constraints(&object->id, NodeType::TRANSFORM, "", &object->constraints, nullptr);

build_constraints(&object->id, NodeType::BONE, pchan->name, &pchan->constraints, &root_map);

So this little thing just bandaids across the crash, however I havent dug deeper if using OperationCode::BONE_DONE as an OperationCode makes a lot of sense here.

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 7362646881d..14b2ee73694 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -224,7 +224,7 @@ OperationCode bone_target_opcode(ID *target,
                                  RootPChanMap *root_map)
 {
   /* Same armature. */
-  if (target == id) {
+  if (target == id && root_map != nullptr) {
     /* Using "done" here breaks in-chain deps, while using
      * "ready" here breaks most production rigs instead.
      * So, we do a compromise here, and only do this when an
@Sergey @dr.sybren : while the usecase is a bit unclear here, will still raise priority (since this is a crasher) Underlying problem is that we pass a NULL `RootPChanMap` for object constraints (as opposed to bone constraints where this map is built prior), see `build_constraints(&object->id, NodeType::TRANSFORM, "", &object->constraints, nullptr);` `build_constraints(&object->id, NodeType::BONE, pchan->name, &pchan->constraints, &root_map);` So this little thing just bandaids across the crash, however I havent dug deeper if using `OperationCode::BONE_DONE` as an `OperationCode` makes a lot of sense here. ```diff diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 7362646881d..14b2ee73694 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -224,7 +224,7 @@ OperationCode bone_target_opcode(ID *target, RootPChanMap *root_map) { /* Same armature. */ - if (target == id) { + if (target == id && root_map != nullptr) { /* Using "done" here breaks in-chain deps, while using * "ready" here breaks most production rigs instead. * So, we do a compromise here, and only do this when an ```
Philipp Oeser added
Module
Animation & Rigging
Priority
High
and removed
Module
Core
Priority
Normal
labels 2024-02-26 12:23:32 +01:00

@lichtwerk The patch looks correct. Just add a comment that root_map will be nullptr when building object-level constraints, and in that case we don't need to check for the common chains.

@lichtwerk The patch looks correct. Just add a comment that `root_map` will be nullptr when building object-level constraints, and in that case we don't need to check for the common chains.
Member

OKi, will do a quick PR just bureaucratic reasons :)

OKi, will do a quick PR just bureaucratic reasons :)

The diff looks correct to me too. I can't reproduce the crash though (I've tried with 3.3.16 release build).

The diff looks correct to me too. I can't reproduce the crash though (I've tried with 3.3.16 release build).
Member

Oh, !118745 actually landed ( ae022e515b ).

Not sure why this was not auto-closed, will close now

Oh, !118745 actually landed ( ae022e515b41199aaa704ac0fdb9e43a15a30e72 ). Not sure why this was not auto-closed, will close now
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-02-29 11:51:30 +01:00
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
5 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#104657
No description provided.