Blender freezes when playhead is dragged in this .blend #86728

Closed
opened 2021-03-19 08:28:37 +01:00 by Tomasz Kaye · 16 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.30

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-03-16 22:45, hash: de06cb8559
Worked: blender-2.93.0-be51d671b500-windows64

Short description of error
Blender becomes unresponsive when playhead is dragged (in this .blend)

Exact steps for others to reproduce the error
Open attached .blend
Try to drag the playhead to a different frame
Blender becomes unresponsive (spinning progress cursor) before the playhead moves.

timelinefreezebug.blend

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.30 **Blender Version** Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-03-16 22:45, hash: `de06cb8559` Worked: blender-2.93.0-be51d671b500-windows64 **Short description of error** Blender becomes unresponsive when playhead is dragged (in this .blend) **Exact steps for others to reproduce the error** Open attached .blend Try to drag the playhead to a different frame Blender becomes unresponsive (spinning progress cursor) before the playhead moves. [timelinefreezebug.blend](https://archive.blender.org/developer/F9899147/timelinefreezebug.blend)
Author

Added subscriber: @info-27

Added subscriber: @info-27

#86731 was marked as duplicate of this issue

#86731 was marked as duplicate of this issue

Added subscribers: @filedescriptor, @antoniov

Added subscribers: @filedescriptor, @antoniov

I can reproduce it, but the problem is present when you remove all grease pencil objects too, so not sure if this bug is gpencil related or not.

@filedescriptor I can reproduce, but I cannot stop the program to see where is doing the loop.. can you try?

I can reproduce it, but the problem is present when you remove all grease pencil objects too, so not sure if this bug is gpencil related or not. @filedescriptor I can reproduce, but I cannot stop the program to see where is doing the loop.. can you try?
Member

I cannot reproduce the issue. Scrubbing the timeline works fine for me.

System Information
Operating system: Linux-5.8.0-7642-generic-x86_64-with-glibc2.32 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.56

I cannot reproduce the issue. Scrubbing the timeline works fine for me. **System Information** Operating system: Linux-5.8.0-7642-generic-x86_64-with-glibc2.32 64 Bits Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.56

I have tested opening the file in 2.92, removing all objects (empty file) and opening in 2.93 with the same problem.

The test file.

timelinefreezebug_new.blend

I have tested opening the file in 2.92, removing all objects (empty file) and opening in 2.93 with the same problem. The test file. [timelinefreezebug_new.blend](https://archive.blender.org/developer/F9899757/timelinefreezebug_new.blend)

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo

@LazyDodo If yo can, please take a look and try to find what is the problem in Windows, I'm unable to see what is going on.

@LazyDodo If yo can, please take a look and try to find what is the problem in Windows, I'm unable to see what is going on.
Member

It's a deadlock in the audio code.

main thread is waiting for the audio thread to join while it's holding a mutex

 	[Waiting on Thread 0xB44, double-click or press enter to switch to thread]	
 	[External Code]	
>	blender.exe!aud::WASAPIDevice::start() Line 43	C++

 	blender.exe!aud::WASAPIDevice::playing(bool playing) Line 143	C++
 	blender.exe!aud::SoftwareDevice::SoftwareHandle::resume() Line 288	C++
 	blender.exe!AUD_Handle_resume(std::shared_ptr<aud::IHandle> * handle) Line 36	C++
 	blender.exe!BKE_sound_seek_scene(Main * bmain, Scene * scene) Line 944	C
 	blender.exe!BKE_scene_update_sound(Depsgraph * depsgraph, Main * bmain) Line 2589	C
 	blender.exe!BKE_scene_graph_update_for_newframe(Depsgraph * depsgraph) Line 2723	C
 	blender.exe!ED_update_for_newframe(Main * bmain, Depsgraph * depsgraph) Line 1631	C
 	blender.exe!wm_event_do_notifiers(bContext * C) Line 538	C
 	blender.exe!WM_main(bContext * C) Line 652	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 524	C
 	[External Code]	

meanwhile on the audio thread:

 	[External Code]	
 	blender.exe!aud::SoftwareDevice::lock() Line 912	C++
>	blender.exe!aud::WASAPIDevice::updateStream() Line 83	C++

 	[External Code]	

it's stuck waiting for this lock


	lock();

	mix((data_t*)buffer, length);

	unlock();

deadlock ensures

It's a deadlock in the audio code. main thread is waiting for the audio thread to join while it's holding a mutex ``` [Waiting on Thread 0xB44, double-click or press enter to switch to thread] [External Code] > blender.exe!aud::WASAPIDevice::start() Line 43 C++ blender.exe!aud::WASAPIDevice::playing(bool playing) Line 143 C++ blender.exe!aud::SoftwareDevice::SoftwareHandle::resume() Line 288 C++ blender.exe!AUD_Handle_resume(std::shared_ptr<aud::IHandle> * handle) Line 36 C++ blender.exe!BKE_sound_seek_scene(Main * bmain, Scene * scene) Line 944 C blender.exe!BKE_scene_update_sound(Depsgraph * depsgraph, Main * bmain) Line 2589 C blender.exe!BKE_scene_graph_update_for_newframe(Depsgraph * depsgraph) Line 2723 C blender.exe!ED_update_for_newframe(Main * bmain, Depsgraph * depsgraph) Line 1631 C blender.exe!wm_event_do_notifiers(bContext * C) Line 538 C blender.exe!WM_main(bContext * C) Line 652 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 524 C [External Code] ``` meanwhile on the audio thread: ``` [External Code] blender.exe!aud::SoftwareDevice::lock() Line 912 C++ > blender.exe!aud::WASAPIDevice::updateStream() Line 83 C++ [External Code] ``` it's stuck waiting for this lock ``` lock(); mix((data_t*)buffer, length); unlock(); ``` deadlock ensures
Joerg Mueller was assigned by Ray molenkamp 2021-03-19 17:59:29 +01:00
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

If this bug bit you, you can work around the issue by selecting any other audio subsystem in the preferences but "WASAPI"

If this bug bit you, you can work around the issue by selecting any other audio subsystem in the preferences but "WASAPI"
Member

@LazyDodo just to get an idea of what is triggering it, could you try disabling Audio Scrubbing in the Playback Menu?

image.png

@LazyDodo just to get an idea of what is triggering it, could you try disabling Audio Scrubbing in the Playback Menu? ![image.png](https://archive.blender.org/developer/F9899801/image.png)
Member

Added subscriber: @Pyer

Added subscriber: @Pyer
Member

Can confirm that also sidesteps the issue.

Can confirm that also sidesteps the issue.

This issue was referenced by 250a69ee82

This issue was referenced by 250a69ee82821f9d2d11325ab15e72b39632df1f
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
6 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#86728
No description provided.