Short description of error
I'm running a mesh export operator that uses the Object.to_mesh(preserve_all_data_layers=True, depsgraph=depsgraph) function with parameters so vertex groups carry over to the new mesh. And I always end with Object.to_mesh_clear().
But if I run the operator on an object with no modifiers or shapekeys, it crashes.
I've tried to chase down the exact point it crashes through a debugger, but it's random, it crashes at different lines of code which don't relate to the cause. No matter what though, it crashes before the operator finishes.
If I add a modifier or shape key to the object in question, it does not crash.
Or if I use Object.to_mesh() without parameters, no crash.
Or if I run a snippet of my operator's problmatic code in the script area, no crash.
I'm sorry I can't provide an example right now, I've tried to recreate it in a simple blend script but I can only trigger the crash in an addon that I'm working on.
Hopefully someone could look into the recently made changes and spot the bug that's causing Blender to become unstable after calling this function on simple objects.
Running Blender in debug mode prevents crashing, but I get the following error in the console during each operation:
Memoryblock CDMVert: double free Memoryblock free: pointer not in memlist
I tried the latest release with the material bug fix (T65238), still no luck.
I also tried running blender_debug_log.cmd, when it crashes I get the following error:
Error : EXCEPTION_ACCESS_VIOLATION Address : 0x00007FF68B0302D8 Module : C:\Dev\Blender\blender-2.80.0\blender.exe