Operating system: Linux-4.15.0-112-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21
Broken: version: 2.83.5, branch: master, commit date: 2020-08-19 06:07, hash: rBc2b144df395f, 2.90 is also affected
Short description of error
I have an operator that appends an object from another file. Calling it and undoing right after, works as expected unless that same operator is called from an update function of an enum, storing preview collection items, as is done for template icon views. Blender will crash on 2.83.5 and 2.90.
Exact steps for others to reproduce the error
- Extract the above zip file and open append_obj_undo_crash_from_template_icon_view.blend
- Run the script
- In the 3d view sidebar, a new panel 'Append Object' appears under the Tool tab
- In the Append Object panel, click on the thumbnail, and again on the blender icon inside
- the append object op was called and a cube was appended to the scene
- Blender should crash!!!
- Start Blender again and run the script again
- This time, run the append op using the button below the thumbnail, then undo again
- Blender should not crash this time