Page MenuHome

Crash adding a shape in a new collection while still being in edit mode in hidden collection
Closed, DuplicatePublic

Description

System Information
Operating system: Windows 10 N, 10.0.17763 Build 17763
Graphics card: Geforce GTX1060 OC

Blender Version
Broken: blender-2.80.0-git.546e20f5a2c0-windows64
Worked: (optional)

Short description of error
If you are in edit mode and you disable current collection (with eye icon) and then (while still being in edit mode activated in old collection) you try to add a new shape (shift + a) and change its properties (like iterations, position) with bottom left window blender will crash.

Exact steps for others to reproduce the error

  1. Enter edit mode (tab) - enters cube edit mode
  2. Hide active collection (with eye icon)
  3. Create new collection (without exiting edit mode)
  4. Select created collection
  5. Add new shape (shift + a) eg. Ico Sphere
  6. In window called Add Ico Sphere change any property

Details

Type
Bug

Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Confirmed, Medium priority.

Confirmed, checking...

  • in mesh_undosys_step_decode, MeshUndoStep->elems[0].obedit_ref.ptr is invalid in this case, leading to crash later (CLOG_WARN without valid object name)...
  • in the corresponding mesh_undosys_step_encode, BKE_view_layer_array_from_objects_in_edit_mode_unique_data will return no objects

Since the whole thing seems to work fine and it is just crashing with CLOG_WARN the invalid object name, maybe we should just check for a valid object and warn something else instead?
(not doing the warning actually seems to work fine...)

1   __strlen_avx2                                                 0x7ffff0bd1a67 
2   vfprintf                                                      0x7ffff0ac3327 
3   vsnprintf                                                     0x7ffff0aeabc4 
4   clg_str_vappendf                   clog.c               189   0x1db0024      
5   CLG_logf                           clog.c               501   0x1db0aa6      
6   ED_undo_object_set_active_or_warn  ed_undo.c            670   0x2b09140      
7   mesh_undosys_step_decode           editmesh_undo.c      772   0x2b7cde9      
8   undosys_step_decode                undo_system.c        204   0x2b1cab6      
9   BKE_undosys_step_undo_with_data_ex undo_system.c        679   0x2b1e428      
10  BKE_undosys_step_undo_with_data    undo_system.c        701   0x2b1e596      
11  ed_undo_step                       ed_undo.c            170   0x2b07f0b      
12  ED_undo_pop_op                     ed_undo.c            272   0x2b08316      
13  ED_undo_operator_repeat            ed_undo.c            492   0x2b089bc      
14  ED_undo_operator_repeat_cb_evt     ed_undo.c            547   0x2b08bd1      
15  ui_apply_but_funcs_after           interface_handlers.c 816   0x2598999

Since this is undo-related: @Campbell Barton (campbellbarton) is this for you?

Philipp Oeser (lichtwerk) renamed this task from 2.8 Adding a shape in a new collection while still being in edit mode in hidden collection to Crash adding a shape in a new collection while still being in edit mode in hidden collection.Apr 30 2019, 12:30 PM