Bug 399333

Summary: kdeconnectd crashed in clipboardplugin
Product: [Applications] kdeconnect Reporter: Lukáš Karas <lukas.karas>
Component: sailfish-applicationAssignee: Adam Pigg <adam>
Status: REPORTED ---    
Severity: crash CC: justin.zobel, tech
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot

Description Lukáš Karas 2018-10-03 10:21:05 UTC
SUMMARY

I have KDE Connect installed on my Intex phone with Sailfish OS 2.2.1.18. KDE connect is paired and it was connected. After some time, it crashed. I have several coredumps with similar stacktrace, it seems to be reproducible...

STEPS TO REPRODUCE
1. pair
2. connect
3. keep it running and work...

SOFTWARE VERSIONS
KDE Connect (for SFOS): 0.1.1-1
Qt Version: 5.6.3+git6-1.5.2.jolla

ADDITIONAL INFORMATION

log seems not be useful, its tail:

20181003:104436 Debug: TCP connection done (i'm the existing device) (/home/piggz/projects/kdeconnect-kde/core/backends/lan/lanlinkprovider.cpp:256, void LanLinkProvider::connected())
20181003:104436 Debug: Starting server ssl (I'm the client TCP socket) (/home/piggz/projects/kdeconnect-kde/core/backends/lan/lanlinkprovider.cpp:264, void LanLinkProvider::connected())
20181003:104436 Debug: Socket successfully established an SSL connection (/home/piggz/projects/kdeconnect-kde/core/backends/lan/lanlinkprovider.cpp:293, void LanLinkProvider::encrypted())
20181003:104436 Debug: It is a known device "karry@myKubuntu" (/home/piggz/projects/kdeconnect-kde/core/daemon.cpp:195, void Daemon::onNewDeviceLink(const NetworkPacket&, DeviceLink*))
20181003:104436 Debug: Not loading plugin "kdeconnect_mpriscontrol" because device doesn't support it (/home/piggz/projects/kdeconnect-kde/core/pluginloader.cpp:129, QSet<QString> PluginLoader::pluginsForCapabilities(const QSet<QString>&, const QSet<QString>&))
20181003:104436 Debug: Not loading plugin "kdeconnect_lockdevice" because device doesn't support it (/home/piggz/projects/kdeconnect-kde/core/pluginloader.cpp:129, QSet<QString> PluginLoader::pluginsForCapabilities(const QSet<QString>&, const QSet<QString>&))
20181003:104436 Debug: Not loading plugin "kdeconnect_battery" because device doesn't support it (/home/piggz/projects/kdeconnect-kde/core/pluginloader.cpp:129, QSet<QString> PluginLoader::pluginsForCapabilities(const QSet<QString>&, const QSet<QString>&))
20181003:104436 Debug: Registered notifications listener for device "karry@myKubuntu" (/home/piggz/projects/kdeconnect-kde/plugins/sendnotifications/notificationslistener.cpp:60, NotificationsListener::NotificationsListener(KdeConnectPlugin*))
20181003:104503 Debug: Received wakeup (/home/piggz/projects/kdeconnect-kde/sfos/sailfishdaemon.cpp:47, SailfishDaemon::SailfishDaemon(QObject*)::__lambda0)
20181003:104533 Debug: Received wakeup (/home/piggz/projects/kdeconnect-kde/sfos/sailfishdaemon.cpp:47, SailfishDaemon::SailfishDaemon(QObject*)::__lambda0)
20181003:104603 Debug: Received wakeup (/home/piggz/projects/kdeconnect-kde/sfos/sailfishdaemon.cpp:47, SailfishDaemon::SailfishDaemon(QObject*)::__lambda0)
20181003:104633 Debug: Received wakeup (/home/piggz/projects/kdeconnect-kde/sfos/sailfishdaemon.cpp:47, SailfishDaemon::SailfishDaemon(QObject*)::__lambda0)
20181003:104703 Debug: Received wakeup (/home/piggz/projects/kdeconnect-kde/sfos/sailfishdaemon.cpp:47, SailfishDaemon::SailfishDaemon(QObject*)::__lambda0)


(gdb) bt full
#0  QClipboard::setMimeData (this=<optimized out>, src=0x13f1b38, mode=QClipboard::Clipboard) at kernel/qclipboard.cpp:466
        clipboard = <optimized out>
#1  0xb3d06d52 in ClipboardPlugin::receivePacket (this=<optimized out>, np=...) at /home/piggz/projects/kdeconnect-kde/plugins/clipboard/clipboardplugin.cpp:47
        content = {static null = {<No data fields>}, d = 0x11d78f8}
#2  0xb6ebf014 in Device::privateReceivedPacket (this=0x13ae490, np=...) at /home/piggz/projects/kdeconnect-kde/core/device.cpp:403
        plugin = <optimized out>
        __for_range = @0xbe897ea4: {<QListSpecialMethods<KdeConnectPlugin*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {_M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x13021e0}, d = 0x13021e0}}
        plugins = {<QListSpecialMethods<KdeConnectPlugin*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {_M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x13021e0}, d = 0x13021e0}}
        __PRETTY_FUNCTION__ = "void Device::privateReceivedPacket(const NetworkPacket&)"
#3  0xb6c09e94 in call (a=0xbe897fb0, r=<optimized out>, this=0x1309298) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
No locals.
#4  QMetaObject::activate (sender=sender@entry=0x132cc90, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0xbe897fb0) at kernel/qobject.cpp:3715
        obj = {d = 0x1309298}
        receiverInSameThread = <optimized out>
        sw = {receiver = 0x13ae490, previousSender = 0x0, currentSender = {sender = 0x132cc90, signal = 7, ref = 1}, switched = true}
        callFunction = <optimized out>
        receiver = <optimized out>
        method_relative = <optimized out>
        c = 0x13092b0
        last = 0x13092b0
        locker = {val = 3067716864}
        connectionLists = {connectionLists = 0x132d530}
        list = <optimized out>
        signal_index = 7
        empty_argv = {0x0}
        currentThreadId = 0xb43bb000
#5  0xb6c0a22e in QMetaObject::activate (sender=sender@entry=0x132cc90, m=<optimized out>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0xbe897fb0) at kernel/qobject.cpp:3595
No locals.
#6  0xb6ec3756 in DeviceLink::receivedPacket (this=this@entry=0x132cc90, _t1=...) at /home/piggz/projects/kdeconnect-kde/build/core/moc_devicelink.cpp:208
        _a = {0x0, 0xbe8980b0}
#7  0xb6eaa6c6 in LanDeviceLink::dataReceived (this=0x132cc90) at /home/piggz/projects/kdeconnect-kde/core/backends/lan/landevicelink.cpp:139
        serializedPacket = {d = 0x142b700}
        packet = {static staticMetaObject = {d = {superdata = 0x0, stringdata = 0xb6ecb95c <qt_meta_stringdata_NetworkPacket>, data = 0xb6ecb8e4 <qt_meta_data_NetworkPacket>, static_metacall = 0xb6ec4881 <NetworkPacket::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, 
              extradata = 0x0}}, static s_protocolVersion = 7, m_id = {static null = {<No data fields>}, d = 0x1302198}, m_type = {static null = {<No data fields>}, d = 0x1338380}, m_body = {d = 0x133bef0}, m_payload = {value = 0x0, d = 0x0}, m_payloadSize = 0, m_payloadTransferInfo = {
            d = 0xb6cd3180 <QMapDataBase::shared_null>}}
#8  0xb6c09e94 in call (a=0xbe898160, r=<optimized out>, this=0x132dc90) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
No locals.
#9  QMetaObject::activate (sender=sender@entry=0x12ff3e0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3715
        obj = {d = 0x132dc90}
        receiverInSameThread = <optimized out>
        sw = {receiver = 0x132cc90, previousSender = 0x0, currentSender = {sender = 0x12ff3e0, signal = 3, ref = 1}, switched = true}
        callFunction = <optimized out>
        receiver = <optimized out>
        method_relative = <optimized out>
        c = 0x132d448
        last = 0x132d448
        locker = {val = 3067716864}
        connectionLists = {connectionLists = 0x132d478}
        list = <optimized out>
        signal_index = 3
        empty_argv = {0x0}
        currentThreadId = 0xb43bb000
#10 0xb6c0a22e in QMetaObject::activate (sender=sender@entry=0x12ff3e0, m=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3595
No locals.
#11 0xb6ec389e in SocketLineReader::readyRead (this=this@entry=0x12ff3e0) at /home/piggz/projects/kdeconnect-kde/build/core/moc_socketlinereader.cpp:133
No locals.
#12 0xb6eadb0e in SocketLineReader::dataReceived (this=0x12ff3e0) at /home/piggz/projects/kdeconnect-kde/core/backends/lan/socketlinereader.cpp:51
No locals.
#13 0xb6c09e94 in call (a=0xbe8982e0, r=<optimized out>, this=0x13092e0) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
No locals.
#14 QMetaObject::activate (sender=sender@entry=0x11d9678, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3715
        obj = {d = 0x13092e0}
        receiverInSameThread = <optimized out>
        sw = {receiver = 0x12ff3e0, previousSender = 0x0, currentSender = {sender = 0x11d9678, signal = 3, ref = 1}, switched = true}
        callFunction = <optimized out>
        receiver = <optimized out>
        method_relative = <optimized out>
        c = 0x132d3e8
        last = 0x132d3e8
---Type <return> to continue, or q <return> to quit---
        locker = {val = 3067716408}
        connectionLists = {connectionLists = 0x1302520}
        list = <optimized out>
        signal_index = 3
        empty_argv = {0x0}
        currentThreadId = 0xb43bb000
#15 0xb6c0a22e in QMetaObject::activate (sender=sender@entry=0x11d9678, m=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3595
No locals.
#16 0xb6c5b7da in QIODevice::readyRead (this=this@entry=0x11d9678) at .moc/moc_qiodevice.cpp:159
No locals.
#17 0xb6a08b84 in QSslSocketBackendPrivate::transmit (this=0x12ff0e8) at ssl/qsslsocket_openssl.cpp:1003
        data = {a = 4096, s = 4096, ptr = 0xbe898380 "{\"body\":{\"content\":\"KillMode=none\\n\"},\"id\":\"1538555921236\",\"payloadSize\":0,\"payloadTransferInfo\":{},\"type\":\"kdeconnect.clipboard\"}\n", {
            array = "{\"body\":{\"content\":\"KillMode=none\\n\"},\"id\":\"1538555921236\",\"payloadSize\":0,\"payloadTransferInfo\":{},\"type\":\"kdeconnect.clipboard\"}\n", '\000' <repeats 3964 times>, q_for_alignment_1 = 4189044075680375419, q_for_alignment_2 = 1.1658852219716989e-28}}
        pendingBytes = <optimized out>
        readBytes = 131
        transmitting = <optimized out>
#18 0xb69fe8ea in QSslSocket::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at .moc/moc_qsslsocket.cpp:167
        _t = <optimized out>
#19 0xb6c09b02 in QMetaObject::activate (sender=sender@entry=0x1209fc8, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3730
        receiverInSameThread = <optimized out>
        sw = {receiver = 0x11d9678, previousSender = 0x0, currentSender = {sender = 0x1209fc8, signal = 3, ref = 1}, switched = true}
        callFunction = 0xb69fe7ed <QSslSocket::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>
        receiver = 0x11d9678
        method_relative = <optimized out>
        c = 0x13041c8
        last = 0x13041c8
        locker = {val = 3067716804}
        connectionLists = {connectionLists = 0x12ff658}
        list = <optimized out>
        signal_index = 3
        empty_argv = {0x0}
        currentThreadId = 0xb43bb000
#20 0xb6c0a22e in QMetaObject::activate (sender=sender@entry=0x1209fc8, m=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3595
No locals.
#21 0xb6c5b7da in QIODevice::readyRead (this=this@entry=0x1209fc8) at .moc/moc_qiodevice.cpp:159
No locals.
#22 0xb69e0aa0 in QAbstractSocketPrivate::canReadNotification (this=0x12ff4b8) at socket/qabstractsocket.cpp:736
        r = {varRef = @0x12ff537, oldValue = false}
        rsncrollback = {varRef = @0x12ff534, oldValue = false}
        newBytes = <optimized out>
        hasData = <optimized out>
#23 0xb69e8870 in QReadNotifier::event (this=<optimized out>, e=<optimized out>) at socket/qnativesocketengine.cpp:1205
No locals.
#24 0xb6bec22a in doNotify (event=<optimized out>, receiver=0x13027f0) at kernel/qcoreapplication.cpp:1090
No locals.
#25 QCoreApplication::notify (this=<optimized out>, receiver=0x13027f0, event=<optimized out>) at kernel/qcoreapplication.cpp:1076
No locals.
#26 0xb6bec1ae in QCoreApplication::notifyInternal2 (receiver=0x13027f0, event=event@entry=0xbe899514) at kernel/qcoreapplication.cpp:1015
        threadData = 0x11d4be0
        loopLevelCounter = {threadData = 0x11d4be0}
        selfRequired = true
        result = false
        cbdata = {0x13027f0, 0xbe899514, 0xbe8994e0}
        d = <optimized out>
#27 0xb6c24f16 in sendEvent (event=0xbe899514, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:225
No locals.
#28 socketNotifierSourceDispatch (source=0x11d5e28) at kernel/qeventdispatcher_glib.cpp:102
        p = <optimized out>
        i = 3
        systrace = {m_module = 0xb6c87958 "io", m_tracepoint = 0xb6c8f49c "QEventDispatcher::socketNotifierSourceDispatch"}
        event = {_vptr.QEvent = 0xb6d8f370 <vtable for QEvent+8>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0xb6d89984 <qt_meta_stringdata_QEvent>, data = 0xb6d893e8 <qt_meta_data_QEvent>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}, d = 0x0, t = 50, posted = 0, spont = 0, 
          m_accept = 1, reserved = 5851}
#29 0xb46f918a in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#30 0xb46f931e in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#31 0xb46f939a in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#32 0xb6c24504 in QEventDispatcherGlib::processEvents (this=0x11d59f8, flags=...) at kernel/qeventdispatcher_glib.cpp:423
---Type <return> to continue, or q <return> to quit---
        systrace = {m_module = 0xb6c87958 "io", m_tracepoint = 0xb6c8f424 "QEventDispatcher::processEvents"}
        canWait = true
        savedFlags = {i = 0}
        d = 0x11d5c58
        result = <optimized out>
#33 0xb6beabca in QEventLoop::exec (this=this@entry=0xbe899638, flags=flags@entry=...) at kernel/qeventloop.cpp:206
        locker = {val = 18697336}
        ref = {d = 0x13022c0, locker = @0xbe8995f0, exceptionCaught = true}
        d = 0x13022c0
#34 0xb6bf028a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1285
        threadData = 0x11d4be0
        eventLoop = {<QObject> = {_vptr.QObject = 0xb6d90d80 <vtable for QEventLoop+8>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0xb6d31c40 <qt_meta_stringdata_QObject>, data = 0xb6d31d18 <qt_meta_data_QObject>, 
                static_metacall = 0xb6c0f155 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x13022c0}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0xb6d76e04 <qt_meta_stringdata_Qt>, 
                data = 0xb6d74390 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0xb6d8f514 <QObject::staticMetaObject>, stringdata = 0xb6d89050 <qt_meta_stringdata_QEventLoop>, data = 0xb6d89098 <qt_meta_data_QEventLoop>, 
              static_metacall = 0xb6c5e0fd <QEventLoop::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}
        returnCode = <optimized out>
#35 0x00011f9c in main ()
No symbol table info available.
Comment 1 Lukáš Karas 2018-10-25 06:06:15 UTC
Current version (1.3.1) fixes the crashes by disabling clipboard plugin. It is more or less workaround, working clipboard plugin would be great! 

But I understand that provide clipboard support on Wayland may be difficult, it should be resolved in Qt codebase...
Comment 2 forestedge 2022-10-15 08:00:09 UTC
Created attachment 152827 [details]
Screenshot

in

in the settings window - s. screenshot, the website https://aiix.tk/ is linked, which seems to be no longer online. This website causes the message:

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1.  open KDE Connect settings
2. available moduls -> Bigscreen -> about
3. open website  https://aiix.tk/ 

OBSERVED RESULT
Message:
Hmm. We’re having trouble finding that site.
We can’t connect to the server at aiix.tk.
If you entered the right address, you can:

    Try again later
    Check your network connection
    Check that Firefox has permission to access the web (you might be connected but behind a firewall)

EXPECTED RESULT
Website-Content

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION