Page MenuHome

VSE playback periodically refuses to work (Pulseaudio, OpenAL seems fine)
Closed, ResolvedPublic

Description

Debian, stable, git build of Master from today.
(e 8 a 4bddef4ff) (I put spaces because the hash was auto-referencing another bug report.)

I'm not sure when this used to work, and am not sure how to diagnose it.
Playback in the VSE, while working, will periodically get into a state where it no longer plays. It will do a frame, then stop, while "pretending" it's still playing. The frame will progress only one forward then stay there, and the FPS stays showing in the corner of the preview.

Reloading blender will get it going again, but after some time it might happen again.
I don't have a minimal .blend to demonstrate this yet, but here is a video showing it.
Any time the play/pause are toggled I am either using the mouse or hitting spacebar.
(Also, I forgot to enable mouse-cursor in the recording, but you can see the red indicator of clicks, except when I'm using spacebar to toggle playback).

If I change the Audio Device from "Pulseaudio" to "OpenAL" in Preferences after opening. The problem didn't appeared after, but I have to check more and in a longer duration.

Related Objects

Event Timeline

I'm not certain that I can reproduce it 100% of the times but I have been able to reproduce it multiple times in new blender projects. As soon as I save my blend file and reopens it again I don't experience any issue. If there is anything I can do to record trace logs or similar give me a pointer on how to setup the logging.

I had no issues with 2.92, it started with 2.93.

This sounds more like issue with sound playback with AV-sync enabled. Please check if this happens when you disable AV sync. You can do that in Playback menu under VSE timeline on left side. Set Sync to Play Every Frame.

In such case this would be duplicate of T88887, but that should be more limited to windows...

@Richard Antalik (ISS) I change Sync to Play every frame Image and It doesn't solve the whole thing but make it better.
I mean my preview is playing fine but audio is gone and changing it back to Sync to Audio again give me whole issue back.

@Joerg Mueller (nexyon) This seems to be similar issue to T88887, but on Linux. Can you check this? I can check on live distro too but can't guarantee I will be able to reproduce.

I switch to "Play every frame" instead of "Sync to audio" at the file opening. It's complety useless in my case because the image & the soud are totaly unsynchronized with 6fps, so i can't work untill a potential lock.

I came back to "Sync to audio" and experience the lock one more time. At this moment, i swich to "Play every frame". The playback unlocked but with no sound. Returning to "Sync to audio" falled the playback into the lock. I try the following stuff, but doesn't unlock the playback :

  • muting the sound channel
  • muting all the channels
  • delete the sound strip in the playback part, or all the sound strips
  • delete all the strips
  • deactivate power sequencer
  • deactivate Pulse in Debian Linux and reactivate

The only way to unlock is to restart Blender.

I change the Audio Device from "Pulseaudio" to "OpenAL" in Preferences after opening. The problem didn't appeared after, but I have to check more and in a longer duration.

I just committed bugfixes for pulseaudio and I think that this particular issue could be solved there, could you try this build please (with Audio Device set to "Pulseaudio"): https://builder.blender.org/download/experimental/blender-3.0.0-alpha+master.a112adf16a06-linux.x86_64-release.tar.xz

Joerg Mueller (nexyon) changed the task status from Needs Triage to Needs Information from User.Jul 10 2021, 10:15 AM

I will try the suggested workarounds/fixes mid/end of August if no one else beats me to it.

Philipp Oeser (lichtwerk) renamed this task from VSE playback periodically refuses to work to VSE playback periodically refuses to work (Pulseaudio, OpenAL seems fine).Aug 12 2021, 11:15 AM
Philipp Oeser (lichtwerk) updated the task description. (Show Details)

I just committed two more fixes for pulseaudio, I'm again not sure if they help, please check out a recent build of master (3.0.0 alpha), e.g.: https://builder.blender.org/download/experimental/blender-3.0.0-alpha+master.a217e043be2d-linux.x86_64-release.tar.xz

@Joerg Mueller (nexyon) I tested the linked experimental just now and can confirm that the bug still exists in version: 3.0.0 Alpha, branch: master, commit date: 2021-08-18 20:22, hash: a217e043be2d, type: release

  • I can confirm the behaviour mentioned in T90271 that OpenAL works just fine, PulseAudio does not.
  • Setting "Sync to play every frame" plays the video but sound is gone.
  • Saving the project, restart Blender, loading the blend file and all problems are gone for me.

I have more time moving forward, if there is anything specifics I should test please tell me.

That's interesting, so are you saying that you can only reproduce this issue (with the latest build) with this file? Also: may I ask which distribution (+ version) you are on, is it Debian as well?

I'm on linux/debian based Kubuntu 20.04.3 LTS (Focal Fossa).

Linux 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I'm not sure which file you are referring with "this file". To reproduce I start blender with the default start-up file and settings. I can only reproduce the bug with unsaved file, if I save and re-open it I cannot reproduce the bug.

To reproduce:

  1. Start Blender
  2. File > New > Video Editing
  3. Add one movie file to editing area
  4. Press play more or less immediately (proxy generation is usually at 1% - 3%)

I'm starting to believe that it might be some timing issue with the automatic generation of proxies introduced 2.93. Today when I tried to reproduce the bug it only occurred when I used files at 1GB and it wasn't 100% reproducible anymore I'm afraid. Waiting until the proxy generation is done does not help but saving the project as .blend file and re-open it solves all my issues.

Version that works

version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: 02948a2cab44, type: Release

Versions where I can reproduce the bug

version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: 84da05a8b806, type: release (when I first experienced it)
version: 3.0.0 Alpha, branch: master, commit date: 2021-08-18 20:22, hash: a217e043be2d, type: release

I'm starting to believe that it might be some timing issue with the automatic generation of proxies introduced 2.93. Today when I tried to reproduce the bug it only occurred when I used files at 1GB and it wasn't 100% reproducible anymore I'm afraid. Waiting until the proxy generation is done does not help but saving the project as .blend file and re-open it solves all my issues.

You can turn off automatic proxy generation in preferences or add sound file without video to test this. I wouldn't think, that proxy system causes issues here.

I'm starting to believe that it might be some timing issue with the automatic generation of proxies introduced 2.93. Today when I tried to reproduce the bug it only occurred when I used files at 1GB and it wasn't 100% reproducible anymore I'm afraid. Waiting until the proxy generation is done does not help but saving the project as .blend file and re-open it solves all my issues.

You can turn off automatic proxy generation in preferences or add sound file without video to test this. I wouldn't think, that proxy system causes issues here.

You are correct. I turned off automatic proxy generation and I was able to reproduce the problem in both earlier mentioned versions.

version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: 84da05a8b806, type: release
version: 3.0.0 Alpha, branch: master, commit date: 2021-08-18 20:22, hash: a217e043be2d, type: release

My biggest problem now is that I can't reproduce the issue 100% of the times, more like 25% or fewer of the tries. I will continue to look for patterns.

FWIW, still a problem on master e6fa74ffed5f on Ubuntu 21.04 but the same commit for the M1 Mac works fine.

Here is a build of D12564, a patch that hopefully deals with this bug finally. Please try if you can still reproduce the problem with it! https://builder.blender.org/download/patch/D12564/

This looks promising. It seems don't have the problem with this build. Normally I can trigger the bug pretty quick by scrubbing around, but this seems stable.

But I now have a specific blender file with video (tested save file from 2.92 and 2.93) that crashes blender. Don't know if this is related.

# Blender 3.0.0, Commit date: 2021-09-19 20:42, Hash d0ce06fb7821

# backtrace
./blender(BLI_system_backtrace+0x20) [0xb1e5cb0]
./blender() [0x1048d7b]
/usr/lib/libc.so.6(+0x3cda0) [0x7f0b86908da0]
./blender() [0x146fc19]
./blender(ANIM_sync_animchannels_to_data+0x134) [0x1c81c34]
./blender() [0x1f2f498]
./blender(ED_area_do_refresh+0x1b) [0x1ab1e8b]
./blender(wm_event_do_refresh_wm_and_depsgraph+0x6c) [0x1431a7c]
./blender(wm_event_do_notifiers+0x3d0) [0x1438870]
./blender(WM_main+0x28) [0x142da68]
./blender(main+0x31e) [0xf366fe]
/usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f0b868f3b25]
./blender() [0x10456dc]

# Python backtrace

Thanks for testing, sounds good!

Hmm, this backtrace doesn't look related. You could try if the bug is present in the latest 3.0.0 alpha build that doesn't have the patch applied: https://builder.blender.org/download/daily/blender-3.0.0-alpha+master.276eebb27474-linux.x86_64-release.tar.xz If this build crashes, it's a separate issue.

This build also crashes. It's a separate issue.

Good to know, please report this as a separate bug. I'll just have someone else test this patch and then push it to master.

Here is a build of D12564, a patch that hopefully deals with this bug finally. Please try if you can still reproduce the problem with it! https://builder.blender.org/download/patch/D12564/

I can confirm it fixes the bug for me. I tried to reproduce the bug just now for 10 minutes with several different files and was not able to reproduce it with https://builder.blender.org/download/patch/D12564/

EDIT
Link to differential had wrong number and linked to a CSV export/editor changes that doesn't relate to this. Just so others do not get too confused ;)

I just pushed the fix to master, thanks for checking!