Page MenuHome

Crash when adjusting torus when edit mode is enabled for new objects
Closed, ResolvedPublic

Description

System Information
Operating system: Windows 10
Graphics card: NVIDIA GeForce940 MX

Blender Version
Broken: 2.80, 80ffa73b3f87, blender2.8, 2019-01-10
Worked: Yes

Short description of error
adjusting a torus in edit mode when edit mode for new objects is enabled causes an immediate crash

Exact steps for others to reproduce the error
if the option "enter edit mode for new objects" from the editing tab of the user preferences is enabled, go to your 3D veiw port add a torus, in the object context menu popup tweak any setting and it will result in an immediate crash.

Event Timeline

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

Confirmed, checking...

Crashes in undo:

1  mesh_undosys_step_decode           editmesh_undo.c      738  0x2068422 
2  undosys_step_decode                undo_system.c        176  0x2c2f108 
3  BKE_undosys_step_undo_with_data_ex undo_system.c        616  0x2c30988 
4  BKE_undosys_step_undo_with_data    undo_system.c        632  0x2c30abc 
5  ed_undo_step                       ed_undo.c            173  0x1cb549e 
6  ED_undo_pop_op                     ed_undo.c            266  0x1cb5887 
7  ED_undo_operator_repeat            ed_undo.c            435  0x1cb5deb 
8  ED_undo_operator_repeat_cb_evt     ed_undo.c            490  0x1cb6000 
9  ui_apply_but_funcs_after           interface_handlers.c 790  0x1f8cfdb 
10 ui_handler_region_menu             interface_handlers.c 9805 0x1fa4dd0 
11 wm_handler_ui_call                 wm_event_system.c    573  0x1c75423 
12 wm_handlers_do_intern              wm_event_system.c    2374 0x1c79c4a 
13 wm_handlers_do                     wm_event_system.c    2607 0x1c7a563 
14 wm_event_do_handlers               wm_event_system.c    2997 0x1c7b83c 
15 WM_main                            wm.c                 427  0x1c70ca9 
16 main                               creator.c            521  0x1c6b995

Seems like the "first-create-empty-mesh-and-enter-editmode-workaround" of rB4b859e91cb83 is not needed anymore because Undo was changed quite a lot?
[at least removing the workaround seems to work fine -- without the duplicated meshes mentioned in T25629]

However: doing so seems to leak memory instead:
Error: Not freed memory blocks: 2341, total unfreed memory 111.437531 MB

Not familiar enough with Undo, maybe @Campbell Barton (campbellbarton) could take over?