Mutating scene objects in frame_change_post causes stochastic render-animation segfault with interface locked #127546

Open
opened 2024-09-13 06:34:50 +02:00 by Andy-Abate · 3 comments

System Information
Operating system: Linux-6.8.0-40-generic-x86_64-with-glibc2.35 64 Bits, X11 UI
Graphics card: Mesa Intel(R) Graphics (ADL GT2) Intel 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2

Blender Version
Broken: version: 4.2.1 LTS, branch: blender-v4.2-release, commit date: 2024-08-19 11:21, hash: 396f546c9d82
Also broken on the latest 4.2.2 build

Short description of error
Seemingly due to a combination of factors, Blender sees stochastic segfaults when changing the position of scene objects within a frame_change_post callback, even when the interface is locked. I'm aware the docs say to lock the interface, and I have that setting toggled in the scene and I also enable it in the callback.

Exact steps for others to reproduce the error
Run Blender from a terminal to capture output. Open the attached .blend file, run the script, and render the animation. You may need to attempt the render multiple times, but I was able to tune this file such that I get a crash on the first or second attempt (with other configurations of number of boxes and number of iterations, it may take a handful of attempts or even appear to work except for once in 20~30 attempts).

The terminal should show the crash after a randomly-numbered frame (46 for this particular crash):

Append frame 45
Time: 00:00.05 (Saving: 00:00.02)

Append frame 46
Time: 00:00.05 (Saving: 00:00.02)

Writing: /tmp/frame_change_post_dg.crash.txt
Segmentation fault (core dumped)

I only saw it once, but there was one occurrence of "nullptr dealloc" or "nullptr dereference" (I forget which) in the terminal output.

**System Information** Operating system: Linux-6.8.0-40-generic-x86_64-with-glibc2.35 64 Bits, X11 UI Graphics card: Mesa Intel(R) Graphics (ADL GT2) Intel 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2 **Blender Version** Broken: version: 4.2.1 LTS, branch: blender-v4.2-release, commit date: 2024-08-19 11:21, hash: `396f546c9d82` Also broken on the latest 4.2.2 build **Short description of error** Seemingly due to a combination of factors, Blender sees stochastic segfaults when changing the position of scene objects within a `frame_change_post` callback, _even when the interface is locked_. I'm aware the docs say to lock the interface, and I have that setting toggled in the scene and I also enable it in the callback. **Exact steps for others to reproduce the error** Run Blender from a terminal to capture output. Open the attached .blend file, run the script, and render the animation. You may need to attempt the render multiple times, but I was able to tune this file such that I get a crash on the first or second attempt (with other configurations of number of boxes and number of iterations, it may take a handful of attempts or even appear to work except for once in 20~30 attempts). The terminal should show the crash after a randomly-numbered frame (46 for this particular crash): ``` Append frame 45 Time: 00:00.05 (Saving: 00:00.02) Append frame 46 Time: 00:00.05 (Saving: 00:00.02) Writing: /tmp/frame_change_post_dg.crash.txt Segmentation fault (core dumped) ``` I only saw it once, but there was one occurrence of "nullptr dealloc" or "nullptr dereference" (I forget which) in the terminal output.
Andy-Abate added the
Severity
Normal
Status
Needs Triage
Type
Bug
labels 2024-09-13 06:34:51 +02:00
Iliya Katushenock added the
Interest
Python API
Interest
Render Pipeline
labels 2024-09-13 19:26:09 +02:00
Andy-Abate changed title from Mutating scene objects in `frame_change_post` causes stochastic render-animation segfault when stereoscopy is enabled to Mutating scene objects in `frame_change_post` causes stochastic render-animation segfault with interface locked 2024-09-13 20:06:08 +02:00
Member

Can confirm the crash (with a few tries) , but it doesn't seem to crash when -t 1 is set (using 1 thread).

In debug it gave such assert error:

BLI_assert failed: source/blender/windowmanager/message_bus/intern/wm_message_bus.cc:138, WM_msgbus_handle(), at 'mbus->messages_tag_count == 0'
Can confirm the crash (with a few tries) ~~, but it doesn't seem to crash when `-t 1` is set (using 1 thread).~~ In debug it gave such assert error: ``` BLI_assert failed: source/blender/windowmanager/message_bus/intern/wm_message_bus.cc:138, WM_msgbus_handle(), at 'mbus->messages_tag_count == 0' ```
Member

@ideasman42 ^^ any idea why the msgbus handler assert would trigger in such situation

Stereoscopy doesn't seem to affect this it seems. I can turn that off and render animation a few times and still trigger the crash.

Also, -t 1 doesn't affect anything either, it will still crash in -t 1.

@ideasman42 ^^ any idea why the msgbus handler assert would trigger in such situation Stereoscopy doesn't seem to affect this it seems. I can turn that off and render animation a few times and still trigger the crash. Also, `-t 1` doesn't affect anything either, it will still crash in `-t 1`.
YimingWu added
Module
Python API
Status
Confirmed
Interest
Dependency Graph
and removed
Status
Needs Triage
labels 2024-09-18 06:47:09 +02:00
Author

As another datapoint, Viewport Render Animation works just fine

As another datapoint, Viewport Render Animation works just fine
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
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
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
Core
Module
Development Management
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
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
2 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#127546
No description provided.