Bug 449276 - kdeconnectd intermittent crash while in the background
Summary: kdeconnectd intermittent crash while in the background
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: VHI crash
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords: drkonqi
: 449529 449534 449745 450907 451190 451937 452002 452537 452604 452843 454331 456111 459014 462565 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-28 01:18 UTC by Tejas Guruswamy
Modified: 2022-12-04 13:34 UTC (History)
20 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.04


Attachments
New crash information added by DrKonqi (5.95 KB, text/plain)
2022-01-30 18:15 UTC, Ilgaz Öcal
Details
New crash information added by DrKonqi (6.66 KB, text/plain)
2022-02-17 10:15 UTC, Jaime Torres
Details
New crash information added by DrKonqi (5.77 KB, text/plain)
2022-02-26 16:41 UTC, 林博仁(Buo-ren, Lin)
Details
New crash information added by DrKonqi (5.05 KB, text/plain)
2022-03-02 08:27 UTC, Michael Prager
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tejas Guruswamy 2022-01-28 01:18:56 UTC
Application: kdeconnectd (21.12.1)

Qt Version: 5.15.2
Frameworks Version: 5.90.0
Operating System: Linux 5.16.1-1-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.23.5 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
Kdeconnectd crashes intermittently but repeatably during normal usage of the desktop, not interacting with the software directly.
Crash possibly coincides with a notification on the phone but am not completely sure on the timing.
Also having issues with intermittent Android app crashes so it is possibly some kind of interrupted communication.

Android app version 1.18.1 from Google Play Store

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Connect Daemon (kdeconnectd), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  0x00007fd254b4c314 in (anonymous namespace)::constData (d=...) at kernel/qvariant.cpp:361
#7  qVariantToHelper<QMap<QString, QVariant> > (handlerManager=..., d=...) at kernel/qvariant.cpp:2669
#8  QVariant::toMap (this=0x558644a091a8) at kernel/qvariant.cpp:2721
#9  0x00007fd24c190378 in ConnectivityReportPlugin::receivePacket (np=..., this=<optimized out>) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/plugins/connectivity-report/connectivity_reportplugin.cpp:44
#10 ConnectivityReportPlugin::receivePacket (this=<optimized out>, np=...) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/plugins/connectivity-report/connectivity_reportplugin.cpp:40
#11 0x00007fd2560c8e01 in Device::privateReceivedPacket (this=0x5586447a9c70, np=...) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/core/device.cpp:398
#12 0x00007fd254b354f3 in QtPrivate::QSlotObjectBase::call (a=0x7ffedb5764b0, r=0x5586447a9c70, this=0x5586448770d0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#13 doActivate<false> (sender=0x5586448d2e30, signal_index=7, argv=0x7ffedb5764b0) at kernel/qobject.cpp:3886
#14 0x00007fd254b2e9bf in QMetaObject::activate (sender=sender@entry=0x5586448d2e30, m=<optimized out>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x7ffedb5764b0) at kernel/qobject.cpp:3946
#15 0x00007fd2560b9bfd in DeviceLink::receivedPacket (_t1=..., this=0x5586448d2e30) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/build/core/kdeconnectcore_autogen/CSWKE6ESUK/moc_devicelink.cpp:225
#16 LanDeviceLink::dataReceived (this=0x5586448d2e30) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/core/backends/lan/landevicelink.cpp:135
#17 0x00007fd254b354f3 in QtPrivate::QSlotObjectBase::call (a=0x7ffedb576590, r=0x5586448d2e30, this=0x5586448cbdc0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 doActivate<false> (sender=0x5586449d4230, signal_index=3, argv=0x7ffedb576590) at kernel/qobject.cpp:3886
#19 0x00007fd2560b2114 in SocketLineReader::dataReceived (this=0x5586449d4230) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/core/backends/lan/socketlinereader.cpp:29
#20 0x00007fd254b354f3 in QtPrivate::QSlotObjectBase::call (a=0x7ffedb5766a0, r=0x5586449d4230, this=0x558644970710) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#21 doActivate<false> (sender=0x5586449d9380, signal_index=3, argv=0x7ffedb5766a0) at kernel/qobject.cpp:3886
#22 0x00007fd254b2e9bf in QMetaObject::activate (sender=sender@entry=0x5586449d9380, m=m@entry=0x7fd254dd1280 <QIODevice::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946
#23 0x00007fd254a2d250 in QIODevice::readyRead (this=this@entry=0x5586449d9380) at .moc/moc_qiodevice.cpp:190
#24 0x00007fd254254705 in QSslSocketBackendPrivate::transmit (this=0x5586446f7c10) at ssl/qsslsocket_openssl.cpp:1162
#25 0x00007fd254b35528 in doActivate<false> (sender=0x5586449f9600, signal_index=3, argv=0x7ffedb577810) at kernel/qobject.cpp:3898
#26 0x00007fd254b2e9bf in QMetaObject::activate (sender=sender@entry=0x5586449f9600, m=m@entry=0x7fd254dd1280 <QIODevice::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946
#27 0x00007fd254a2d250 in QIODevice::readyRead (this=this@entry=0x5586449f9600) at .moc/moc_qiodevice.cpp:190
#28 0x00007fd25420beef in QAbstractSocketPrivate::emitReadyRead (channel=0, this=0x5586447f5fe0) at socket/qabstractsocket.cpp:1323
#29 QAbstractSocketPrivate::canReadNotification (this=0x5586447f5fe0) at socket/qabstractsocket.cpp:748
#30 0x00007fd254221ca1 in QReadNotifier::event (this=<optimized out>, e=<optimized out>) at socket/qnativesocketengine.cpp:1274
#31 0x00007fd255741a7f in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x558644926270, e=0x7ffedb577950) at kernel/qapplication.cpp:3632
#32 0x00007fd254afee2a in QCoreApplication::notifyInternal2 (receiver=0x558644926270, event=0x7ffedb577950) at kernel/qcoreapplication.cpp:1064
#33 0x00007fd254b56f1d in socketNotifierSourceDispatch (source=source@entry=0x55864469a340) at kernel/qeventdispatcher_glib.cpp:107
#34 0x00007fd252f9dd9f in g_main_dispatch (context=0x7fd248005000) at ../glib/gmain.c:3381
#35 g_main_context_dispatch (context=0x7fd248005000) at ../glib/gmain.c:4099
#36 0x00007fd252f9e128 in g_main_context_iterate (context=context@entry=0x7fd248005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#37 0x00007fd252f9e1df in g_main_context_iteration (context=0x7fd248005000, may_block=1) at ../glib/gmain.c:4240
#38 0x00007fd254b56364 in QEventDispatcherGlib::processEvents (this=0x55864469a3b0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#39 0x00007fd254afd82b in QEventLoop::exec (this=this@entry=0x7ffedb577b60, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#40 0x00007fd254b05b00 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#41 0x00007fd254f4f25c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#42 0x00007fd2557419f5 in QApplication::exec () at kernel/qapplication.cpp:2824
#43 0x0000558643689a34 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/daemon/kdeconnectd.cpp:178
[Inferior 1 (process 1804) detached]

Possible duplicates by query: bug 448005, bug 447060, bug 447059, bug 445771, bug 445475.

Reported using DrKonqi
Comment 1 Ilgaz Öcal 2022-01-30 18:15:44 UTC
Created attachment 146077 [details]
New crash information added by DrKonqi

kdeconnectd (21.12.1) using Qt 5.15.2

- Custom settings of the application:
wayland enabled. Android kdeconnect is in use.

-- Backtrace (Reduced):
#6  0x00007fe6fdf9f314 in (anonymous namespace)::constData (d=...) at kernel/qvariant.cpp:361
#7  qVariantToHelper<QMap<QString, QVariant> > (handlerManager=..., d=...) at kernel/qvariant.cpp:2669
#8  QVariant::toMap (this=0x55a77e174c58) at kernel/qvariant.cpp:2721
#9  0x00007fe6f48b6378 in ConnectivityReportPlugin::receivePacket (np=..., this=<optimized out>) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/plugins/connectivity-report/connectivity_reportplugin.cpp:44
#10 ConnectivityReportPlugin::receivePacket (this=<optimized out>, np=...) at /usr/src/debug/kdeconnect-kde-21.12.1-1.1.x86_64/plugins/connectivity-report/connectivity_reportplugin.cpp:40
Comment 2 Nicolas Fella 2022-02-05 16:21:23 UTC
*** Bug 449529 has been marked as a duplicate of this bug. ***
Comment 3 Nicolas Fella 2022-02-07 14:12:36 UTC
*** Bug 449745 has been marked as a duplicate of this bug. ***
Comment 4 Jaime Torres 2022-02-17 10:15:18 UTC
Created attachment 146854 [details]
New crash information added by DrKonqi

kdeconnectd (21.12.2) using Qt 5.15.2

- What I was doing when the application crashed:
Some minutes before the crash I just disabled in Android the notification syncronization plugin.

-- Backtrace (Reduced):
#6  0x00007f795a553314 in (anonymous namespace)::constData (d=...) at kernel/qvariant.cpp:361
#7  qVariantToHelper<QMap<QString, QVariant> > (handlerManager=<optimized out>, d=<optimized out>) at kernel/qvariant.cpp:2669
#8  QVariant::toMap() const (this=0x7f795c930e68) at kernel/qvariant.cpp:2721
#9  0x00007f794ce45378 in ConnectivityReportPlugin::receivePacket(NetworkPacket const&) (np=<optimized out>, this=<optimized out>) at /usr/src/debug/kdeconnect-kde-21.12.2-1.1.x86_64/plugins/connectivity-report/connectivity_reportplugin.cpp:44
#10 ConnectivityReportPlugin::receivePacket(NetworkPacket const&) (this=<optimized out>, np=<optimized out>) at /usr/src/debug/kdeconnect-kde-21.12.2-1.1.x86_64/plugins/connectivity-report/connectivity_reportplugin.cpp:40
Comment 5 林博仁(Buo-ren, Lin) 2022-02-26 16:41:08 UTC
Created attachment 147150 [details]
New crash information added by DrKonqi

kdeconnectd (21.08.1) using Qt 5.15.2

- What I was doing when the application crashed:

I have connectivity report plugin enabled.

- Additional info

This phone is a XiaoMi POCO F3, which supposed to have 2 SIM card slots.  In my configuration I only have 1 台灣之星==TSTAR SIM card inserted and the preferred network type is set to "NR/LTE/GSM/WCDMA" in the hidden modem settings activity.

Since I only have a 4G subscription I only get LTE/4G(+) in the signal icon in the notification bar.

-- Backtrace (Reduced):
#4  0x00007f1ef11201e4 in (anonymous namespace)::constData (d=...) at kernel/qvariant.cpp:361
#5  qVariantToHelper<QMap<QString, QVariant> > (handlerManager=..., d=...) at kernel/qvariant.cpp:2669
#6  QVariant::toMap (this=0x55a019382b18) at kernel/qvariant.cpp:2721
#7  0x00007f1ee86f17a8 in ConnectivityReportPlugin::receivePacket (np=..., this=<optimized out>) at ./plugins/connectivity-report/connectivity_reportplugin.cpp:44
#8  ConnectivityReportPlugin::receivePacket (this=<optimized out>, np=...) at ./plugins/connectivity-report/connectivity_reportplugin.cpp:40
Comment 6 林博仁(Buo-ren, Lin) 2022-02-26 16:46:13 UTC
- Additional additional info

* In the hidden modem configuration activity the SIM card slot is presented as "Phone 0".
* The phone is running Android 11 based MIUI 12.5.7 Global based stock firmware
Comment 7 林博仁(Buo-ren, Lin) 2022-02-26 16:48:33 UTC
- Workaround

Disable the connectivity report plugin (assuming any side(mobile/pc) would do, though I disabled both sides).
Comment 8 Michael Prager 2022-03-02 08:27:13 UTC
Created attachment 147236 [details]
New crash information added by DrKonqi

kdeconnectd (21.12.2) using Qt 5.15.2

Seeing this crash as well

-- Backtrace (Reduced):
#6  0x00007fd7ee2cd5b4 in (anonymous namespace)::constData (d=...) at kernel/qvariant.cpp:361
#7  qVariantToHelper<QMap<QString, QVariant> > (handlerManager=..., d=...) at kernel/qvariant.cpp:2669
#8  QVariant::toMap (this=0x55c9df6c2078) at kernel/qvariant.cpp:2721
#9  0x00007fd7e0d880c7 in ConnectivityReportPlugin::receivePacket (np=..., this=<optimized out>) at /usr/src/debug/kdeconnect-kde-21.12.2/plugins/connectivity-report/connectivity_reportplugin.cpp:44
#10 ConnectivityReportPlugin::receivePacket (this=<optimized out>, np=...) at /usr/src/debug/kdeconnect-kde-21.12.2/plugins/connectivity-report/connectivity_reportplugin.cpp:40
Comment 9 Michael Prager 2022-03-02 08:41:47 UTC
https://fossies.org/dox/kdeconnect-kde-21.12.2/connectivity__reportplugin_8cpp_source.html

        auto subscriptions = np.get<QVariantMap>(QStringLiteral("signalStrengths"), QVariantMap());
        auto networkInfo = subscriptions.first().toMap();

subscriptions.first() will obviously crash if subscriptions is empty.
Comment 10 Albert Vaca Cintora 2022-03-10 16:36:21 UTC
Git commit ef0efc360f6ac4a9e565fa30e261fcba7e9e508c by Albert Vaca Cintora, on behalf of Michael Prager.
Committed on 10/03/2022 at 16:36.
Pushed by albertvaka into branch 'master'.

[Connectivity Report] Fixed crash if signalStrengths is empty.

M  +10   -8    plugins/connectivity-report/connectivity_reportplugin.cpp

https://invent.kde.org/network/kdeconnect-kde/commit/ef0efc360f6ac4a9e565fa30e261fcba7e9e508c
Comment 11 Nicolas Fella 2022-03-28 22:24:36 UTC
*** Bug 450907 has been marked as a duplicate of this bug. ***
Comment 12 Nicolas Fella 2022-03-28 22:24:52 UTC
*** Bug 452002 has been marked as a duplicate of this bug. ***
Comment 13 Nicolas Fella 2022-03-28 22:25:33 UTC
*** Bug 451937 has been marked as a duplicate of this bug. ***
Comment 14 Nicolas Fella 2022-03-28 22:25:57 UTC
*** Bug 451190 has been marked as a duplicate of this bug. ***
Comment 15 Nicolas Fella 2022-04-12 11:41:59 UTC
*** Bug 452537 has been marked as a duplicate of this bug. ***
Comment 16 Nicolas Fella 2022-04-14 11:13:11 UTC
*** Bug 452604 has been marked as a duplicate of this bug. ***
Comment 17 Nicolas Fella 2022-06-29 12:33:51 UTC
*** Bug 454331 has been marked as a duplicate of this bug. ***
Comment 18 Nicolas Fella 2022-06-29 12:34:21 UTC
*** Bug 452843 has been marked as a duplicate of this bug. ***
Comment 19 Nicolas Fella 2022-06-29 12:34:50 UTC
*** Bug 449534 has been marked as a duplicate of this bug. ***
Comment 20 Nicolas Fella 2022-06-29 12:35:50 UTC
*** Bug 456111 has been marked as a duplicate of this bug. ***
Comment 21 ironman466 2022-07-01 10:12:37 UTC
Created attachment https://bugsfiles.kde.org/attachment.cgi?id=150319
It was originally reported to other thread, but I'm re-reporting it here, as the other thread is marked as duplicate
Below is original contents from the other thread

kdeconnectd (21.12.3) using Qt 5.15.3

KDE Connect crashes on startup, not always, but very often. Although restarting KDE Connect afterward works fine

-- Backtrace (Reduced):
#4  0x00007f4386708d34 in (anonymous namespace)::constData (d=...) at kernel/qvariant.cpp:361
#5  qVariantToHelper<QMap<QString, QVariant> > (handlerManager=<optimized out>, d=<optimized out>) at kernel/qvariant.cpp:2669
#6  QVariant::toMap() const (this=0x5612ec6d54f8) at kernel/qvariant.cpp:2721
#7  0x00007f437857f7a8 in ConnectivityReportPlugin::receivePacket(NetworkPacket const&) (np=<optimized out>, this=<optimized out>) at ./plugins/connectivity-report/connectivity_reportplugin.cpp:44
#8  ConnectivityReportPlugin::receivePacket(NetworkPacket const&) (this=<optimized out>, np=<optimized out>) at ./plugins/connectivity-report/connectivity_reportplugin.cpp:40
Comment 22 林博仁(Buo-ren, Lin) 2022-07-01 10:20:57 UTC
(In reply to ironman466 from comment #21)
> Created attachment https://bugsfiles.kde.org/attachment.cgi?id=150319
> It was originally reported to other thread, but I'm re-reporting it here, as
> the other thread is marked as duplicate

As the code is already fixed upstream, you should instead notify the downstream distribution to backport the patch.
Comment 23 Nicolas Fella 2022-09-12 10:40:06 UTC
*** Bug 459014 has been marked as a duplicate of this bug. ***
Comment 24 Nicolas Fella 2022-12-04 13:06:08 UTC
*** Bug 462565 has been marked as a duplicate of this bug. ***