Bug 447060 - KDE Connect daemon randomly crashes in ClipboardListener::updateClipboard()
Summary: KDE Connect daemon randomly crashes in ClipboardListener::updateClipboard()
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2021-12-16 05:06 UTC by Nate Graham
Modified: 2021-12-17 16:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.90


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2021-12-16 05:06:03 UTC
Application: kdeconnectd (22.03.70)
 (Compiled from sources)
Qt Version: 5.15.2
Frameworks Version: 5.90.0
Operating System: Linux 5.15.6-200.fc35.x86_64 x86_64
Windowing System: Wayland
Distribution: Fedora Linux 35 (KDE Plasma)
DrKonqi: 5.23.80 [KCrashBackend]

-- Information about the crash:
Built-from-source KDE Connect Daemon randomly crashes not clearly in response to anything I or the connected device was doing.

The top item in the clipboard at the time was:

kstart5 -- /home/nate/kde/usr/lib64/libexec/kdeconnectd --replace

The crash can be reproduced sometimes.

-- Backtrace:
Application: KDE Connect Daemon (kdeconnectd), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#5  0x00007f78139b7869 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator-> (this=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:118
#6  qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > const> (ptr=...) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1143
#7  QMimeData::d_func (this=<optimized out>) at kernel/qmimedata.h:92
#8  QMimeData::text (this=0x0) at kernel/qmimedata.cpp:408
#9  0x00007f7813108bdb in KSystemClipboard::text (this=<optimized out>, mode=mode@entry=QClipboard::Clipboard) at /home/nate/kde/src/kguiaddons/src/systemclipboard/ksystemclipboard.cpp:49
#10 0x00007f77fb12638b in ClipboardListener::updateClipboard (this=0xcde800, mode=<optimized out>) at /home/nate/kde/src/kdeconnect-kde/plugins/clipboard/clipboardlistener.cpp:55
#11 0x00007f78139c63e9 in QtPrivate::QSlotObjectBase::call (a=0x7ffec2c96650, r=<optimized out>, this=0xce4ba0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#12 doActivate<false> (sender=0xcd8890, signal_index=3, argv=0x7ffec2c96650) at kernel/qobject.cpp:3886
#13 0x00007f78139c1367 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f7813117080 <KSystemClipboard::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffec2c96650) at kernel/qobject.cpp:3946
#14 0x00007f78130fc6be in KSystemClipboard::changed (this=<optimized out>, _t1=<optimized out>) at /home/nate/kde/build/kguiaddons/src/KF5GuiAddons_autogen/V34PFPZMFK/moc_ksystemclipboard.cpp:134
#15 0x00007f78139c63e9 in QtPrivate::QSlotObjectBase::call (a=0x7ffec2c96700, r=<optimized out>, this=0xca2cb0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#16 doActivate<false> (sender=0xcdf000, signal_index=3, argv=0x7ffec2c96700) at kernel/qobject.cpp:3886
#17 0x00007f780fc60c04 in ffi_call_unix64 () at ../src/x86/unix64.S:76
#18 0x00007f780fc60108 in ffi_call (cif=cif@entry=0x7ffec2c96880, fn=<optimized out>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=avalue@entry=0x7ffec2c96950) at ../src/x86/ffi64.c:525
#19 0x00007f7811f49d10 in wl_closure_invoke (closure=closure@entry=0xf38be0, target=<optimized out>, target@entry=0xca2c50, opcode=opcode@entry=1, data=<optimized out>, flags=<optimized out>) at ../src/connection.c:1018
#20 0x00007f7811f4a41b in dispatch_event (display=display@entry=0x966080, queue=<optimized out>, queue=<optimized out>) at ../src/wayland-client.c:1452
#21 0x00007f7811f4a60c in dispatch_queue (queue=0x966150, display=0x966080) at ../src/wayland-client.c:1598
#22 wl_display_dispatch_queue_pending (display=0x966080, queue=0x966150) at ../src/wayland-client.c:1840
#23 0x00007f7811fd46a3 in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x962540) at /usr/src/debug/qt5-qtwayland-5.15.2-15.fc35.x86_64/src/client/qwaylanddisplay.cpp:222
#24 0x00007f78139c6430 in doActivate<false> (sender=0x9a9570, signal_index=3, argv=0x7ffec2c96c20) at kernel/qobject.cpp:3898
#25 0x00007f78139c1367 in QMetaObject::activate (sender=sender@entry=0x9a9570, m=m@entry=0x7f7813c6b460 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffec2c96c20) at kernel/qobject.cpp:3946
#26 0x00007f78139c8b8a in QSocketNotifier::activated (this=this@entry=0x9a9570, _t1=..., _t2=<optimized out>, _t3=...) at .moc/moc_qsocketnotifier.cpp:178
#27 0x00007f78139c93a3 in QSocketNotifier::event (this=0x9a9570, e=0x7ffec2c96d20) at kernel/qsocketnotifier.cpp:302
#28 0x00007f78146ae443 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x9a9570, e=0x7ffec2c96d20) at kernel/qapplication.cpp:3632
#29 0x00007f78139927d8 in QCoreApplication::notifyInternal2 (receiver=0x9a9570, event=0x7ffec2c96d20) at kernel/qcoreapplication.cpp:1064
#30 0x00007f78139e463f in socketNotifierSourceDispatch (source=0x9a18c0) at kernel/qeventdispatcher_glib.cpp:107
#31 0x00007f78121d4130 in g_main_dispatch (context=0x9a8fb0) at ../glib/gmain.c:3381
#32 g_main_context_dispatch (context=0x9a8fb0) at ../glib/gmain.c:4099
#33 0x00007f7812229208 in g_main_context_iterate.constprop.0 (context=context@entry=0x9a8fb0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#34 0x00007f78121d1933 in g_main_context_iteration (context=0x9a8fb0, may_block=1) at ../glib/gmain.c:4240
#35 0x00007f78139e3bb8 in QEventDispatcherGlib::processEvents (this=0x9a5820, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#36 0x00007f78139911e2 in QEventLoop::exec (this=this@entry=0x7ffec2c96f90, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#37 0x00007f7813999724 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#38 0x00007f7813dd8c40 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1860
#39 0x00007f78146ae3b9 in QApplication::exec () at kernel/qapplication.cpp:2824
#40 0x00000000004039e7 in main (argc=<optimized out>, argv=<optimized out>) at /home/nate/kde/src/kdeconnect-kde/daemon/kdeconnectd.cpp:178
[Inferior 1 (process 884844) detached]

Possible duplicates by query: bug 429402, bug 422615, bug 420613, bug 420158, bug 418076.

Reported using DrKonqi
Comment 1 Méven Car 2021-12-17 09:23:10 UTC
Git commit 6e26121982e9c56be7acd60a6a29107425252a65 by Méven Car, on behalf of Méven Car.
Committed on 17/12/2021 at 09:22.
Pushed by meven into branch 'master'.

KSystemclipboard: add a nullcheck

M  +4    -1    src/systemclipboard/ksystemclipboard.cpp

https://invent.kde.org/frameworks/kguiaddons/commit/6e26121982e9c56be7acd60a6a29107425252a65
Comment 2 Nate Graham 2021-12-17 16:43:41 UTC
That seems to have resolved the crash for me, thanks!