Crash on appending collection twice that contains a nested liboverride collection (request to backport, fixed in main) #126879

Open
opened 2024-08-28 11:10:02 +02:00 by Albert-OShea · 5 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.99

Blender Version
Broken: version: 4.2.1 LTS, branch: blender-v4.2-release, commit date: 2024-08-19 11:21, hash: 396f546c9d82
Worked: ?

Short description of error
Blender crashes when appending the same collection two times, if that collection contains a liboverride collection linked from a different file (this may not be the exact reason/process that causes the crash, but I think I have simplified the setup more than enough to narrow it down).

Exact steps for others to reproduce the error

  • Download both attached blend files and store them in the same directory.
  • Open a new startup file.
  • Do File > Append, navigate to library.blend, select Collection, select and Append CH-mav-hiviz_worker_01
  • Once the collection is appended, repeat above step (append the same collection again)
  • Blender crashes.
  • Note: Enabling the Instance Collections option when appending also causes the crash, and same with appending the collection from the asset browser.

To repro this ERROR from scratch

  • add a cube with a lattice modifier (also a lattice target) and save as lib_nested.blend
  • in a new file, link the collection from lib_nested.blend
  • make a library override on the collection
  • make a library override on the cube as well
  • add a new (local to that file) lattice
  • override the cube's modifier target to be the local lattice
  • save as lib.blend
  • once again in a new file, append the Collection from lib.blend with default settings
  • (this will already give the "Existing override hierarchy root is invalid, will try to find a new valid one" ERROR )
  • append the Collection from lib.blend with default settings again
  • (this will give the "Local ID found as part of the linked data hierarchy, this should never happen" ERROR )
**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.99 **Blender Version** Broken: version: 4.2.1 LTS, branch: blender-v4.2-release, commit date: 2024-08-19 11:21, hash: `396f546c9d82` Worked: ? **Short description of error** Blender crashes when appending the same collection two times, if that collection contains a liboverride collection linked from a different file (this may not be the exact reason/process that causes the crash, but I think I have simplified the setup more than enough to narrow it down). **Exact steps for others to reproduce the error** - Download both attached blend files and store them in the same directory. - Open a new startup file. - Do `File > Append`, navigate to `library.blend`, select `Collection`, select and Append `CH-mav-hiviz_worker_01` - Once the collection is appended, repeat above step (append the same collection again) - Blender crashes. - Note: Enabling the `Instance Collections` option when appending also causes the crash, and same with appending the collection from the asset browser. **To repro this ERROR from scratch** - add a cube with a lattice modifier (also a lattice target) and save as `lib_nested.blend` - in a new file, link the collection from `lib_nested.blend` - make a library override on the collection - make a library override on the cube as well - add a new (local to that file) lattice - override the cube's modifier target to be the local lattice - save as `lib.blend` - once again in a new file, append the `Collection` from `lib.blend` with default settings - (this will already give the "Existing override hierarchy root is invalid, will try to find a new valid one" ERROR ) - append the `Collection` from `lib.blend` with default settings **again** - (this will give the "Local ID found as part of the linked data hierarchy, this should never happen" ERROR )
Albert-OShea added the
Severity
Normal
Type
Bug
Status
Needs Triage
labels 2024-08-28 11:10:03 +02:00
Member

Can confirm the crash in 4.2.1

4.3 alpha does not seem to crash anymore (will check which commit fixed it -- and if it is on the backport list already)

However, even in 4.3, I am getting the following:

ERROR (bke.liboverride): source/blender/blenkernel/intern/lib_override.cc:1908 BKE_lib_override_library_main_hierarchy_root_ensure: Existing override hierarchy root ('GRmav-head-pete') for ID 'OBGEO-mav-head-pete' is invalid, will try to find a new valid one
ERROR (bke.blendfile_link_append): source/blender/blenkernel/intern/blendfile_link_append.cc:982 foreach_libblock_link_append_common_processing: Local ID 'OBRIG-mav' found as part of the linked data hierarchy, this should never happen
ERROR (bke.blendfile_link_append): source/blender/blenkernel/intern/blendfile_link_append.cc:982 foreach_libblock_link_append_common_processing: Local ID 'OBRIG-mav' found as part of the linked data hierarchy, this should never happen
Can confirm the crash in 4.2.1 4.3 alpha does not seem to crash anymore (will check which commit fixed it -- and if it is on the backport list already) However, even in 4.3, I am getting the following: ```C ERROR (bke.liboverride): source/blender/blenkernel/intern/lib_override.cc:1908 BKE_lib_override_library_main_hierarchy_root_ensure: Existing override hierarchy root ('GRmav-head-pete') for ID 'OBGEO-mav-head-pete' is invalid, will try to find a new valid one ERROR (bke.blendfile_link_append): source/blender/blenkernel/intern/blendfile_link_append.cc:982 foreach_libblock_link_append_common_processing: Local ID 'OBRIG-mav' found as part of the linked data hierarchy, this should never happen ERROR (bke.blendfile_link_append): source/blender/blenkernel/intern/blendfile_link_append.cc:982 foreach_libblock_link_append_common_processing: Local ID 'OBRIG-mav' found as part of the linked data hierarchy, this should never happen ```
Member

fixed between 7c68ac258f and d5e591b3dc (probably by dcadb3301e)
@mont29 : dcadb3301e seems safe enough to put on #124452 ?

fixed between 7c68ac258f34 and d5e591b3dc8c (probably by dcadb3301ef0d09fa5969f2109eeb73e3c8a8d0a) @mont29 : dcadb3301ef0d09fa5969f2109eeb73e3c8a8d0a seems safe enough to put on #124452 ?
Philipp Oeser added
Module
Core
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-08-28 13:21:58 +02:00
Philipp Oeser added this to the 4.2 LTS milestone 2024-08-28 13:22:05 +02:00
Philipp Oeser changed title from Crash on appending collection twice that contains a nested liboverride collection to Crash on appending collection twice that contains a nested liboverride collection (request to backport, fixed in main) 2024-08-28 13:22:29 +02:00
Author

Pardon my 2 cents but could this be a flaw with the Localize All option that is enabled by default when appending? Theoretically this should remove all linked references in the first place, correct?

Pardon my 2 cents but could this be a flaw with the `Localize All` option that is enabled by default when appending? Theoretically this should remove all linked references in the first place, correct?
Member

To repro this ERROR from scratch:

  • add a cube with a lattice modifier (also a lattice target) and save as lib_nested.blend
  • in a new file, link the collection from lib_nested.blend
  • make a library override on the collection
  • make a library override on the cube as well
  • add a new (local to that file) lattice
  • override the cube's modifier target to be the local lattice
  • save as lib.blend
  • once again in a new file, append the Collection from lib.blend with default settings
  • (this will already give the "Existing override hierarchy root is invalid, will try to find a new valid one" ERROR )
  • append the Collection from lib.blend with default settings again
  • (this will give the "Local ID found as part of the linked data hierarchy, this should never happen" ERROR )

@mont29 : this does not sound like the "dirty hacks. Ideally we could fully forbid such assignement in BPY/RNA API" case mentioned in the commit message from dcadb3301e ?

To repro this ERROR from scratch: - add a cube with a lattice modifier (also a lattice target) and save as `lib_nested.blend` - in a new file, link the collection from `lib_nested.blend` - make a library override on the collection - make a library override on the cube as well - add a new (local to that file) lattice - override the cube's modifier target to be the local lattice - save as `lib.blend` - once again in a new file, append the `Collection` from `lib.blend` with default settings - (this will already give the "Existing override hierarchy root is invalid, will try to find a new valid one" ERROR ) - append the `Collection` from `lib.blend` with default settings **again** - (this will give the "Local ID found as part of the linked data hierarchy, this should never happen" ERROR ) @mont29 : this does not sound like the "dirty hacks. Ideally we could fully forbid such assignement in BPY/RNA API" case mentioned in the commit message from dcadb3301ef0d09fa5969f2109eeb73e3c8a8d0a ?

This is going to be an interesting one... Thing is, we do specific handling of liboverrides on append, with the assumption that user want to get a local liboverride, and not a completely 'flat local' data, when they append a liboverride from another library. Will see when I can dig and understand the root of this issue.

This is going to be an interesting one... Thing is, we do specific handling of liboverrides on append, with the assumption that user want to get a local liboverride, and not a completely 'flat local' data, when they append a liboverride from another library. Will see when I can dig and understand the root of this issue.
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
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
Viewport & EEVEE
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#126879
No description provided.