Render crash when using Python API to modify object Attribute data in frame_change_pre handler #88811
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
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, Assets & 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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#88811
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 10 Home
Graphics card: GTX 1070 8GB
Blender Version
Broken: Blender 2.93.0
84da05a8b8
(2021-06-02 11:21)Worked: n/a
Short description of error
This issue was discovered during development of an addon that generates procedural meshes in a
frame_change_pre
handler. When adding attributes to these meshes in theframe_change_pre
handler, Blender can crash during render on random frames.The
Render → Lock Interface
option is enabled as per the note in the handlers documentation .I have created a simplified script that reproduces this crash during render, typically within a minute of starting the render. This script randomly generates triangles and attribute values in a frame change handler:
Increasing the number of triangles and/or number of attribute layers seems to increase the frequency of crashes. The crashes do not seem to occur when rendering from the command line.
This is the error reported after the crash:
Attached is the crash log: attribute_crash_example.crash.txt
Exact steps for others to reproduce the error
Attached is a .blend file including the script that reproduces this issue.
attribute_crash_example.blend
Seems easier to reproduce on a debug build since it hits an assert (although i'm not sure who is at fault there, could be the script, could be blender, @HooglyBoogly will likely know since he worked in this area recently)
Added subscriber: @rlguy
Added subscriber: @you.le
Another user on openVFX reported similar issue. I attach a test file with the code above:
untitled.blend
Steps to crash:
on windows, visual studio 2019 debug build, 8700k, rtx 3070,
I have this backtrace:
Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Needs User Info'
How many frames do I have to render to render to reproduce the problem?
I tested 20 frames but I cannot reproduce this with either the latest stable or current development versions of Blender.
Also this problem is similar to #72602 (2.8: Python API: Changing area type on frame change crashes Blender). Maybe it's related.
Please try the latest daily build: https://builder.blender.org/download/
Go to File → Defaults → Load Factory Settings and then load your file to see if you still can reproduce this issue.
If the problem persists, please give us more clear instructions on how to reproduce it from scratch.
Yes, sorry I forgot to mention the number of frames. Actually it is variable but it always happen on my computer.
I tested with last daily build 3.0 alpha release build and it was crashing at 55 frames rendered.
With last Blender sources 3.0 alpha in debug build, I did a gif:
(I've not the same stacktrace than previously)
If you or another developer are not abled to reproduce the crash but want to investigate, you can ping me either on discord openVFX (my pseudo is Don'tKnow) or upbge discord (pseudo: youle) (I'm very often connected even if not visibled) and I can leave you control over my computer via Team Viewer.
Hi, I just a chance to test the latest daily build of Blender 3.0 Alpha (
4c26bb0232
, August 09, 02:08:33) using factory settings and the issue still persists on my end. In my testing, it seems the crashes occur typically within the first 200 frames. Out of 10 render attempts, these are the number of frames that it took to result in a crash:Let me know if you need any more info.
Changed status from 'Needs User Info' to: 'Needs Triage'
Added subscriber: @sherlock3747
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.89
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2022-01-05 22:15, hash:
1d9bac7d92
Just testing this again in Blender 3.1 using the attribute_crash_example.blend file.
The render was run 1618 times. 1615 attempts resulted in a crash while 3 attempts successfully rendered all 1000 frames. Here is a histogram of the crash frequency on my system:
Over 50% of the attemps crashed before frame 100, or less than 50 seconds on my system.
Mean: 125
Standard deviation: 132
Min: 1
Max: 853
Added subscriber: @Adam-Burke
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @HooglyBoogly
It (some considerably heavier data) seems to be crashing in alike manner at random times during animation export to USD and Alembic too. At some point export becomes virtually impossible.