Bug 484550

Summary: Crash when selecting window capture in xdg-desktop-portal-kde after the System has run for a while
Product: [Plasma] xdg-desktop-portal-kde Reporter: ca1f
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: crash CC: aleixpol, jgrulich, nate
Priority: NOR    
Version First Reported In: 6.0.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: backtrace

Description ca1f 2024-03-26 20:26:05 UTC
Created attachment 167814 [details]
backtrace

SUMMARY

This crash is a bit vague to describe but reproducible for me. Right after a fresh boot of the system, when I select a single window to capture in OBS Studio, the xdg-desktop-portal-kde dialog for selecting a window shows up normally with previews for all windows and I can select a window and start the capturing process.

When I want to change the Window to capture in OBS Studio after a while, the window selection dialog from xdg-desktop-portal-kde either shows up for a very brief moment and closes right away, leaving a coredump behind in coredumpctl or shows no preview of the available windows and selecting a new window to capture is unsuccessful, OBS shows no window capture at all in this case. 


STEPS TO REPRODUCE
1. Start OBS. Select a Window to capture.
2. After a while, change the window captured in OBS.
3. Observe the crash.

OBSERVED RESULT
The xdg-desktop-portal-kde window capture dialog shows up briefly but closes shortly after again. A crash of the xdg-desktop-portal-kde process in cordumpctl is recorded.


EXPECTED RESULT
The xdg-desktop-portal-kde window shows all windows normally and allows me to select a new window for capture.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6900 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550 AORUS PRO V2

ADDITIONAL INFORMATION
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000072bd5c120441 in core_event_add_mem (data=0x5cb0b47e7bf0, id=306, type=3, fd=-1, flags=0)
    at ../pipewire/src/pipewire/core.c:84
Downloading source file /usr/src/debug/pipewire/build/../pipewire/src/pipewire/core.c
84              if (m->id != id) {