I have a script running in Pyside2 in its own thread, its persistent window that never closes and remain in that thread during the blender live cycle.
When I try to run a render via
bpy.ops.render.render(write_still=1) there is 50% chance I get
Error : EXCEPTION_ACCESS_VIOLATION Address : 0x00007FF765FF38B0 Module : C:\Program Files\Blender Foundation\Blender 2.83\blender.exe
I’m guessing its due to some thread synchronization or something, as this
"Addon" does not align too properly to blender addon guide as I’m using PySide2.
In any case, does any1 have any idea why I’m getting these crashes when I try to render? How can I tell blender to render from other threads? As far as I can tell when the render “works” the Qt GUI becomes frozen, but blender GUI still remains “responsive” which tells me that I must be starting the render from Qt thread and not blender own thread & causing an error…
Any hints would be great
edit. my render script goes as follow:
for camera in cameraList: bpy.context.evaluated_depsgraph_get() bpy.context.scene.camera = bpy.data.objects[camera] bpy.data.scenes.render.filepath = self.mRootPath + "/" + str(camera) + "." + self.mFormat print("render", self.mRootPath + "/" + str(camera) + "." + self.mFormat) bpy.ops.render.render(write_still=1) print("pass render ")
error happens on