Bug 504974

Summary: Dolphin crashes on paste action after KDE Connect file transfer resume (XCB/QMimeData corruption)
Product: [Applications] dolphin Reporter: Dave Connett <dave.connett>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: crash CC: dolphin-bugs-null, kdedev
Priority: NOR    
Version First Reported In: 25.04.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Full backtrace (bt full) from coredumpctl gdb with debug symbols
bt full output

Description Dave Connett 2025-05-29 17:48:03 UTC
Created attachment 181877 [details]
Full backtrace (bt full) from coredumpctl gdb with debug symbols

SUMMARY:  
Resuming a paused Dolphin file transfer (via KDE Connect) after switching WiFi access points causes Dolphin, Kontact, and kioworker to crash due to MIME data corruption.

DESCRIPTION:  
While copying files from my Android phone to my desktop using Dolphin over KDE Connect (kdeconnect:// KIO path), I paused the transfer using the Plasma job progress notification popup (the interactive transfer UI in the system tray). The transfer was initiated directly from Dolphin by dragging files from the phone's KDE Connect mount to a local folder.

While the transfer was paused, I switched my phone to a different WiFi access point (same LAN, different subnet). Upon resuming the transfer from the notification popup, Dolphin, Kontact, and kioworker all crashed immediately.

Backtrace shows the crash originates in QMimeData handling, with QXcbClipboard::getSelection(), QInternalMimeData::retrieveData(), and KUrlMimeData::urlsFromMimeData() involved — suggesting a stale or corrupted MIME data object, likely tied to the invalidated kdeconnect:// connection after the network handoff.

STEPS TO REPRODUCE:
1. Start a file transfer from phone to PC using Dolphin (with KDE Connect as the transport)
2. Pause the transfer from the system tray job popup
3. Switch the phone to a different WiFi access point (same LAN, different subnet)
4. Resume the transfer via the same popup
5. Click "Paste" or interact with the clipboard in Dolphin

OBSERVED RESULT:  
Immediate crash in Dolphin with a SIGABRT in QInternalMimeData::retrieveData()

EXPECTED RESULT:  
Transfer should fail gracefully, or clipboard state should be cleared without crashing

SOFTWARE/OS VERSIONS:
- Operating System: Arch Linux  
- KDE Plasma Version: 6.3.5  
- KDE Frameworks Version: 6.14.0  
- Qt Version: 6.9.0  
- Kernel Version: 6.14.7-arch2-1 (64-bit)  
- Graphics Platform: X11  
- Processors: 32 × AMD Ryzen 9 5950X  
- Memory: 124.9 GiB RAM  
- Graphics: AMD Radeon RX 6900 XT

ADDITIONAL INFORMATION:  
Full backtrace from `coredumpctl gdb dolphin` is attached.
Comment 1 TraceyC 2025-06-04 19:17:29 UTC
Searchable backtrace

                Stack trace of thread 1105696:
                #0  0x00007f43f2ca774c n/a (libc.so.6 + 0x9774c)
                #1  0x00007f43f2c4ddc0 raise (libc.so.6 + 0x3ddc0)
                #2  0x00007f43f5697d47 _ZN6KCrash19defaultCrashHandlerEi (libKF6Crash.so.6 + 0x7d47)
                #3  0x00007f43f2c4def0 n/a (libc.so.6 + 0x3def0)
                #4  0x00007f43f2cade22 n/a (libc.so.6 + 0x9de22)
                #5  0x00007f43f2ca1fda n/a (libc.so.6 + 0x91fda)
                #6  0x00007f43f2ca264c n/a (libc.so.6 + 0x9264c)
                #7  0x00007f43f2ca4f28 pthread_cond_timedwait (libc.so.6 + 0x94f28)
                #8  0x00007f43f34e9a83 _ZN14QWaitCondition4waitEP6QMutex14QDeadlineTimer (libQt6Core.so.6 + 0x2e9a83)
                #9  0x00007f43ec1c7137 n/a (libQt6XcbQpa.so.6 + 0x33137)
                #10 0x00007f43ec1c7440 n/a (libQt6XcbQpa.so.6 + 0x33440)
                #11 0x00007f43ec1c7b6e n/a (libQt6XcbQpa.so.6 + 0x33b6e)
                #12 0x00007f43f3baecef _ZNK17QInternalMimeData12retrieveDataERK7QString9QMetaType (libQt6Gui.so.6 + 0x1aecef)
                #13 0x00007f43f33a0586 n/a (libQt6Core.so.6 + 0x1a0586)
                #14 0x00007f43f33a1cd8 _ZNK9QMimeData4dataERK7QString (libQt6Core.so.6 + 0x1a1cd8)
                #15 0x00007f43f516eef1 _ZN12KUrlMimeData16urlsFromMimeDataEPK9QMimeData6QFlagsINS_12DecodeOptionEEP4QMapI7QStringS7_E (libKF6CoreAddons.so.6 + 0x69ef1)
                #16 0x00007f43f5a40ff7 _ZN3KIO15pasteActionTextEPK9QMimeDataPbRK9KFileItem (libKF6KIOWidgets.so.6 + 0xa1ff7)
                #17 0x00007f43f5d53376 _ZNK11DolphinView9pasteInfoEv (libdolphinprivate.so.6 + 0x121376)
                #18 0x000056273865dd77 n/a (/usr/bin/dolphin + 0x52d77)
                #19 0x00007f43f33b6cc9 n/a (libQt6Core.so.6 + 0x1b6cc9)
                #20 0x00007f43f5d62889 _ZN11DolphinView29slotDirectoryLoadingCompletedEv (libdolphinprivate.so.6 + 0x130889)
                #21 0x00007f43f33b6cc9 n/a (libQt6Core.so.6 + 0x1b6cc9)
                #22 0x00007f43f33b6cc9 n/a (libQt6Core.so.6 + 0x1b6cc9)
                #23 0x00007f43f57939b3 _ZN14KCoreDirLister19listingDirCompletedERK4QUrl (libKF6KIOCore.so.6 + 0xf49b3)
                #24 0x00007f43f5787a3c n/a (libKF6KIOCore.so.6 + 0xe8a3c)
                #25 0x00007f43f5787c86 n/a (libKF6KIOCore.so.6 + 0xe8c86)
                #26 0x00007f43f33a54aa _ZN7QObject5eventEP6QEvent (libQt6Core.so.6 + 0x1a54aa)
                #27 0x00007f43f44fed9e _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt6Widgets.so.6 + 0xfed9e)
                #28 0x00007f43f335a018 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt6Core.so.6 + 0x15a018)
                #29 0x00007f43f335a3f2 _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData (libQt6Core.so.6 + 0x15a3f2)
                #30 0x00007f43f35cfea8 n/a (libQt6Core.so.6 + 0x3cfea8)
                #31 0x00007f43f0ba887d n/a (libglib-2.0.so.0 + 0x5e87d)
                #32 0x00007f43f0ba9cd7 n/a (libglib-2.0.so.0 + 0x5fcd7)
                #33 0x00007f43f0ba9ee5 g_main_context_iteration (libglib-2.0.so.0 + 0x5fee5)
                #34 0x00007f43f35cd59d _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0x3cd59d)
                #35 0x00007f43f3365376 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x165376)
                #36 0x00007f43f335d159 _ZN16QCoreApplication4execEv (libQt6Core.so.6 + 0x15d159)
                #37 0x0000562738653d37 n/a (/usr/bin/dolphin + 0x48d37)
                #38 0x00007f43f2c376b5 n/a (libc.so.6 + 0x276b5)
                #39 0x00007f43f2c37769 __libc_start_main (libc.so.6 + 0x27769)
                #40 0x0000562738654fa5 n/a (/usr/bin/dolphin + 0x49fa5)
Comment 2 Dave Connett 2025-06-09 13:51:04 UTC
Created attachment 182119 [details]
bt full output

Wanted to add this bt full output separate from the other one, as it might have not been seen.