Crash: Multi-object edit containing a (multiuser) mesh that is also used by an object in a hidden collection destroys CustomData layer #69834

Closed
opened 2019-09-13 09:05:43 +02:00 by Caden Mitchell · 11 comments

System Information
Operating system: Windows 10
Graphics card: Intel® HD Graphics 620 (Kaby Lake GT2)
Processor: Intel® Core™ i3-7020U CPU @ 2.30GHz × 4 (64-bit)
Memory: 8 GB

Blender Version
v 2.80 (Current Stable)
v 2.81 (8f55794c0e)

Short description of error
Every single time I try to triangulate the faces of all my meshes at once, returning to object mode crashes Blender if it's in "Material Preview" or "Rendered" Eevee shading. I can also do this in "Solid" shading and it won't crash after returning, but as soon as I switch shading to "Material Preview" shading, it crashes. I've reproduced this several times in the stable 2.80 so I tried my build of 2.81 from four days ago. Still crashes without failure to reproduce.

Exact steps for others to reproduce the error
Undead Fields Remaster (BUG report for Blender Developers).blend

  • Open that file
  • Click the "View Object Types" button in 3D View and hide all but meshes.
  • Select all the objects with the A key and switch to edit mode.
  • Press A in edit mode to select all the geometry.
  • Press Ctrl+T to triangulate all the faces.
  • Enter object mode. If you're in "Rendered" or "Material Preview" shading, it will crash.

If you did steps 1-6 in "Solid" shading first and it didn't crash, try repeating it all while in "Rendered" or "Material Preview" shading beforehand.

Note
If I can/cannot reproduce it in the build from today (13th as of writing) I'll edit this post with my findings. I'm fairly certain that this is just a bug that is so specific that it has not been found/reported yet.

EDIT:

Digging further this can be fixed by:

  • enable the Levels of Detail collection for the viewport
  • OR keep the Levels of Detail disabled in the viewport, but remove tree oak joined, tree pine joined, tree small joined from this collection
  • OR by making tree oak joined, tree pine joined, tree small joined so that they have single user meshes...

minimal repro file based on the report file:
repro.blend

Analysing this it boils down to:

  • if two objects share a mesh
  • if this mesh uses a material that makes use of UVs
  • if one of the objects is in a collection hidden from the viewport
  • if you are in lookdev/rendered (or go there later)
  • if you enter multi-object editing
  • then back to object mode --> crash

most minimal file I could come up with:
minimal.blend

**System Information** Operating system: Windows 10 Graphics card: Intel® HD Graphics 620 (Kaby Lake GT2) Processor: Intel® Core™ i3-7020U CPU @ 2.30GHz × 4 (64-bit) Memory: 8 GB **Blender Version** v 2.80 (Current Stable) v 2.81 (8f55794c0e80) **Short description of error** Every single time I try to triangulate the faces of all my meshes at once, returning to object mode crashes Blender if it's in "Material Preview" or "Rendered" Eevee shading. I can also do this in "Solid" shading and it won't crash after returning, but as soon as I switch shading to "Material Preview" shading, it crashes. I've reproduced this several times in the stable 2.80 so I tried my build of 2.81 from four days ago. Still crashes without failure to reproduce. **Exact steps for others to reproduce the error** [Undead Fields Remaster (BUG report for Blender Developers).blend](https://archive.blender.org/developer/F7743681/Undead_Fields_Remaster__BUG_report_for_Blender_Developers_.blend) - Open that file - Click the "View Object Types" button in 3D View and hide all but meshes. - Select all the objects with the `A` key and switch to edit mode. - Press `A` in edit mode to select all the geometry. - Press `Ctrl`+`T` to triangulate all the faces. - Enter object mode. If you're in "Rendered" or "Material Preview" shading, it will crash. # If you did steps 1-6 in "Solid" shading first and it didn't crash, try repeating it all while in "Rendered" or "Material Preview" shading beforehand. **Note** If I can/cannot reproduce it in the build from today (13th as of writing) I'll edit this post with my findings. I'm fairly certain that this is just a bug that is so specific that it has not been found/reported yet. EDIT: Digging further this can be fixed by: - enable the Levels of Detail collection for the viewport - OR keep the Levels of Detail disabled in the viewport, but remove tree oak joined, tree pine joined, tree small joined from this collection - OR by making tree oak joined, tree pine joined, tree small joined so that they have single user meshes... minimal repro file based on the report file: [repro.blend](https://archive.blender.org/developer/F7747037/repro.blend) Analysing this it boils down to: - if two objects share a mesh - if this mesh uses a material that makes use of UVs - if one of the objects is in a collection hidden from the viewport - if you are in lookdev/rendered (or go there later) - if you enter multi-object editing - then back to object mode --> crash most minimal file I could come up with: [minimal.blend](https://archive.blender.org/developer/F7747036/minimal.blend)
Author

Added subscriber: @CadenMitchell-3

Added subscriber: @CadenMitchell-3

#72979 was marked as duplicate of this issue

#72979 was marked as duplicate of this issue
Member

Added subscribers: @fclem, @mont29, @lichtwerk

Added subscribers: @fclem, @mont29, @lichtwerk
Member

Can confirm.
This also happens for at least tris to quads so it is not bound to triangulate op alone...

CustomDataLayer severely screwed up in this case

1   CustomData_update_typemap               customdata.c           1833 0x2db6138 
2   customdata_typemap_is_valid             customdata.c           1846 0x2db62ad 
3   CustomData_get_render_layer             customdata.c           2145 0x2db7092 
4   mesh_cd_calc_used_gpu_layers            draw_cache_impl_mesh.c 176  0x3908c38 
5   DRW_mesh_batch_cache_get_surface_shaded draw_cache_impl_mesh.c 737  0x390b042 
6   DRW_cache_mesh_surface_shaded_get       draw_cache.c           3299 0x38fc7a3 
7   DRW_cache_object_surface_material_get   draw_cache.c           866  0x38f5264 
8   EEVEE_materials_cache_populate          eevee_materials.c      1511 0x38c3b07 
9   EEVEE_cache_populate                    eevee_engine.c         123  0x38b3b82 
10  drw_engines_cache_populate              draw_manager.c         1125 0x388340c 
11  DRW_draw_render_loop_ex                 draw_manager.c         1643 0x38848a0 
12  DRW_draw_view                           draw_manager.c         1545 0x38843f3 
13  view3d_draw_view                        view3d_draw.c          1533 0x3daeb97 
14  view3d_main_region_draw                 view3d_draw.c          1557 0x3daec3c 
15  ED_region_do_draw                       area.c                 534  0x3e76d5e 
16  wm_draw_window_offscreen                wm_draw.c              629  0x3361b73 
17  wm_draw_window                          wm_draw.c              765  0x33620f2 
18  wm_draw_update                          wm_draw.c              947  0x33626ca 
19  WM_main                                 wm.c                   423  0x335e655 
20  main                                    creator.c              491  0x2d08d26  

Digging further this can be fixed by:

  • enable the Levels of Detail collection for the viewport
  • OR keep the Levels of Detail disabled in the viewport, but remove tree oak joined, tree pine joined, tree small joined from this collection
  • OR by making tree oak joined, tree pine joined, tree small joined so that they have single user meshes...
  • @CadenMitchell-3 : it always helps reducing the file complexity before sending it here... [you could remove collections one by one, remove materials, remove non-mesh stuff and keep doing this until the crash is not happening anymore, which is already really useful to track down the bug, because.... all of this takes time...]

minimal repro file based on the report file:
repro.blend

Analysing this it boils down to:

  • if two objects share a mesh
  • if this mesh uses a material that makes use of UVs
  • if one of the objects is in a collection hidden from the viewport
  • if you are in lookdev/rendered
  • if you enter multi-object editing and do any modeling operation (could be sudvide as well e.g)
  • then back to object mode --> crash

most minimal file I could come up with:
minimal.blend

CC @fclem
CC @mont29

Can confirm. This also happens for at least `tris to quads` so it is not bound to `triangulate` op alone... CustomDataLayer severely screwed up in this case ``` 1 CustomData_update_typemap customdata.c 1833 0x2db6138 2 customdata_typemap_is_valid customdata.c 1846 0x2db62ad 3 CustomData_get_render_layer customdata.c 2145 0x2db7092 4 mesh_cd_calc_used_gpu_layers draw_cache_impl_mesh.c 176 0x3908c38 5 DRW_mesh_batch_cache_get_surface_shaded draw_cache_impl_mesh.c 737 0x390b042 6 DRW_cache_mesh_surface_shaded_get draw_cache.c 3299 0x38fc7a3 7 DRW_cache_object_surface_material_get draw_cache.c 866 0x38f5264 8 EEVEE_materials_cache_populate eevee_materials.c 1511 0x38c3b07 9 EEVEE_cache_populate eevee_engine.c 123 0x38b3b82 10 drw_engines_cache_populate draw_manager.c 1125 0x388340c 11 DRW_draw_render_loop_ex draw_manager.c 1643 0x38848a0 12 DRW_draw_view draw_manager.c 1545 0x38843f3 13 view3d_draw_view view3d_draw.c 1533 0x3daeb97 14 view3d_main_region_draw view3d_draw.c 1557 0x3daec3c 15 ED_region_do_draw area.c 534 0x3e76d5e 16 wm_draw_window_offscreen wm_draw.c 629 0x3361b73 17 wm_draw_window wm_draw.c 765 0x33620f2 18 wm_draw_update wm_draw.c 947 0x33626ca 19 WM_main wm.c 423 0x335e655 20 main creator.c 491 0x2d08d26 ``` Digging further this can be fixed by: - enable the Levels of Detail collection for the viewport - OR keep the Levels of Detail disabled in the viewport, but remove `tree oak joined`, `tree pine joined`, `tree small joined` from this collection - OR by making `tree oak joined`, `tree pine joined`, `tree small joined` so that they have single user meshes... - @CadenMitchell-3 : it always helps reducing the file complexity before sending it here... [you could remove collections one by one, remove materials, remove non-mesh stuff and keep doing this until the crash is not happening anymore, which is already really useful to track down the bug, because.... all of this takes time...] minimal repro file based on the report file: [repro.blend](https://archive.blender.org/developer/F7747037/repro.blend) Analysing this it boils down to: - if two objects share a mesh - if this mesh uses a material that makes use of UVs - if one of the objects is in a collection hidden from the viewport - if you are in lookdev/rendered - if you enter multi-object editing and do any modeling operation (could be sudvide as well e.g) - then back to object mode --> crash most minimal file I could come up with: [minimal.blend](https://archive.blender.org/developer/F7747036/minimal.blend) CC @fclem CC @mont29
Member

Note crash will also happen if you do all this in solid mode and go to lookdev/rendered afterwards...

Note crash will also happen if you do all this in solid mode and go to lookdev/rendered afterwards...
Philipp Oeser changed title from Multi-object edit triangulation of multiple meshes crashes Blender to Multi-object edit containing a (multiuser) mesh that is also used by an object in a hidden collection destroyes CustomData layer 2019-09-14 13:09:09 +02:00
Philipp Oeser changed title from Multi-object edit containing a (multiuser) mesh that is also used by an object in a hidden collection destroyes CustomData layer to Multi-object edit containing a (multiuser) mesh that is also used by an object in a hidden collection destroys CustomData layer 2019-09-14 13:11:39 +02:00
Member

Added subscriber: @VermossomreV

Added subscriber: @VermossomreV
Member

In #72979 (Crash after going out of multi object edit mode) turns out you dont even have to do any modeling operation in editmode, just objectmode > editmode > objectmode is enough here...

In #72979 (Crash after going out of multi object edit mode) turns out you dont even have to do any modeling operation in editmode, just objectmode > editmode > objectmode is enough here...
Philipp Oeser changed title from Multi-object edit containing a (multiuser) mesh that is also used by an object in a hidden collection destroys CustomData layer to Crash: Multi-object edit containing a (multiuser) mesh that is also used by an object in a hidden collection destroys CustomData layer 2020-01-09 11:13:00 +01:00
Clément Foucault self-assigned this 2020-01-15 20:45:50 +01:00

Added subscriber: @Sergey

Added subscriber: @Sergey

I'm pretty sure this is a depsgraph issue:

Tagging is missing when you leave edit mode under the circumstances outlined in the report.

graph_id_tag_update: id=OBIcosphere flags=TRANSFORM, GEOMETRY source=USER_EDIT
graph_id_tag_update: id=OBIcosphere flags=TRANSFORM, GEOMETRY source=USER_EDIT
graph_id_tag_update: id=MEIcosphere flags=LEGACY_0 source=USER_EDIT
graph_id_tag_update: id=OBCube.001 flags=TRANSFORM, GEOMETRY source=USER_EDIT
graph_id_tag_update: id=OBCube.001 flags=TRANSFORM, GEOMETRY source=USER_EDIT

As you can see only the Ico sphere mesh datablock gets tagged. This is not the case if you only select the cube.

graph_id_tag_update: id=OBCube flags=GEOMETRY source=USER_EDIT
graph_id_tag_update: id=OBCube flags=GEOMETRY source=USER_EDIT
graph_id_tag_update: id=MECube flags=LEGACY_0 source=USER_EDIT

@Sergey any idea where I should look?

I'm pretty sure this is a depsgraph issue: Tagging is missing when you leave edit mode under the circumstances outlined in the report. ``` graph_id_tag_update: id=OBIcosphere flags=TRANSFORM, GEOMETRY source=USER_EDIT graph_id_tag_update: id=OBIcosphere flags=TRANSFORM, GEOMETRY source=USER_EDIT graph_id_tag_update: id=MEIcosphere flags=LEGACY_0 source=USER_EDIT graph_id_tag_update: id=OBCube.001 flags=TRANSFORM, GEOMETRY source=USER_EDIT graph_id_tag_update: id=OBCube.001 flags=TRANSFORM, GEOMETRY source=USER_EDIT ``` As you can see only the Ico sphere mesh datablock gets tagged. This is not the case if you only select the cube. ``` graph_id_tag_update: id=OBCube flags=GEOMETRY source=USER_EDIT graph_id_tag_update: id=OBCube flags=GEOMETRY source=USER_EDIT graph_id_tag_update: id=MECube flags=LEGACY_0 source=USER_EDIT ``` @Sergey any idea where I should look?

This issue was referenced by 0a95a0852e

This issue was referenced by 0a95a0852eb190613f93639a503416158c8cfc4a

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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#69834
No description provided.