Operating system: Windows 10
Graphics card: Intel
Short description of error
Blender crashes when undo is called if a lattice object is deleted in edit mode via an operator addon
Exact steps for others to reproduce the error
- install the addon in the attachment (copy it to addons or as zip)
- open the addon tab and search for "crasher"
- enable it
- open the violation.blend file that is in the addon folder (or from the zip file)
- it should open in lattice (active) edit mode, if not select the lattice and toggle to edit mode
- F3, search for simple operator
- execute it
- do not do anything else, just do undo (ctrl-z)
Blender will exit with
Error : EXCEPTION_ACCESS_VIOLATION Address : 0x00007FF65A3BDF97
It seems like it is possible to avoid the crash only if the user does some other stuff like selecting moving other objects after firing the addon however this does not help with the addon context, not possible to avoid this as far as I can tell.
I originally thought that using bpy.data.objects.remove(l) was causing this however using the ops equivalent bpy.ops.object.delete(use_global=False) does the same ill affect.