Program lags after iterative script calls to bpy.ops.render when using Cycles renderer #112830

Open
opened 2023-09-25 05:43:13 +02:00 by John · 2 comments

System Information
Operating system: Windows 10
CPU: Intel(R) Core(TM) i9-7980XE CPU @ 2.60GHz
GPU: NVIDIA GeForce GTX 1080

Blender Version
Broken: 3.6.3
Worked: ???

The problem which I describe here is similar to the one reported in #109718. After using a script which iteratively calls bpy.ops.render, the stability of Blender decreases roughly proportionally to the number of iterations, and is especially noticeable after several hundred iterations. It ultimately manifests in the program running poorly, and in some cases, a crash after a manual render operation is called.

Exact steps for others to reproduce the error

  • Open the attached .blend file.
  • Run the "test" script.
  • Once the script has completed execution, (it may take several minutes) you should observe that the Blender program lags persistently. (Responds to new input slowly, etc.) Repeated executions will make it continually worse.
  • In some cases, you might also experience a crash if you hit F12 to render the scene.
**System Information** Operating system: Windows 10 CPU: Intel(R) Core(TM) i9-7980XE CPU @ 2.60GHz GPU: NVIDIA GeForce GTX 1080 **Blender Version** Broken: 3.6.3 Worked: ??? The problem which I describe here is similar to the one reported in #109718. After using a script which iteratively calls bpy.ops.render, the stability of Blender decreases roughly proportionally to the number of iterations, and is especially noticeable after several hundred iterations. It ultimately manifests in the program running poorly, and in some cases, a crash after a manual render operation is called. **Exact steps for others to reproduce the error** - Open the attached .blend file. - Run the "test" script. - Once the script has completed execution, (it may take several minutes) you should observe that the Blender program lags persistently. (Responds to new input slowly, etc.) Repeated executions will make it continually worse. - In some cases, you might also experience a crash if you hit F12 to render the scene.
John added the
Severity
Normal
Type
Report
Status
Needs Triage
labels 2023-09-25 05:43:14 +02:00

I notice that the viewport gets slower and slower every time I run the script.

Before, the animation could run at 66fps
Then it went to 30fps.
After running again it went to 14fps
And running again it went to 7fps

Seems to only happen with Cycles.
bpy.ops.render also seems to get slower with each call.

I can't identify what causes this problem. But it does indeed seem to be something that deserves to be investigated.
@brecht ^

System Information
    Operating system: Windows-10-10.0.22621-SP0 64 Bits

    Graphics card: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 528.79

I notice that the viewport gets slower and slower every time I run the script. Before, the animation could run at 66fps Then it went to 30fps. After running again it went to 14fps And running again it went to 7fps Seems to only happen with Cycles. `bpy.ops.render` also seems to get slower with each call. I can't identify what causes this problem. But it does indeed seem to be something that deserves to be investigated. @brecht ^ <details> <summary>System Information</summary> <ul> Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 528.79 </ul> </details>

So far I haven't been able to reproduce this on Linux + NVIDIA, in either Blender 3.6 or 4.0. Maybe it is Windows specific.

So far I haven't been able to reproduce this on Linux + NVIDIA, in either Blender 3.6 or 4.0. Maybe it is Windows specific.
Brecht Van Lommel added
Type
Bug
and removed
Type
Report
labels 2024-06-14 16:00:43 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#112830
No description provided.