Page MenuHome

Crash when changing lattice resolution with Vertex Group
Closed, ResolvedPublic

Description

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

Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-11-16 21:19, hash: rB09045ff64d1f, 2.91.0 (issue was introduced in rB042143440d7668d3e357805ffdd20b1a4d2e2975)
Worked: versions prior to the referenced commit

Short description of error
When a lattice object has used vertex groups (when the edges turn bright white),
if the object's Lattice Vertex Group is assign to a vertex group, and you try to change the resolution from edit mode, blender will crash.

Exact steps for others to reproduce the error
[Attached .blend file]:
Change the lattice's Resolution U/V/W, while still in edit mode

[Based on the default startup]:
Add a lattice object.
Add a Vertex group to it.
In the Lattice panel (with the resolution sliders), assign the vertex group.
Go into edit mode and click [Assign] in the Vertex Groups panel (you don't have to click any vertices).
Change any of the resolution sliders.

Event Timeline

Robert Guetzkow (rjg) changed the task status from Needs Triage to Confirmed.Nov 24 2020, 10:31 AM
Robert Guetzkow (rjg) triaged this task as High priority.

I can confirm the crash in Blender 2.92.0 and 2.91.0. It seems that 2.83.9 is not affected.

BLI_findstringindex(const ListBase * listbase, const unsigned char * id, const int offset) Line 838	C
BKE_object_defgroup_name_index(const Object * ob, const unsigned char * name) Line 496	C
BKE_lattice_deform_data_create(const Object * oblatt, const Object * ob) Line 120	C
lattice_deform_coords_impl(const Object * ob_lattice, const Object * ob_target, float[3] * vert_coords, const int vert_coords_len, const short flag, const unsigned char * defgrp_name, const float fac, const Mesh * me_target, BMEditMesh * em_target) Line 362	C
BKE_lattice_deform_coords(const Object * ob_lattice, const Object * ob_target, float[3] * vert_coords, const int vert_coords_len, const short flag, const unsigned char * defgrp_name, float fac) Line 433	C
BKE_lattice_resize(Lattice * lt, int uNew, int vNew, int wNew, Object * ltOb) Line 364	C
rna_Lattice_update_size(Main * bmain, Scene * scene, PointerRNA * ptr) Line 143	C
rna_property_update(bContext * C, Main * bmain, Scene * scene, PointerRNA * ptr, PropertyRNA * prop) Line 2250	C
RNA_property_update(bContext * C, PointerRNA * ptr, PropertyRNA * prop) Line 2310	C
ui_apply_but_funcs_after(bContext * C) Line 942	C
ui_handler_region_menu(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 10811	C
wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 639	C
wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2764	C
wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2872	C
wm_event_do_handlers(bContext * C) Line 3295	C
WM_main(bContext * C) Line 638	C
main(int argc, const unsigned char * * UNUSED_argv_c) Line 526	C

Is crashing in something I changed when optimizing the code. Will have a look.

Right, I've checked this and the crash was introduced by commit rB042143440d7668d3e357805ffdd20b1a4d2e2975.

@Dalai Felinto (dfelinto), the commit which Robert says introduced the issue is not in 2.90. So seems like a regression in 2.91.