Intermittent crash EXCEPTION_ACCESS_VIOLATION on frame_change_post handler modifying object scales only during render/bake. #117386

Open
opened 2024-01-21 18:44:28 +01:00 by Melissa0x1f992 · 5 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: AMD Radeon RX 6900 XT ATI Technologies Inc. 4.6.0 Core Profile Context 23.10.24.230718

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-01-20 18:17, hash: af5731ce03a2
Worked: N/A. Bug found in 4.0.2, and persists to latest build.

Short description of error
Error found in a more complex scene while rendering after having played through the whole viewport in cycles and eevee many times already. A few dozen frames rendered successfully, before an intermittent crash. I tried baking a simulation to create a more stable scene, and the bake itself consistently crashed blender after a few dozen frames.

I've attached a simplified setup to isolate the cause of the crash. Note that the default cube has an untouched Geometry Nodes modifier. On my machine, this consistently only bakes a few hundred frames before crashing. Can even be less than 100 frames.

Exact steps for others to reproduce the error

  1. In the attached .blend file, run the crash_sometimes.py script to assign the frame_change_post handler.

  2. Select the Cube, and do Physics > Simulation Nodes > Calculate to Frame (the timeline cursor should already be at the last frame)

On my machine, this will crash Blender on a random frame while modifying a random Empty. I've never seen it make it to 500 frames.

Edit:
Error still reproduces even when using Lock Interface as suggested here https://docs.blender.org/api/master/bpy.app.handlers.html#note-on-altering-data

**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: AMD Radeon RX 6900 XT ATI Technologies Inc. 4.6.0 Core Profile Context 23.10.24.230718 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-01-20 18:17, hash: `af5731ce03a2` Worked: N/A. Bug found in 4.0.2, and persists to latest build. **Short description of error** Error found in a more complex scene while rendering after having played through the whole viewport in cycles and eevee many times already. A few dozen frames rendered successfully, before an intermittent crash. I tried baking a simulation to create a more stable scene, and the bake itself consistently crashed blender after a few dozen frames. I've attached a simplified setup to isolate the cause of the crash. Note that the default cube has an untouched Geometry Nodes modifier. On my machine, this consistently only bakes a few hundred frames before crashing. Can even be less than 100 frames. **Exact steps for others to reproduce the error** 1. In the attached .blend file, run the crash_sometimes.py script to assign the frame_change_post handler. 2. Select the Cube, and do Physics > Simulation Nodes > Calculate to Frame (the timeline cursor should already be at the last frame) On my machine, this will crash Blender on a random frame while modifying a random Empty. I've never seen it make it to 500 frames. Edit: Error still reproduces even when using Lock Interface as suggested here https://docs.blender.org/api/master/bpy.app.handlers.html#note-on-altering-data
Melissa0x1f992 added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2024-01-21 18:44:29 +01:00
Member

Hi, thanks for the report. Though this seems an expected behavior or a known issue, see: https://docs.blender.org/api/master/bpy.app.handlers.html#note-on-altering-data

Hi, thanks for the report. Though this seems an expected behavior or a known issue, see: https://docs.blender.org/api/master/bpy.app.handlers.html#note-on-altering-data
Pratik Borhade added
Module
Python API
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2024-01-22 05:12:19 +01:00
Author

That page suggests to Lock Interface before running such a script, but that option hasn't prevented the crash for me. Updating the issue with this detail.

That page suggests to Lock Interface before running such a script, but that option hasn't prevented the crash for me. Updating the issue with this detail.
Member

Lock interface is useful when rendering the scene, not in this case i.e. executing python script

`Lock interface` is useful when rendering the scene, not in this case i.e. executing python script

Hi, thanks for the report. Though this seems an expected behavior or a known issue, see: https://docs.blender.org/api/master/bpy.app.handlers.html#note-on-altering-data

So the linked note applies to this case?

Lock interface is useful when rendering the scene, not in this case i.e. executing python script

So the linked note doesn't apply to this case?

What am I missing here that your two posts seem contradictory to me? What should the OP do to avoid the crash?

> Hi, thanks for the report. Though this seems an expected behavior or a known issue, see: https://docs.blender.org/api/master/bpy.app.handlers.html#note-on-altering-data So the linked note applies to this case? > `Lock interface` is useful when rendering the scene, not in this case i.e. executing python script So the linked note doesn't apply to this case? What am I missing here that your two posts seem contradictory to me? What should the OP do to avoid the crash?
Member

Well the crash seems to happen as handlers and viewport updates are done on different threads (as said in the api manual)
@lichtwerk can you check as well?

Well the crash seems to happen as handlers and viewport updates are done on different threads (as said in the api manual) @lichtwerk can you check as well?
Sign in to join this conversation.
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
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#117386
No description provided.