Page MenuHome

Crash with Assign Shortcut (if operator_context = EXEC_DEFAULT)
Confirmed, NormalPublic

Description

System Information
Operating system: Darwin-19.4.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 455 OpenGL Engine ATI Technologies Inc. 4.1 ATI-3.8.24

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-18 19:05, hash: rBb89898cbd381
Broken: 2.81a, 2.82a, 2.83.0

Short description of error
Crash when assign "A" shortcut (not other keys) using the "Assign Shortcut" on some menu items.

Exact steps for others to reproduce the error

  • Object Mode > Object Menu > "Delete" or "Delete Global"
  • right click > "Assign Shortcut"
  • press "A" key (not others)
  • again, right click > "Assign Shortcut"
  • crash

You may notice that these menus do not display the shortcut. T60887

It has something to do with the layout.operator_context = 'EXEC_DEFAULT'.

Other menu items in the EXEC_DEFAULT will also be crash with this steps
and not display the assigned shortcut.

Event Timeline

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Mon, Jun 29, 8:01 PM

Exception thrown: read access violation. kmi was nullptr.

>	blender.exe!WM_keymap_item_map_type_get(const wmKeyMapItem * kmi) Line 205	C
 	blender.exe!rna_wmKeyMapItem_map_type_get(PointerRNA * ptr) Line 876	C
 	blender.exe!rna_KeyMapItem_type_itemf(bContext * UNUSED_C, PointerRNA * ptr, PropertyRNA * UNUSED_prop, bool * UNUSED_r_free) Line 938	C
 	blender.exe!RNA_property_enum_items_ex(bContext * C, PointerRNA * ptr, PropertyRNA * prop, const bool use_static, const EnumPropertyItem * * r_item, int * r_totitem, bool * r_free) Line 1612	C
 	blender.exe!RNA_property_enum_items(bContext * C, PointerRNA * ptr, PropertyRNA * prop, const EnumPropertyItem * * r_item, int * r_totitem, bool * r_free) Line 1644	C
 	blender.exe!RNA_property_enum_items_gettexted(bContext * C, PointerRNA * ptr, PropertyRNA * prop, const EnumPropertyItem * * r_item, int * r_totitem, bool * r_free) Line 1713	C
 	blender.exe!ui_item_rna_size(uiLayout * layout, const unsigned char * name, int icon, PointerRNA * ptr, PropertyRNA * prop, int index, bool icon_only, bool compact, int * r_w, int * r_h) Line 1815	C
 	blender.exe!uiItemFullR(uiLayout * layout, PointerRNA * ptr, PropertyRNA * prop, int index, int value, int flag, const unsigned char * name, int icon) Line 2106	C
 	blender.exe!uiItemR(uiLayout * layout, PointerRNA * ptr, const unsigned char * propname, int flag, const unsigned char * name, int icon) Line 2394	C
 	blender.exe!menu_add_shortcut(bContext * C, ARegion * region, void * arg) Line 269	C
 	blender.exe!ui_popup_block_refresh(bContext * C, uiPopupBlockHandle * handle, ARegion * butregion, uiBut * but) Line 595	C
 	blender.exe!ui_popup_block_create(bContext * C, ARegion * butregion, uiBut * but, uiBlock *(*)(bContext *, ARegion *, void *) create_func, uiBlock *(*)(bContext *, uiPopupBlockHandle *, void *) handle_create_func, void * arg, void(*)(void *) arg_free) Line 832	C
 	blender.exe!UI_popup_block_ex(bContext * C, uiBlock *(*)(bContext *, ARegion *, void *) func, void(*)(bContext *, void *, int) popup_func, void(*)(bContext *, void *) cancel_func, void * arg, wmOperator * op) Line 630	C
 	blender.exe!popup_add_shortcut_func(bContext * C, void * arg1, void * UNUSED_arg2) Line 336	C
 	blender.exe!ui_apply_but_funcs_after(bContext * C) Line 921	C
 	blender.exe!ui_popup_handler(bContext * C, const wmEvent * event, void * userdata) Line 10898	C
 	blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 622	C
 	blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2743	C
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2854	C
 	blender.exe!wm_event_do_handlers(bContext * C) Line 3283	C
 	blender.exe!WM_main(bContext * C) Line 478	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 534	C
 	[External Code]