@ferdinand Thanks for your reply.
This cannot provide a 100% triggered scene file, but the probability of triggering is very high (the file I am currently working on is a file with 2 character bindings and some scene assets, which often trigger. I am trying to use a simple scene with only a few objects, which is difficult to reproduce). Here are three methods I use:
1: Manually use make preview/or render to picture view (in rendering settings, the renderer uses viewport renderer)
2: Using c4d. CallCommand (1000974) # Make Preview in Python Alternatively, c4d. CallCommand (12099) # Render to Picture Viewer (using viewport renderer in rendering settings)
3: Use c4d. documents. RenderDocument() directly in Python for rendering (in the rendering settings, the renderer uses the viewport renderer) ,code example()
def PythonCallBack(progress, progress_type):
if progress == 1.0:
c4d.StatusClear()
else:
progress = round(progress * 100.0,1)
c4d.StatusSetText("render:" + str(progress) + "%")
c4d.StatusSetBar(progress)
def renderexample(rdPreview):
image_render = c4d.bitmaps.BaseBitmap()
image_render.Init(int(rdPreview[c4d.RDATA_XRES]), int(rdPreview[c4d.RDATA_YRES]))
result = c4d.documents.RenderDocument(doc, rdPreview.GetData(), image_render, c4d.RENDERFLAGS_EXTERNAL,prog=PythonCallBack)
if result != c4d.RENDERRESULT_OK:
c4d.StatusClear()
The 1 and 2 methods will crash directly and there will be no prompt to save the file due to crash. However, when I use the 3 method, there will be a crash prompt, which can at least save the file.

My graphics card drivers are always up to date.
At present, I am going to change to a higher graphics card to try to see if this can be avoided or find a solution here in the forum