Blender crash when calling Delete command for Library Override #101306

Closed
opened 2022-09-23 17:42:26 +02:00 by Tim Pronin · 11 comments

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

Blender Version
Broken: version: 3.3.0, branch: master, commit date: 2022-09-06 15:39, hash: 0759f671ce
Worked: (newest version of Blender that worked as expected)

Short description of error
If the command RMB > Library Override > Troubleshoot > Delete is called for the Library Overrided collection, then Blender closes.

Exact steps for others to reproduce the error

  1. Create a new scene
  2. Delete everything in it
  3. Call File > Link. Select the Blend file and any collection in it from the Collections folder (I am attaching the file that I used).
  4. In the Outliner click on this collection RMB > Library Override > Make > Selected & Content.
  5. Press RMB > Library Override > Troubleshoot > Delete on it again.
    Blender closes.

Library.blend

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.15 **Blender Version** Broken: version: 3.3.0, branch: master, commit date: 2022-09-06 15:39, hash: `0759f671ce` Worked: (newest version of Blender that worked as expected) **Short description of error** If the command RMB > Library Override > Troubleshoot > Delete is called for the Library Overrided collection, then Blender closes. **Exact steps for others to reproduce the error** 1) Create a new scene 2) Delete everything in it 3) Call File > Link. Select the Blend file and any collection in it from the Collections folder (I am attaching the file that I used). 4) In the Outliner click on this collection RMB > Library Override > Make > Selected & Content. 5) Press RMB > Library Override > Troubleshoot > Delete on it again. Blender closes. [Library.blend](https://archive.blender.org/developer/F13560696/Library.blend)
Author

Added subscriber: @timpronin

Added subscriber: @timpronin

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

Thanks for the report, I can confirm the crash:

>	blender.exe!blender::Map<ID *,blender::Vector<blender::ed::outliner::OutlinerLiboverrideDataIDRoot,4,blender::GuardedAllocator>,0,blender::PythonProbingStrategy<1,0>,blender::DefaultHash<ID *>,blender::DefaultEquality,blender::IntrusiveMapSlot<ID *,blender::Vector<blender::ed::outliner::OutlinerLiboverrideDataIDRoot,4,blender::GuardedAllocator>,blender::PointerKeyInfo<ID *>>,blender::GuardedAllocator>::lookup_or_add_default(ID * const & key) Line 582	C++

 	blender.exe!blender::ed::outliner::OutlinerLibOverrideData::id_root_set(ID * id_hierarchy_root_reference) Line 951	C++
 	blender.exe!blender::ed::outliner::outliner_do_libdata_operation_selection_set(bContext * C, ReportList * reports, Scene * scene, SpaceOutliner * space_outliner, const ListBase & subtree, const bool has_parent_selected, void(*)(bContext *, ReportList *, Scene *, blender::ed::outliner::TreeElement *, TreeStoreElem *, TreeStoreElem *, void *) operation_fn, blender::ed::outliner::eOutlinerLibOpSelectionSet selection_set, void * user_data) Line 513	C++
 	blender.exe!blender::ed::outliner::outliner_do_libdata_operation_selection_set(bContext * C, ReportList * reports, Scene * scene, SpaceOutliner * space_outliner, const ListBase & subtree, const bool has_parent_selected, void(*)(bContext *, ReportList *, Scene *, blender::ed::outliner::TreeElement *, TreeStoreElem *, TreeStoreElem *, void *) operation_fn, blender::ed::outliner::eOutlinerLibOpSelectionSet selection_set, void * user_data) Line 519	C++
 	blender.exe!blender::ed::outliner::outliner_do_libdata_operation_selection_set(bContext * C, ReportList * reports, Scene * scene, SpaceOutliner * space_outliner, const ListBase & subtree, const bool has_parent_selected, void(*)(bContext *, ReportList *, Scene *, blender::ed::outliner::TreeElement *, TreeStoreElem *, TreeStoreElem *, void *) operation_fn, blender::ed::outliner::eOutlinerLibOpSelectionSet selection_set, void * user_data) Line 519	C++
 	blender.exe!blender::ed::outliner::outliner_do_libdata_operation_selection_set(bContext * C, ReportList * reports, Scene * scene, SpaceOutliner * space_outliner, void(*)(bContext *, ReportList *, Scene *, blender::ed::outliner::TreeElement *, TreeStoreElem *, TreeStoreElem *, void *) operation_fn, blender::ed::outliner::eOutlinerLibOpSelectionSet selection_set, void * user_data) Line 548	C++
 	blender.exe!blender::ed::outliner::outliner_liboverride_operation_exec(bContext * C, wmOperator * op) Line 1804	C++
 	blender.exe!WM_menu_invoke_ex(bContext * C, wmOperator * op, wmOperatorCallContext opcontext) Line 1027	C
 	blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, const wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1445	C++
 	blender.exe!wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const wmOperatorCallContext context, const bool poll_only, const wmEvent * event) Line 1651	C++
 	blender.exe!WM_operator_name_call_ptr(bContext * C, wmOperatorType * ot, wmOperatorCallContext context, PointerRNA * properties, const wmEvent * event) Line 1697	C++
 	blender.exe!WM_operator_name_call_ptr_with_depends_on_cursor(bContext * C, wmOperatorType * ot, wmOperatorCallContext opcontext, PointerRNA * properties, const wmEvent * event, const char * drawstr) Line 1890	C++
 	blender.exe!ui_apply_but_funcs_after(bContext * C) Line 1018	C
 	blender.exe!ui_popup_handler(bContext * C, const wmEvent * event, void * userdata) Line 11529	C
 	blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 788	C++
 	blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3216	C++
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3336	C++
 	blender.exe!wm_event_do_handlers(bContext * C) Line 3927	C++
 	blender.exe!WM_main(bContext * C) Line 643	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 580	C
 	[External Code]	

The interface changed in 3.3, so I'm not sure how to replicate in 3.2 to check if it's a regression.

Thanks for the report, I can confirm the crash: ``` > blender.exe!blender::Map<ID *,blender::Vector<blender::ed::outliner::OutlinerLiboverrideDataIDRoot,4,blender::GuardedAllocator>,0,blender::PythonProbingStrategy<1,0>,blender::DefaultHash<ID *>,blender::DefaultEquality,blender::IntrusiveMapSlot<ID *,blender::Vector<blender::ed::outliner::OutlinerLiboverrideDataIDRoot,4,blender::GuardedAllocator>,blender::PointerKeyInfo<ID *>>,blender::GuardedAllocator>::lookup_or_add_default(ID * const & key) Line 582 C++ blender.exe!blender::ed::outliner::OutlinerLibOverrideData::id_root_set(ID * id_hierarchy_root_reference) Line 951 C++ blender.exe!blender::ed::outliner::outliner_do_libdata_operation_selection_set(bContext * C, ReportList * reports, Scene * scene, SpaceOutliner * space_outliner, const ListBase & subtree, const bool has_parent_selected, void(*)(bContext *, ReportList *, Scene *, blender::ed::outliner::TreeElement *, TreeStoreElem *, TreeStoreElem *, void *) operation_fn, blender::ed::outliner::eOutlinerLibOpSelectionSet selection_set, void * user_data) Line 513 C++ blender.exe!blender::ed::outliner::outliner_do_libdata_operation_selection_set(bContext * C, ReportList * reports, Scene * scene, SpaceOutliner * space_outliner, const ListBase & subtree, const bool has_parent_selected, void(*)(bContext *, ReportList *, Scene *, blender::ed::outliner::TreeElement *, TreeStoreElem *, TreeStoreElem *, void *) operation_fn, blender::ed::outliner::eOutlinerLibOpSelectionSet selection_set, void * user_data) Line 519 C++ blender.exe!blender::ed::outliner::outliner_do_libdata_operation_selection_set(bContext * C, ReportList * reports, Scene * scene, SpaceOutliner * space_outliner, const ListBase & subtree, const bool has_parent_selected, void(*)(bContext *, ReportList *, Scene *, blender::ed::outliner::TreeElement *, TreeStoreElem *, TreeStoreElem *, void *) operation_fn, blender::ed::outliner::eOutlinerLibOpSelectionSet selection_set, void * user_data) Line 519 C++ blender.exe!blender::ed::outliner::outliner_do_libdata_operation_selection_set(bContext * C, ReportList * reports, Scene * scene, SpaceOutliner * space_outliner, void(*)(bContext *, ReportList *, Scene *, blender::ed::outliner::TreeElement *, TreeStoreElem *, TreeStoreElem *, void *) operation_fn, blender::ed::outliner::eOutlinerLibOpSelectionSet selection_set, void * user_data) Line 548 C++ blender.exe!blender::ed::outliner::outliner_liboverride_operation_exec(bContext * C, wmOperator * op) Line 1804 C++ blender.exe!WM_menu_invoke_ex(bContext * C, wmOperator * op, wmOperatorCallContext opcontext) Line 1027 C blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, const wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1445 C++ blender.exe!wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const wmOperatorCallContext context, const bool poll_only, const wmEvent * event) Line 1651 C++ blender.exe!WM_operator_name_call_ptr(bContext * C, wmOperatorType * ot, wmOperatorCallContext context, PointerRNA * properties, const wmEvent * event) Line 1697 C++ blender.exe!WM_operator_name_call_ptr_with_depends_on_cursor(bContext * C, wmOperatorType * ot, wmOperatorCallContext opcontext, PointerRNA * properties, const wmEvent * event, const char * drawstr) Line 1890 C++ blender.exe!ui_apply_but_funcs_after(bContext * C) Line 1018 C blender.exe!ui_popup_handler(bContext * C, const wmEvent * event, void * userdata) Line 11529 C blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 788 C++ blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3216 C++ blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3336 C++ blender.exe!wm_event_do_handlers(bContext * C) Line 3927 C++ blender.exe!WM_main(bContext * C) Line 643 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 580 C [External Code] ``` The interface changed in 3.3, so I'm not sure how to replicate in 3.2 to check if it's a regression.
Member

Added subscribers: @mont29, @lichtwerk

Added subscribers: @mont29, @lichtwerk
Member

@mont29: not sure why we are not passing user_data id_override_library_delete_hierarchy_fn?
(same is true for OUTLINER_LIBOVERRIDE_OP_CLEAR_SINGLE btw.)

Note: there is also a wrong assert which I stumbled upon.
Following fixes both:
P3214: T101306_snippet



diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index 69ab9a2950e..65ee355fe18 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -1213,7 +1213,7 @@ static void id_override_library_create_hierarchy(
     /* Remove the instance empty from this scene, the items now have an overridden collection
      * instead. */
     if (success && data_idroot.is_override_instancing_object) {
-      BLI_assert(GS(data_idroot.id_instance_hint) == ID_OB);
+      BLI_assert(GS(data_idroot.id_instance_hint->name) == ID_OB);
       ED_object_base_free_and_unlink(
           &bmain, scene, reinterpret_cast<Object *>(data_idroot.id_instance_hint));
     }
@@ -1799,7 +1799,7 @@ static int outliner_liboverride_operation_exec(bContext *C, wmOperator *op)
                                                   space_outliner,
                                                   id_override_library_delete_hierarchy_fn,
                                                   OUTLINER_LIB_SELECTIONSET_SELECTED,
-                                                  nullptr);
+                                                  &override_data);
 
       id_override_library_delete_hierarchy_process(C, op->reports, override_data);
@mont29: not sure why we are not passing `user_data` `id_override_library_delete_hierarchy_fn`? (same is true for `OUTLINER_LIBOVERRIDE_OP_CLEAR_SINGLE` btw.) Note: there is also a wrong assert which I stumbled upon. Following fixes both: [P3214: T101306_snippet](https://archive.blender.org/developer/P3214.txt) ``` diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 69ab9a2950e..65ee355fe18 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -1213,7 +1213,7 @@ static void id_override_library_create_hierarchy( /* Remove the instance empty from this scene, the items now have an overridden collection * instead. */ if (success && data_idroot.is_override_instancing_object) { - BLI_assert(GS(data_idroot.id_instance_hint) == ID_OB); + BLI_assert(GS(data_idroot.id_instance_hint->name) == ID_OB); ED_object_base_free_and_unlink( &bmain, scene, reinterpret_cast<Object *>(data_idroot.id_instance_hint)); } @@ -1799,7 +1799,7 @@ static int outliner_liboverride_operation_exec(bContext *C, wmOperator *op) space_outliner, id_override_library_delete_hierarchy_fn, OUTLINER_LIB_SELECTIONSET_SELECTED, - nullptr); + &override_data); id_override_library_delete_hierarchy_process(C, op->reports, override_data); ```
Member

Will dare to set this to High prio (seems to always go wrong)

Will dare to set this to High prio (seems to always go wrong)

@lichtwerk this patch makes total sense to me indeed, feel free to commit it (and tag it for backport to 3.3) :)

OUTLINER_LIBOVERRIDE_OP_CLEAR_SINGLE does not have nor use userdata at all

@lichtwerk this patch makes total sense to me indeed, feel free to commit it (and tag it for backport to 3.3) :) *`OUTLINER_LIBOVERRIDE_OP_CLEAR_SINGLE` does not have nor use userdata at all*
Philipp Oeser self-assigned this 2022-10-04 17:56:36 +02:00

This issue was referenced by 5d820393af

This issue was referenced by 5d820393af22326d9cbec3d5136d4858023bb829

This issue was referenced by cfa765845b

This issue was referenced by cfa765845b517a718f7c99d98b8f72f247a008be
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges added this to the 3.3 LTS milestone 2023-02-08 15:37:44 +01:00
Bastien Montagne added this to the Core project 2023-02-09 15:43:11 +01:00
Bastien Montagne removed this from the Core project 2023-02-09 18:20:14 +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#101306
No description provided.