Summary: | Phonon-vlc with pipewire output crashes when Phonon::AudioOutput::setVolume is called without media | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Phonon | Reporter: | Jérôme Villafruela <kde.org> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | REPORTED --- | ||
Severity: | crash | CC: | brownedward478, luca.cavana, myriam, phi.lippe.latulipp.e+kde, romain.perier, sitter, stephane, tuomas, vestov_a |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Result of amarok --debug
Result of amarok --debug-audio |
Description
Jérôme Villafruela
2024-05-02 18:57:29 UTC
Thank you for your report! Looking at the backtrace, the fact that the crash happens very early during initialization suggests there might be something problematic with how phonon-vlc backend interacts with pipewire. This might be a long shot, but could you try if similar crashes happen when starting up e.g. Dragon player? (which also uses phonon for audio playback) (In reply to Tuomas Nurmi from comment #1) Thanks for you quick response. Dragon Player starts fine with these messages : $ dragon qt.core.qobject.connect: QObject::connect: No such signal Phonon::VLC::MediaObject::angleChanged(int) qt.core.qobject.connect: QObject::connect: No such signal Phonon::VLC::MediaObject::availableAnglesChanged(int) qt.core.qobject.connect: QObject::connect: No such signal Phonon::VLC::MediaObject::angleChanged(int) qt.core.qobject.connect: QObject::connect: No such signal Phonon::VLC::MediaObject::availableAnglesChanged(int) (In reply to Jérôme Villafruela from comment #2) > (In reply to Tuomas Nurmi from comment #1) > > Thanks for you quick response. Dragon Player starts fine with these messages Okay, thank you for testing. I haven't encountered this myself, and it doesn't seem to affect every Fedora user, either. I'll probably try installing a Fedora system myself and see if I could reproduce this somehow sometime later. I made some tests on another machine (Lenovo ThinkCentre M710q) - On Fedora 39 (amarok v2.9.70) : OK - On a fresh install of Fedora 40 : crash (iso used : Fedora-KDE-Live-x86_64-40-1.14.iso ) - After updating the Fedora 40 : crash *** Bug 486140 has been marked as a duplicate of this bug. *** Ok, I installed Fedora 40 in VirtualBox. Installed Amarok 2.9.71 from default installation source. Tried starting it: No crash, I was able to play music normally. Phonon-vlc backend (Qt5) seemed to be in use. I'm not that familiar with pipewire, but I figured I could try starting wireplumber. That caused Amarok to get stuck during startup, although didn't crash (and that seemed to make everything else using sound get stuck during startup, too). Was fixed after a reboot. Tried installing Helvum. Amarok was displayed there as connected to output channels, everything looked quite normal. No success in finding the root cause of the crash yet. A useful note: To get proper debugging output from `amarok --debug` on Fedora, one should edit /usr/share/qt5/qtlogging.ini to read something like [Rules] *.debug=true qt.qpa.xcb.xcberror.warning=false qt.*=false kf.*=false Created attachment 169318 [details] Result of amarok --debug With debug enabled in qtlogging.ini as indicated by Tuomas (comment #6) Created attachment 169319 [details] Result of amarok --debug-audio With debug enabled in qtlogging.ini as indicated by Tuomas (comment #6) Thank you for the new debug outputs! I just managed to find how to reproduce this in my VirtualBox Fedora 40: If I run phononsettings, select "Show additional devices" (or what ever that may be in English), and make PipeWire Sound Server the primary audio output device, Amarok crashes on startup, corresponding to your experience. Not sure if this is actually a bug in Phonon, but I'll see if the crash can be avoided with changing Amarok's code now that I can reproduce this. Good. Managed to crash dragonplayer, too, so this is pretty clearly a phonon bug. Editing bug metadata. Crash seems to happen often/always when Phonon::AudioOutput::setVolume is called while no media is loaded. Reproducible at least on Fedora 40, phononsettings -> select "Show additional devices" (or what ever that may be in English), and make PipeWire Sound Server the primary audio output device -> try starting up amarok or dragon a couple of times Backtrace from crashing dragonplayer run through gdb, took about 5 tries to get it crash. Starting program: /usr/bin/dragon [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7fffe34006c0 (LWP 18422)] [New Thread 0x7fffe1c006c0 (LWP 18423)] [New Thread 0x7fffe12006c0 (LWP 18424)] [New Thread 0x7fffdbe006c0 (LWP 18425)] [New Thread 0x7fffdb4006c0 (LWP 18426)] [New Thread 0x7fffdaa006c0 (LWP 18427)] [New Thread 0x7fffda0006c0 (LWP 18428)] [New Thread 0x7fffd96006c0 (LWP 18429)] [New Thread 0x7fffd8c006c0 (LWP 18430)] MESA: error: ZINK: failed to choose pdev libEGL warning: egl: failed to create dri2 screen [New Thread 0x7fffcd8006c0 (LWP 18431)] [New Thread 0x7fffcce006c0 (LWP 18432)] [New Thread 0x7fffc3e006c0 (LWP 18433)] [New Thread 0x7fffc34006c0 (LWP 18434)] [New Thread 0x7fffc2a006c0 (LWP 18435)] [New Thread 0x7fffc20006c0 (LWP 18436)] [New Thread 0x7fffc16006c0 (LWP 18437)] [New Thread 0x7fffc0c006c0 (LWP 18438)] [New Thread 0x7fffb7e006c0 (LWP 18439)] [New Thread 0x7fffb74006c0 (LWP 18440)] [New Thread 0x7fffb6a006c0 (LWP 18441)] [New Thread 0x7fffb60006c0 (LWP 18442)] qt.core.qobject.connect: QObject::connect: No such signal Phonon::VLC::MediaObject::angleChanged(int) qt.core.qobject.connect: QObject::connect: No such signal Phonon::VLC::MediaObject::availableAnglesChanged(int) qt.core.qobject.connect: QObject::connect: No such signal Phonon::VLC::MediaObject::angleChanged(int) qt.core.qobject.connect: QObject::connect: No such signal Phonon::VLC::MediaObject::availableAnglesChanged(int) Thread 1 "dragon" received signal SIGSEGV, Segmentation fault. ___pthread_mutex_lock (mutex=mutex@entry=0x28) at pthread_mutex_lock.c:80 80 unsigned int type = PTHREAD_MUTEX_TYPE_ELISION (mutex); (gdb) bt #0 ___pthread_mutex_lock (mutex=mutex@entry=0x28) at pthread_mutex_lock.c:80 #1 0x00007fffdbfc3957 in do_lock.isra.0 (this=this@entry=0x0) at ../src/pipewire/thread-loop.c:53 #2 0x00007fffdbfc3a05 in pw_thread_loop_lock (loop=0x0) at ../src/pipewire/thread-loop.c:371 #3 0x00007fffe016e97c in vlc_pw_lock (ctx=<optimized out>) at modules/audio_output/vlc_pipewire.c:76 #4 0x00007fffe016ea56 in vlc_pw_stream_set_volume (s=0x7ffff55f6b20 <main_arena+96>, vol=0.180000007) at modules/audio_output/pipewire.c:377 #5 0x00007fffe016eba0 in VolumeSet (aout=<optimized out>, volume=<optimized out>) at modules/audio_output/pipewire.c:658 #6 0x00007fffe031f9b9 in aout_OutputVolumeSet (vol=<optimized out>, aout=0x55555736d6c0) at audio_output/output.c:659 #7 aout_OutputUnlock (aout=0x55555736d6c0) at audio_output/output.c:704 #8 0x00007fffe0325f48 in aout_VolumeSet (aout=aout@entry=0x55555736d6c0, vol=vol@entry=0.180000007) at audio_output/output.c:748 #9 0x00007fffe02afb6b in libvlc_audio_set_volume (mp=<optimized out>, volume=<optimized out>) at /usr/src/debug/vlc-3.0.20-12.fc40.x86_64/lib/audio.c:368 #10 0x00007fffe03bc749 in Phonon::VLC::MediaPlayer::setVolumeInternal (this=<optimized out>) at /usr/src/debug/phonon-backend-vlc-0.12.0-3.fc40.x86_64/src/mediaplayer.cpp:395 #11 Phonon::VLC::MediaPlayer::setAudioVolume (volume=18, this=<optimized out>) at /usr/src/debug/phonon-backend-vlc-0.12.0-3.fc40.x86_64/src/mediaplayer.cpp:380 #12 Phonon::VLC::AudioOutput::applyVolume (this=<optimized out>) at /usr/src/debug/phonon-backend-vlc-0.12.0-3.fc40.x86_64/src/audio/audiooutput.cpp:216 #13 0x00007ffff7e2ff35 in Phonon::AudioOutput::setVolume (this=<optimized out>, volume=0.31698053201323556) at /usr/src/debug/phonon-4.12.0-5.fc40.x86_64/phonon/audiooutput.cpp:170 #14 0x000055555558bdf8 in Dragon::VideoWindow::VideoWindow (this=<optimized out>, parent=0x555555841b40) at /usr/src/debug/dragon-24.02.2-1.fc40.x86_64/src/app/videoWindow.cpp:142 #15 Dragon::MainWindow::MainWindow (this=0x555555841b40, this=<optimized out>) at /usr/src/debug/dragon-24.02.2-1.fc40.x86_64/src/app/mainWindow.cpp:101 #16 0x00005555555804c5 in Dragon::PlayerApplication::newInstance (this=0x7fffffffdc30, playDisc=false, uris=...) at /usr/src/debug/dragon-24.02.2-1.fc40.x86_64/src/app/playerApplication.cpp:58 #17 0x0000555555570c8d in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dragon-24.02.2-1.fc40.x86_64/src/app/main.cpp:77 (gdb) I think the issue is in modules/audio_output/pipewire.c of vlc-plugin-pipewire. When the internal "sys" structure is created in Open(), its fields contain uninitialized memory. In particular, its stream field should be set to NULL, otherwise other parts of the code think that there is a stream active and crash while trying to access it. Same behaviour on my updated F40 and installing this version resolved the problem: https://koji.fedoraproject.org/koji/buildinfo?buildID=2449071 *** Bug 492629 has been marked as a duplicate of this bug. *** Amarok has been updated (to version 3.1.1-1) and it works now :-) (In reply to Jérôme Villafruela from comment #14) > Amarok has been updated (to version 3.1.1-1) and it works now :-) No related changes in Amarok 3.1.1 (or 3.1.0) so likely fixed by some other package update, or randomly fixed |