Armature corrupted after undo #96452

Closed
opened 2022-03-14 14:45:04 +01:00 by Kirill · 7 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.79

Blender Version
Broken: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash: c77597cd0e
Worked: 2.93

Short description of error
Joining armatures and undoing causes armature to be corrupted

Exact steps for others to reproduce the error
#96452.blend

  • Open file
  • Join 2 armatures

Undo

Check bone constraints or bone properties, they will be obviously corrupted(bad name, missing properties, can't enter edit mode). With no constraints present, bones can dissapear completely

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.79 **Blender Version** Broken: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash: `c77597cd0e` Worked: 2.93 **Short description of error** Joining armatures and undoing causes armature to be corrupted **Exact steps for others to reproduce the error** [#96452.blend](https://archive.blender.org/developer/F12928120/T96452.blend) - Open file - Join 2 armatures # Undo Check bone constraints or bone properties, they will be obviously corrupted(bad name, missing properties, can't enter edit mode). With no constraints present, bones can dissapear completely
Author

Added subscriber: @AngryBearr-2

Added subscriber: @AngryBearr-2
Richard Antalik changed title from Bone constraint properties disappear to Armature corrupted after undo 2022-03-15 01:30:31 +01:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @mont29

Added subscriber: @mont29

OK, issue is caused by e648e38887, specifically the clearing of the ID user count on write introduced by this commit.

However, this is merely revealing a bug in the join operator for armatures, and a bad behavior:

  • Bug: Armature data ID of the source is left empty (all of its bones being moved to destination one), but the ID is not properly tagged as changed.
    ** Before e648e38887, the change in ID.us (since object using the source armature is deleted) was enough for undo to detect ID as changed.
  • Bad behavior: Editing the source Armature ID is very bad - other unaffected objects might be using it. It is also different behavior from e.g. Mesh objects joining. Code should either:
    • Leave the source armature ID unchanged, and work with a temp copy of it.
    • Delete the source armature ID together with its object.
      Think bad behavior should be fixed by option 1.

Will commit missing DEG tag, which fixes the crash and is safe enough to be backported to 3.1 should we do a corrective release. Will leave proper fix of the behavior of this operator itself to the #animation_rigging team.

OK, issue is caused by e648e38887, specifically the clearing of the ID user count on write introduced by this commit. However, this is merely revealing a bug in the join operator for armatures, and a bad behavior: * Bug: Armature data ID of the source is left empty (all of its bones being moved to destination one), but the ID is not properly tagged as changed. ** *Before e648e38887, the change in `ID.us` (since object using the source armature is deleted) was enough for undo to detect ID as changed.* * Bad behavior: Editing the source Armature ID is very bad - other unaffected objects might be using it. It is also different behavior from e.g. Mesh objects joining. Code should either: - Leave the source armature ID unchanged, and work with a temp copy of it. - Delete the source armature ID together with its object. Think bad behavior should be fixed by option 1. ----------------------- Will commit missing DEG tag, which fixes the crash and is safe enough to be backported to 3.1 should we do a corrective release. Will leave proper fix of the behavior of this operator itself to the #animation_rigging team.

This issue was referenced by 2fc52fb742

This issue was referenced by 2fc52fb742396bf790395a0327cf77c1c97fd229

This issue was referenced by 2156841c8c

This issue was referenced by 2156841c8ca8e754e073ceb14912c7529af891bf

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2022-03-15 15:03:47 +01:00
Thomas Dinges added this to the 3.1 milestone 2023-02-08 15:52:44 +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
4 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#96452
No description provided.