This line of code worked fine until I dropped it into a function. Now when it executes, blender shuts down without throwing an error:
bpy.ops.render.render(use_viewport = True, write_still=True)
The error likely has nothing to do with the code, but maybe has tapped into an internal corruption within Blender?
Has anyone ever encountered this before? Possible solutions?