Page MenuHome

Title: CTRL-Z from edit into sculpt mode causes crash if mesh has shape-keys
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 980 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 452.06

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-08-31 03:47, hash: rB68797982025c
Worked: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash: rB77d23b0bd76f

Short description of error
Blender crashes when you CTRL-Z back to sculpt mode when the mesh has shape-keys. This bug happens in 2.83.0 and up, only in the Windows builds. Tested in Linux Mint 19.3 and had no crash there.

Exact steps for others to reproduce the error
Add basis shape-key on any mesh -> change to sculpt mode -> Change mode to edit -> Undo back -> This causes a crash when it undoes back to sculpt mode.

Event Timeline

I've also tested this on Windows 10 and Kubuntu 20.04. No crash in Kubuntu, crash in Windows 10 in LTS and in 2.91. Didn't test 2.90

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Wed, Sep 2, 10:34 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".
read access violation.
ret was 0x1C5E7B37FF8.
>	blender.exe!BLI_mempool_iterstep(BLI_mempool_iter * iter) Line 681	C
 	blender.exe!key_block_get_data(Key * key, KeyBlock * actkb, KeyBlock * kb, unsigned char * * freedata) Line 582	C
 	blender.exe!cp_key(const int start, int end, const int tot, unsigned char * poin, Key * key, KeyBlock * actkb, KeyBlock * kb, float * weights, const int mode) Line 670	C
 	blender.exe!key_evaluate_relative(const int start, int end, const int tot, unsigned char * basispoin, Key * key, KeyBlock * actkb, float * * per_keyblock_weights, const int mode) Line 847	C
 	blender.exe!do_mesh_key(Object * ob, Key * key, unsigned char * out, const int tot) Line 1341	C
 	blender.exe!BKE_key_evaluate_object_ex(Object * ob, int * r_totelem, float * arr, unsigned __int64 arr_size) Line 1533	C
 	blender.exe!deformVerts(ModifierData * UNUSED_md, const ModifierEvalContext * ctx, Mesh * UNUSED_mesh, float[3] * vertexCos, int numVerts) Line 49	C
 	blender.exe!mesh_calc_modifiers(Depsgraph * depsgraph, Scene * scene, Object * ob, int useDeform, const bool need_mapping, const CustomData_MeshMasks * dataMask, const int index, const bool use_cache, const bool allow_shared_mesh, Mesh * * r_deform, Mesh * * r_final) Line 991	C
 	blender.exe!mesh_build_data(Depsgraph * depsgraph, Scene * scene, Object * ob, const CustomData_MeshMasks * dataMask, const bool need_mapping) Line 1802	C
 	blender.exe!mesh_get_eval_final(Depsgraph * depsgraph, Scene * scene, Object * ob, const CustomData_MeshMasks * dataMask) Line 1953	C
 	blender.exe!BKE_sculpt_update_object_for_edit(Depsgraph * depsgraph, Object * ob_orig, bool need_pmap, bool need_mask, bool need_colors) Line 1722	C
 	blender.exe!sculpt_init_session(Depsgraph * depsgraph, Scene * scene, Object * ob) Line 8052	C
 	blender.exe!ED_object_sculptmode_enter_ex(Main * bmain, Depsgraph * depsgraph, Scene * scene, Object * ob, const bool force_dyntopo, ReportList * reports) Line 8110	C
 	blender.exe!sculpt_undosys_step_decode(bContext * C, Main * bmain, UndoStep * us_p, int dir, bool UNUSED_is_final) Line 1502	C
 	blender.exe!undosys_step_decode(bContext * C, Main * bmain, UndoStack * ustack, UndoStep * us, int dir, bool is_final) Line 214	C
 	blender.exe!BKE_undosys_step_undo_with_data_ex(UndoStack * ustack, bContext * C, UndoStep * us, bool use_skip) Line 712	C
 	blender.exe!ed_undo_step_impl(bContext * C, int step, const unsigned char * undoname, int undo_index, ReportList * reports) Line 208	C
 	blender.exe!ed_undo_step_direction(bContext * C, int step, ReportList * reports) Line 272	C
 	blender.exe!ed_undo_exec(bContext * C, wmOperator * op) Line 407	C
 	blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1312	C
 	blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2131	C
 	blender.exe!wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2441	C
 	blender.exe!wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2738	C
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2868	C
 	blender.exe!wm_event_do_handlers(bContext * C) Line 3401	C
 	blender.exe!WM_main(bContext * C) Line 485	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 531	C
 	[External Code]