<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>437184</bug_id>
          
          <creation_ts>2021-05-16 00:18:35 +0000</creation_ts>
          <short_desc>Plasmashell crashes in QPulseAudio::VolumeMonitor::read_callback() while using sound widget with PipeWire</short_desc>
          <delta_ts>2021-05-19 16:06:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>plasma-pa</product>
          <component>applet</component>
          <version>5.21.5</version>
          <rep_platform>Fedora RPMs</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=432482</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>drkonqi</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Raindrops">raindrops</reporter>
          <assigned_to name="David Rosca">nowrep</assigned_to>
          <cc>kde</cc>
    
    <cc>nate</cc>
    
    <cc>plasma-bugs-null</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-pa/commit/756628553dc55a73cfefa5589ce383ffa95868c1</cf_commitlink>
          <cf_versionfixedin>5.22</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2033007</commentid>
    <comment_count>0</comment_count>
    <who name="Raindrops">raindrops</who>
    <bug_when>2021-05-16 00:18:35 +0000</bug_when>
    <thetext>Application: plasmashell (5.21.5)

Qt Version: 5.15.2
Frameworks Version: 5.81.0
Operating System: Linux 5.11.19-300.fc34.x86_64 x86_64
Windowing System: X11
Drkonqi Version: 5.21.5
Distribution: Fedora 34 (KDE Plasma)

-- Information about the crash:
- What I was doing when the application crashed:
I was switching between the different tabs on Plasma&apos;s sound widget and the shell crashed

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fa7ed99d146 in void doActivate&lt;false&gt;(QObject*, int, void**) () from /lib64/libQt5Core.so.5
#5  0x00007fa78b58c723 in QPulseAudio::VolumeMonitor::read_callback(pa_stream*, unsigned long, void*) () from /usr/lib64/qt5/qml/org/kde/plasma/private/volume/libplasma-volume-declarative.so
#6  0x00007fa78b4ea9e1 in pstream_memblock_callback () from /lib64/libpulse.so.0
#7  0x00007fa78b498f05 in do_read () from /usr/lib64/pulseaudio/libpulsecommon-14.2.so
#8  0x00007fa78b49a79f in do_pstream_read_write () from /usr/lib64/pulseaudio/libpulsecommon-14.2.so
#9  0x00007fa78b53091e in dispatch_func () from /lib64/libpulse-mainloop-glib.so.0
#10 0x00007fa7ebdab4cf in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#11 0x00007fa7ebdff4e8 in g_main_context_iterate.constprop () from /lib64/libglib-2.0.so.0
#12 0x00007fa7ebda8c03 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#13 0x00007fa7ed9b96f8 in QEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /lib64/libQt5Core.so.5
#14 0x00007fa7ed96b9b2 in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) () from /lib64/libQt5Core.so.5
#15 0x00007fa7ed973544 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#16 0x00005608c2ad4071 in main ()
[Inferior 1 (process 20638) detached]

Possible duplicates by query: bug 436863, bug 435427, bug 432084, bug 431077, bug 429973.

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2033009</commentid>
    <comment_count>1</comment_count>
    <who name="Raindrops">raindrops</who>
    <bug_when>2021-05-16 00:20:29 +0000</bug_when>
    <thetext>Also, since the issue seems to be related to PulseAudio (according to the files that caused the crash), I specify I use PipeWire with its PulseAudio implementation.

PipeWire Version: 0.3.27</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2033776</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2021-05-18 21:21:45 +0000</bug_when>
    <thetext>Would seem to be the same as Bug 432482, but that was supposedly fixed in Plasma 5.21.1 and does not involve PipeWire.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2033953</commentid>
    <comment_count>3</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2021-05-19 08:32:57 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-pa/-/merge_requests/66</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2034067</commentid>
    <comment_count>4</comment_count>
    <who name="David Redondo">kde</who>
    <bug_when>2021-05-19 16:05:44 +0000</bug_when>
    <thetext>Git commit 1982415fc2abdd39a8eeaf4b68a53e05c9571395 by David Redondo.
Committed on 19/05/2021 at 08:25.
Pushed by ngraham into branch &apos;master&apos;.

Fix crash when target is destroyed before monitor

The target is saved as a QPointer inside VolumeMonitor. This is generally
a good idea since its lifetime is managed somewhere else. However in this
case this means we are not noticing when it is deleted and cannot distinguish
that from not having a set target. When the VolumeObject is deleted before
the monitor, it would fail to unset the pulseaudio callbacks resulting in
them being called after destruction.

M  +4    -1    src/volumemonitor.cpp
M  +1    -1    src/volumemonitor.h

https://invent.kde.org/plasma/plasma-pa/commit/1982415fc2abdd39a8eeaf4b68a53e05c9571395</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2034069</commentid>
    <comment_count>5</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2021-05-19 16:06:37 +0000</bug_when>
    <thetext>Git commit 756628553dc55a73cfefa5589ce383ffa95868c1 by Nate Graham, on behalf of David Redondo.
Committed on 19/05/2021 at 16:06.
Pushed by ngraham into branch &apos;Plasma/5.22&apos;.

Fix crash when target is destroyed before monitor

The target is saved as a QPointer inside VolumeMonitor. This is generally
a good idea since its lifetime is managed somewhere else. However in this
case this means we are not noticing when it is deleted and cannot distinguish
that from not having a set target. When the VolumeObject is deleted before
the monitor, it would fail to unset the pulseaudio callbacks resulting in
them being called after destruction.


(cherry picked from commit 1982415fc2abdd39a8eeaf4b68a53e05c9571395)

M  +4    -1    src/volumemonitor.cpp
M  +1    -1    src/volumemonitor.h

https://invent.kde.org/plasma/plasma-pa/commit/756628553dc55a73cfefa5589ce383ffa95868c1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>