Fix #118307: Outliner crash with additional constraint on overridden bone #118573

Closed
Philipp Oeser wants to merge 1 commits from lichtwerk/blender:118307 into blender-v4.1-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Since IDOverrideLibraryProperty apparently stores its rna_path with
string-based collection keys, we have to make sure we also use string-
based keys elsewhere in OverrideRNAPathTreeBuilder::build_path and
down the line, otherwise:

  • we get duplicate collection entries ("pose.bones[1].constraints" vs.
    "pose.bones["Bone.001"].constraints")
  • crashes may occur (we are reading on an already freed TreeElement
    see #118307 for ASAN output)

So now make sure we are using string-based collection keys when we can
so the TreeElements match /and dont get duplicated).

NOTE: the duplication of entries came with 67b92418ee

Since `IDOverrideLibraryProperty` apparently stores its rna_path with string-based collection keys, we have to make sure we also use string- based keys elsewhere in `OverrideRNAPathTreeBuilder::build_path` and down the line, otherwise: - we get duplicate collection entries ("pose.bones[1].constraints" vs. "pose.bones["Bone.001"].constraints") - crashes may occur (we are reading on an already freed `TreeElement` see #118307 for ASAN output) So now make sure we are using string-based collection keys when we can so the TreeElements match /and dont get duplicated). NOTE: the duplication of entries came with 67b92418ee
Philipp Oeser added 1 commit 2024-02-21 16:27:45 +01:00
Since `IDOverrideLibraryProperty` apparently stores its rna_path with
string-based collection keys, we have to make sure we also use string-
based keys elsewhere in `OverrideRNAPathTreeBuilder::build_path` and
down the line, otherwise:
- we get duplicate collection entries ("pose.bones[1].constraints" vs.
"pose.bones["Bone.001"].constraints")
- crashes may occur (we are reading on an already freed `TreeElement`
see #118307 for ASAN output)

So now make sure we are using string-based collection keys when we can
so the TreeElements match /and dont get duplicated).

NOTE: the duplication of entries came with 67b92418ee
Philipp Oeser added this to the User Interface project 2024-02-21 16:27:58 +01:00
Philipp Oeser added the
Interest
Overrides
label 2024-02-21 16:28:07 +01:00
Philipp Oeser requested review from Bastien Montagne 2024-02-21 16:28:13 +01:00
Philipp Oeser requested review from Julian Eisel 2024-02-21 16:28:21 +01:00
Philipp Oeser changed title from Fix #118307: Outliner crash with additional constraint on overrdden bone to Fix #118307: Outliner crash with additional constraint on overridden bone 2024-02-21 16:31:12 +01:00
Bastien Montagne approved these changes 2024-02-22 12:44:14 +01:00
Bastien Montagne left a comment
Owner

this change makes sens to me, wouldn't mind getting @JulianEisel double-check on it too though.

this change makes sens to me, wouldn't mind getting @JulianEisel double-check on it too though.
Julian Eisel approved these changes 2024-02-22 17:43:39 +01:00
Author
Member

Not exactly sure what happened here (why this PR was not recognized as merged and closed)

image

Will close by hand then, it landed as 8b44c62ce7

Not exactly sure what happened here (why this PR was not recognized as merged and closed) ![image](/attachments/20a58ffd-ddc6-485e-a58c-c0916c458e4d) Will close by hand then, it landed as 8b44c62ce77a43760a6cadda7712d15cb1cd002b
Philipp Oeser closed this pull request 2024-02-23 11:26:29 +01:00

Pull request closed

Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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
3 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#118573
No description provided.