Outliner "delete hierarchy" crash with a mesh in edit-mode #72667

Closed
opened 2019-12-24 06:24:06 +01:00 by Casey Connor · 12 comments

System Information
Operating system: Linux-4.18.0-25-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: f1aa4d18d4
Worked: (optional)

Short description of error
Blender occasionally and unpredictably crashes when using "delete hierarchy" in the outliner and a 3d viewport is open

Exact steps for others to reproduce the error

I have tried to generate a repeatable .blend example and I can not. I have a set of collections in a project and when I select one or several of the collections in the outliner, right click, and choose "delete hierarchy", there is an occasional crash.

Seeing the "view3d_main_region_draw" in the stack trace, if I change the 3d viewport to e.g. an image editor, this issue does not happen.

There are a lot of "howevers" here, though: once a test file stops crashing (as sometimes happened when I was trying to narrow things down into a demo project), it won't crash anymore, implying some kind of file state is contributing. Also, my original crashing project was using the animation nodes plugin. Not sure if that might play a role in "corrupting" the blend file somehow. (The crash happens when using a blank config dir, i.e. no animation nodes plugin is active, but the project opens with an "AN Tree" graph editor page.)

Crash log:

# Blender 2.81 (sub 16), Commit date: 2019-12-04 11:32, Hash f1aa4d18d49d
Unable to open '/tmp/copybuffer.blend': No such file or directory  # Warning
No data to paste  # Info
Saved "bc.blend"  # Info
bpy.ops.outliner.collection_delete(hierarchy=False)  # Operator
Saved "bc.blend"  # Info
bpy.ops.outliner.collection_delete(hierarchy=True)  # Operator
Saved "bc.blend"  # Info
bpy.ops.outliner.item_activate(extend=False, deselect_all=True)  # Operator
bpy.ops.outliner.item_activate(extend=False, extend_range=True, deselect_all=True)  # Operator
Saved "bc.blend"  # Info
bpy.ops.outliner.item_activate(extend=False, deselect_all=True)  # Operator
bpy.ops.outliner.item_activate(extend=False, extend_range=True, deselect_all=True)  # Operator
Saved "bc.blend"  # Info
Saved "bc.blend"  # Info
bpy.ops.outliner.collection_delete(hierarchy=True)  # Operator
Saved "bc.blend"  # Info
bpy.ops.outliner.collection_delete(hierarchy=True)  # Operator
Saved "bc.blend"  # Info
bpy.ops.outliner.collection_delete(hierarchy=True)  # Operator
Saved "bc.blend"  # Info
bpy.ops.outliner.collection_delete(hierarchy=True)  # Operator
Saved "bc.blend"  # Info
bpy.ops.outliner.collection_delete(hierarchy=True)  # Operator
Saved "bc.blend"  # Info
bpy.ops.outliner.collection_delete(hierarchy=True)  # Operator

# backtrace
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(BLI_system_backtrace+0x1d) [0x14ee84d]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender() [0x12cbb79]
/lib/x86_64-linux-gnu/libc.so.6(+0x41100) [0x7fae00ede100]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(DRW_mesh_batch_cache_create_requested+0x1df) [0x2d4fa1f]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender() [0x2cf70e0]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(DRW_draw_render_loop_ex+0x546) [0x2cf8e56]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(view3d_main_region_draw+0x77) [0x2fd7137]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(ED_region_do_draw+0x8f1) [0x304b9d1]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(wm_draw_update+0x496) [0x16a0686]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(WM_main+0x30) [0x169dce0]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(main+0x2fe) [0x1237f7e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fae00ec109b]
/path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender() [0x12c849c]
**System Information** Operating system: Linux-4.18.0-25-generic-x86_64-with-debian-buster-sid 64 Bits Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116 **Blender Version** Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: `f1aa4d18d4` Worked: (optional) **Short description of error** Blender occasionally and unpredictably crashes when using "delete hierarchy" in the outliner and a 3d viewport is open **Exact steps for others to reproduce the error** I have tried to generate a repeatable .blend example and I can not. I have a set of collections in a project and when I select one or several of the collections in the outliner, right click, and choose "delete hierarchy", there is an occasional crash. Seeing the "view3d_main_region_draw" in the stack trace, if I change the 3d viewport to e.g. an image editor, this issue does not happen. There are a lot of "howevers" here, though: once a test file stops crashing (as sometimes happened when I was trying to narrow things down into a demo project), it won't crash anymore, implying some kind of file state is contributing. Also, my original crashing project was using the animation nodes plugin. Not sure if that might play a role in "corrupting" the blend file somehow. (The crash happens when using a blank config dir, i.e. no animation nodes plugin is active, but the project opens with an "AN Tree" graph editor page.) Crash log: ``` # Blender 2.81 (sub 16), Commit date: 2019-12-04 11:32, Hash f1aa4d18d49d Unable to open '/tmp/copybuffer.blend': No such file or directory # Warning No data to paste # Info Saved "bc.blend" # Info bpy.ops.outliner.collection_delete(hierarchy=False) # Operator Saved "bc.blend" # Info bpy.ops.outliner.collection_delete(hierarchy=True) # Operator Saved "bc.blend" # Info bpy.ops.outliner.item_activate(extend=False, deselect_all=True) # Operator bpy.ops.outliner.item_activate(extend=False, extend_range=True, deselect_all=True) # Operator Saved "bc.blend" # Info bpy.ops.outliner.item_activate(extend=False, deselect_all=True) # Operator bpy.ops.outliner.item_activate(extend=False, extend_range=True, deselect_all=True) # Operator Saved "bc.blend" # Info Saved "bc.blend" # Info bpy.ops.outliner.collection_delete(hierarchy=True) # Operator Saved "bc.blend" # Info bpy.ops.outliner.collection_delete(hierarchy=True) # Operator Saved "bc.blend" # Info bpy.ops.outliner.collection_delete(hierarchy=True) # Operator Saved "bc.blend" # Info bpy.ops.outliner.collection_delete(hierarchy=True) # Operator Saved "bc.blend" # Info bpy.ops.outliner.collection_delete(hierarchy=True) # Operator Saved "bc.blend" # Info bpy.ops.outliner.collection_delete(hierarchy=True) # Operator # backtrace /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(BLI_system_backtrace+0x1d) [0x14ee84d] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender() [0x12cbb79] /lib/x86_64-linux-gnu/libc.so.6(+0x41100) [0x7fae00ede100] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(DRW_mesh_batch_cache_create_requested+0x1df) [0x2d4fa1f] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender() [0x2cf70e0] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(DRW_draw_render_loop_ex+0x546) [0x2cf8e56] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(view3d_main_region_draw+0x77) [0x2fd7137] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(ED_region_do_draw+0x8f1) [0x304b9d1] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(wm_draw_update+0x496) [0x16a0686] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(WM_main+0x30) [0x169dce0] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender(main+0x2fe) [0x1237f7e] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7fae00ec109b] /path/to/blender/blender-2.81a-linux-glibc217-x86_64/blender() [0x12c849c] ```
Author

Added subscriber: @clepsydrae

Added subscriber: @clepsydrae

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Please attach a blend file which crashes (even if it doesn't crash reliably).

Please attach a blend file which crashes (even if it doesn't crash reliably).
Author

I will try -- if I can not, is there a private address I can send a file to?

I will try -- if I can not, is there a private address I can send a file to?
Author

Nevermind, I managed to get a reliable crash with this .blend.

If I open it, right click on "notes_and_labels" in the outliner, and "Delete Hierarchy", it crashes.
If I repeat this, but change the 3d viewport to an image editor and do the deletion, it does not crash.

dh4.blend

If I remove basically any of the other objects or collections, save the project, and re-open it, there is no crash. I couldn't narrow it down farther than this.

Thanks for looking at it.

Nevermind, I managed to get a reliable crash with this .blend. If I open it, right click on "notes_and_labels" in the outliner, and "Delete Hierarchy", it crashes. If I repeat this, but change the 3d viewport to an image editor and do the deletion, it does not crash. [dh4.blend](https://archive.blender.org/developer/F8241957/dh4.blend) If I remove basically any of the other objects or collections, save the project, and re-open it, there is no crash. I couldn't narrow it down farther than this. Thanks for looking at it.

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

This is caused by remove collection not exiting edit-mode.

Note that the crash points to BMEditMesh.ob pointer becoming stale, even if thats corrected (I tested removing the pointer locally), there is a crash in the draw manager.

We need a reliable way of exiting edit-mode on all objects which are removed when deleting the collection.

This is caused by remove collection not exiting edit-mode. Note that the crash points to BMEditMesh.ob pointer becoming stale, even if thats corrected (I tested removing the pointer locally), there is a crash in the draw manager. We need a reliable way of exiting edit-mode on all objects which are removed when deleting the collection.

Looking into this further, there are two bugs in this area.

  • Dangling BMEditMesh.ob pointer.
  • Displaying an object mode mesh with edit-mode data present crashes (reported #72848 (Multiple windows displaying an linked duplicate, crashes when transforming in edit-mode)).

For this report, a quick workaround could be to either exit edit-mode before removing the collection (flushing edits to object mode).

However, it seems like this kind of problem is something that could easily occur in other situations (removing collections from Python for example).

Freeing edit-mode data when deleting the object could work too, however it's not correct since this should be possible to support removing an object without clearing the object-data's edit-mode (since it may be used by another object), e.g: P1200.


Since this is related to ID removal, tagging @mont29

Looking into this further, there are two bugs in this area. - Dangling `BMEditMesh.ob` pointer. - Displaying an object mode mesh with edit-mode data present crashes (reported #72848 (Multiple windows displaying an linked duplicate, crashes when transforming in edit-mode)). ---- For this report, a quick workaround could be to either exit edit-mode before removing the collection (flushing edits to object mode). However, it seems like this kind of problem is something that could easily occur in other situations (removing collections from Python for example). Freeing edit-mode data when deleting the object could work too, however it's not correct since this should be possible to support removing an object without clearing the object-data's edit-mode (since it may be used by another object), e.g: [P1200](https://archive.blender.org/developer/P1200.txt). ----- Since this is related to ID removal, tagging @mont29

Added subscriber: @mont29

Added subscriber: @mont29
Campbell Barton changed title from occasional crash when "delete hierarchy" in outliner is used and a 3d viewport is open to Outliner "delete hierarchy" crash with a mesh in edit-mode 2020-01-05 05:00:24 +01:00

This issue was referenced by 07a959067d

This issue was referenced by 07a959067d5a3c05fcbd65105525d6e139be5c5f

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2020-01-08 12:42:09 +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
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#72667
No description provided.