Bug 496067 - Occasional crash in PulseAudioQt::Profile::availability() on opening profiles menu
Summary: Occasional crash in PulseAudioQt::Profile::availability() on opening profiles...
Status: REPORTED
Alias: None
Product: pulseaudio-qt
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Nicolas Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-10 22:08 UTC by ratijas
Modified: 2024-11-15 13:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/44238/


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2024-11-10 22:08:43 UTC
SUMMARY

Got an amazing stacktrace from plasma-pa bringing down the whole Plasma. Most relevant frames on top:

#5  0x0000790b38b0fb68 in PulseAudioQt::Profile::availability (this=0x5d3c7e35ed10) at /usr/src/debug/pulseaudio-qt/pulseaudio-qt-1.6.1/src/profile.cpp:44
#6  0x0000790b38b6a634 in ListItemMenu::createMenu (this=0x5d3c758aace0) at /usr/src/debug/plasma-pa/plasma-pa-6.2.3/src/qml/listitemmenu.cpp:338
#7  0x0000790b38b57548 in ListItemMenu::openRelative (this=0x5d3c758aace0) at /usr/src/debug/plasma-pa/plasma-pa-6.2.3/src/qml/listitemmenu.cpp:275
#8  ListItemMenu::qt_static_metacall (_o=0x5d3c758aace0, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/plasma-pa/build/src/plasma-volume-declarative_autogen/CCBC4FUR7J/moc_listitemmenu.cpp:198

STEPS TO REPRODUCE
1. Use Plasma
2. Open Volume applet
3. Open profiles menu for a headset

turns out, it might crash occasionally.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.6-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Memory: 60.6 GiB of RAM
Graphics Processor: AMD Radeon 780M
Manufacturer: Framework
Product Name: Laptop 16 (AMD Ryzen 7040 Series)

ADDITIONAL INFORMATION

The laptop has built-in speakers, an expansion sound card (mini-jack TRRS port) with a gaming headset, and a Bluetooth SONY WH-1000XM4 headset (although in output only "High Fidelity Playback" mode) were connected at the same time.
Comment 1 Harald Sitter 2024-11-14 03:21:56 UTC
I cannot seem to make it crash and it's not immediately obvious why the dptr would be null here either :(
Comment 2 Bug Janitor Service 2024-11-14 11:17:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-pa/-/merge_requests/298
Comment 3 Harald Sitter 2024-11-15 13:35:53 UTC
Git commit 23c8a3f982d5e0c8380c0870b047b251f67d179e by Harald Sitter.
Committed on 15/11/2024 at 13:28.
Pushed by sitter into branch 'master'.

listitemmenu: guard activePort against null

it's not quite obvious why ports.at(index) would return null, but it's
my best guess for why we have a crash here

M  +4    -3    src/qml/listitemmenu.cpp

https://invent.kde.org/plasma/plasma-pa/-/commit/23c8a3f982d5e0c8380c0870b047b251f67d179e
Comment 4 Bug Janitor Service 2024-11-15 13:36:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-pa/-/merge_requests/299
Comment 5 Harald Sitter 2024-11-15 13:44:08 UTC
Git commit 49925e2a9598f27a526534dc2b4b1bc0bcee639b by Harald Sitter.
Committed on 15/11/2024 at 13:36.
Pushed by sitter into branch 'Plasma/6.2'.

listitemmenu: guard activePort against null

it's not quite obvious why ports.at(index) would return null, but it's
my best guess for why we have a crash here


(cherry picked from commit 23c8a3f982d5e0c8380c0870b047b251f67d179e)

Co-authored-by: Harald Sitter <sitter@kde.org>

M  +4    -3    src/qml/listitemmenu.cpp

https://invent.kde.org/plasma/plasma-pa/-/commit/49925e2a9598f27a526534dc2b4b1bc0bcee639b