Blender crashes using Jack with AV Sync enabled (repeatable) #72632
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#72632
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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: Linux-4.18.0-25-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116
Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash:
f1aa4d18d4
Short description of error
Blender crashes while scrubbing when AV Sync is enabled and system is using JACK audio
Exact steps for others to reproduce the error
It takes a while of constant scrubbing for me -- sometimes 30 seconds or even 1-2 minutes, but I can reliably make Blender crash this way. (Sometimes I stop and jump around in the timeline, left/right-arrow a little, etc... not sure if any of that is necessary.) Two crash.txt's are attached.
blender.crash_jack.txt
blender.crash2_jack.txt
Developer note
The issue is caused by race condition between JACK callback and dependency graph update.
One of the ideas to get it solved is to make JACK callback to act more like a tag (rahtehr than an actual action) which will allow handling it as soon as possible but not from the place where it can't be happening in a thread-safe manner.
Added subscriber: @clepsydrae
Added subscriber: @neXyon
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Confirmed'
Can confirm in a buildbot build.
(havent built with JACK myself yet, but...confirming for now)
The crash happens as follows, when you use JACK and AV-sync, JACK transport is enabled meaning that JACK will call the
sound_sync_callback
, which down the roadleads to
sound
(insound_start_play_scene
it'sscene->sound_scene
) beingNULL
.I figured that this is due to
SceneBackup
setting it so in Blender's main thread, but that's as far as I can get since I don't know what this is for. While there is a chance that sound is playing back,sound_scene
should only be changed when the audio device is locked (AUD_Device_lock(sound_device); ...; AUD_Device_unlock(sound_device);
), however, locking the device should be as short as possible it will cause skips, clicks, other nasty sounds, hangs, etc...Added subscriber: @Sergey
Having a callback happening from the middle of dependency graph update will never be reliable.
The proper behavior would be to do some sort of tag from the
sound_jack_sync_callback
which will indicate that the current frame and audio is to be updated once the event loop allows this.Unassigning myself, it doesn't fir into my agenda. Can help with understanding the design, but can't be the one who fixes every single area.
Removed subscriber: @Sergey
This issue was referenced by
0710fb724b
Changed status from 'Confirmed' to: 'Resolved'
This patch should fix the issue.