Page MenuHome

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

Description

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

  1. Open that file
  2. Click the "View Object Types" button in 3D View and hide all but meshes.
  3. Select all the objects with the A key and switch to edit mode.
  4. Press A in edit mode to select all the geometry.
  5. Press Ctrl+T to triangulate all the faces.
  6. Enter object mode. If you're in "Rendered" or "Material Preview" shading, it will crash.
  7. 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:

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:

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.Sep 14 2019, 12:57 PM

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...
  • @Caden Mitchell (CadenMitchell) : 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:

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:

CC @Clément Foucault (fclem)
CC @Bastien Montagne (mont29)

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

Philipp Oeser (lichtwerk) renamed this task 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.Sep 14 2019, 1:09 PM
Philipp Oeser (lichtwerk) renamed this task 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.Sep 14 2019, 1:11 PM

In T72979: 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 (lichtwerk) renamed this task 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.Thu, Jan 9, 11:13 AM
Philipp Oeser (lichtwerk) triaged this task as High priority.
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".