Summary: | Crash in pa_stream_set_read_callback when closing popup | ||
---|---|---|---|
Product: | [Plasma] plasma-pa | Reporter: | Kai Uwe Broulik <kde> |
Component: | applet | Assignee: | David Rosca <nowrep> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | alex765, goldenhashtag, kde, nate, plasma-bugs, rly07 |
Priority: | VHI | Keywords: | regression |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=437184 | ||
Latest Commit: | Version Fixed In: | 5.21.1 | |
Sentry Crash Report: |
Description
Kai Uwe Broulik
2021-02-03 21:18:31 UTC
Do you have a self-built pulseaudio? It's an assert, I assume that's not on in debug builds. Is it reproducible? I think I have a potential patch, but it's written blind. if (m_stream) { - pa_stream_disconnect(m_stream); - pa_stream_unref(m_stream); pa_stream_set_read_callback(m_stream, nullptr, nullptr); pa_stream_set_suspended_callback(m_stream, nullptr, nullptr); + pa_stream_disconnect(m_stream); + pa_stream_unref(m_stream); Got another crash, though backtrace different: Thread 1 (Thread 0x7f548e57c8c0 (LWP 1668584)): [KCrash Handler] #4 std::__atomic_base<QObjectPrivate::Connection*>::load(std::memory_order) const (__m=std::memory_order_acquire, this=0x51) at /usr/include/c++/9/bits/atomic_base.h:734 #5 std::atomic<QObjectPrivate::Connection*>::load(std::memory_order) const (__m=std::memory_order_acquire, this=0x51) at /usr/include/c++/9/atomic:519 #6 QAtomicOps<QObjectPrivate::Connection*>::loadAcquire<QObjectPrivate::Connection*>(std::atomic<QObjectPrivate::Connection*> const&) (_q_value=...) at ../../include/QtCore/../../src/corelib/thread/qatomic_cxx11.h:251 #7 QBasicAtomicPointer<QObjectPrivate::Connection>::loadAcquire() const (this=0x51) at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:255 #8 QObjectPrivate::maybeSignalConnected(unsigned int) const (this=this@entry=0x55eebbf578f0, signalIndex=signalIndex@entry=3) at kernel/qobject.cpp:486 #9 0x00007f5492bdc274 in doActivate<false>(QObject*, int, void**) (sender=0x55eebbfe0330, signal_index=3, argv=0x7ffdc710a900) at kernel/qobject_p.h:110 #10 0x00007f5492bd5a87 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x55eebbfe0330, m=m@entry=0x7f5463cad100 <QPulseAudio::VolumeMonitor::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946 #11 0x00007f5463c41454 in QPulseAudio::VolumeMonitor::volumeChanged() (this=this@entry=0x55eebbfe0330) at /home/kaiuwe/Projekte/kf5/plasma-pa/build/src/plasma-volume-declarative_autogen/EWIEGA46WW/moc_volumemonitor.cpp:215 #12 0x00007f5463c7df92 in QPulseAudio::VolumeMonitor::updateVolume(double) (this=this@entry=0x55eebbfe0330, volume=<optimized out>) at /home/kaiuwe/Projekte/kf5/plasma-pa/src/volumemonitor.cpp:58 #13 0x00007f5463c7e055 in QPulseAudio::VolumeMonitor::read_callback(pa_stream*, unsigned long, void*) (s=0x55eebbf61550, length=<optimized out>, userdata=0x55eebbfe0330) at /home/kaiuwe/Projekte/kf5/plasma-pa/src/volumemonitor.cpp:173 #14 0x00007f5463be6361 in () at /usr/lib/x86_64-linux-gnu/libpulse.so.0 #15 0x00007f5463952d15 in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so #16 0x00007f546395572b in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so #17 0x00007f5463955aea in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so #18 0x00007f546395637a in () at /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so #19 0x00007f5478038556 in () at /usr/lib/x86_64-linux-gnu/libpulse-mainloop-glib.so.0 #20 0x00007f5490e14f9d in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #21 0x00007f5490e15220 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #22 0x00007f5490e152c3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #23 0x00007f5492bfffbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55eebab2f630, flags=...) at kernel/qeventdispatcher_glib.cpp:425 #24 0x00007f5492ba41ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffdc710ad10, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141 #25 0x00007f5492bac354 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121 #26 0x000055eeba53c8e6 in () #27 0x00007f54925460b3 in __libc_start_main (main=0x55eeba53c4a0, argc=2, argv=0x7ffdc710af48, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdc710af38) at ../csu/libc-start.c:308 #28 0x000055eeba53c9ae in () [Inferior 1 (process 1668584) detached] The second crash isn't from your patch. But I can at least easily repoduce it using arecord. Go to applications tab, do `arecord ~/foo.wav`, Ctrl+C, and do it again. It will crash. *** Bug 433159 has been marked as a duplicate of this bug. *** https://invent.kde.org/plasma/plasma-pa/-/merge_requests/51 Can't reproduce with arecord, but maybe something else in plasma is ref'ing the stream for me, which is why it's not consistent. Git commit f720efe73cb4bd31e916c8fb4e0268dcfdfac9d9 by David Edmundson. Committed on 19/02/2021 at 10:23. Pushed by davidedmundson into branch 'master'. Unref stream after unsetting callbacks M +2 -2 src/volumemonitor.cpp https://invent.kde.org/plasma/plasma-pa/commit/f720efe73cb4bd31e916c8fb4e0268dcfdfac9d9 Git commit 02c07a571651aaa22683dc9b6f08aee5ded8403b by David Edmundson. Committed on 19/02/2021 at 14:18. Pushed by davidedmundson into branch 'Plasma/5.21'. Unref stream after unsetting callbacks (cherry picked from commit f720efe73cb4bd31e916c8fb4e0268dcfdfac9d9) M +2 -2 src/volumemonitor.cpp https://invent.kde.org/plasma/plasma-pa/commit/02c07a571651aaa22683dc9b6f08aee5ded8403b *** Bug 433415 has been marked as a duplicate of this bug. *** Lets assume that fixes it, until there is any information otherwise *** Bug 433465 has been marked as a duplicate of this bug. *** |