Bug 459411

Summary: KDE Connect freezes system after incoming call on android phone
Product: [Applications] kdeconnect Reporter: Sheila Flanagan <myviolinsings>
Component: plasmoidAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED DUPLICATE    
Severity: crash CC: cwo.kde, Debraym46, n-fit, tarun.aditya
Priority: NOR    
Version First Reported In: 22.04.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=472528
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Sheila Flanagan 2022-09-19 19:07:53 UTC
SUMMARY
KDE Connect freezes system momentarily after receiving a call on the connected android phone.,

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
Application: KDE Connect Daemon (kdeconnectd), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f45615b80fd in KNotification::id() () from /lib/x86_64-linux-gnu/libKF5Notifications.so.5
#5  0x00007f45615b8312 in ?? () from /lib/x86_64-linux-gnu/libKF5Notifications.so.5
#6  0x00007f456023e793 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f45615b3ba3 in KNotificationPlugin::finished(KNotification*) () from /lib/x86_64-linux-gnu/libKF5Notifications.so.5
#8  0x00007f456023441e in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f4560cf6713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007f4560206e3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f4560209f27 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007f4560260a67 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f455e75ed1b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007f455e7b36f8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007f455e75c3c3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007f45602600b8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f456020575b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007f456020dcf4 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x000055bd41a64fad in ?? ()
#20 0x00007f455fb22d90 in __libc_start_call_main (main=main@entry=0x55bd41a64b70, argc=argc@entry=1, argv=argv@entry=0x7fff317da858) at ../sysdeps/nptl/libc_start_call_main.h:58
#21 0x00007f455fb22e40 in __libc_start_main_impl (main=0x55bd41a64b70, argc=1, argv=0x7fff317da858, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff317da848) at ../csu/libc-start.c:392
#22 0x000055bd41a65235 in _start ()
[Inferior 1 (process 1830) detached]


STEPS TO REPRODUCE
1. Ensure android phone is connected
2. Receive a phone call
3. Wait for system freeze to end or app to crash

OBSERVED RESULT
Once a call comes in, there is a 5-10 second delay before the text and audio notification appear on Kubuntu 22.04 desktop. For a few seconds, you cannot close the notification or select any other app from the task bar. Mouse moves, but nothing highlights or can be selected. After 5-10 seconds, you can dismiss the notification and proceed with system usage as normal. Occasionally, after system freezes, instead of becoming stable again, app crashes with brief notification of "....kdedaemon crash". You can try to report bug, but I never seem to have required files to send a backtrace (debian goodies installed).

EXPECTED RESULT
Audible ringing sound and text notification on desktop should be in sync with android phone ringing. System should not freeze upon receiving a call. System should not crash due to incoming call and the ensuing system freeze.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-47-generic (64-bit)
Graphics Platform: X11
Processors: 16 × Intel® Core™ i9-9900K CPU @ 3.60GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2070/PCIe/SSE2

ADDITIONAL INFORMATION
Comment 1 Eny Tarunaditya 2023-05-28 08:32:05 UTC
Created attachment 159289 [details]
New crash information added by DrKonqi

kdeconnectd (22.04.3) using Qt 5.15.3

The same as described in the previous comment/report happened. 
I'm not sure about this, but I have never faced this issue before, until I enabled a notification alarm sound for specifically when a call comes in; so that may be related. 

Right now, KDE Connect notifies once (alarm plays and media stops playing) when the call starts to come in (and KDE Connect never crashes here).
When I miss the call (as I almost always do), KDE Connect sends another notification (and the alarm gets played again and media pauses again) telling me that I missed the call. **THIS** is when KDE Connect _sometimes_ crashes.

Another instance where it crashes is when a HUGE amount of notifications come in. KDE Connect never crashes before, but after I enbabled a notification alarm (sound), it sometimes crashes. This could be a coincidence, or it might be related. Just to clarify - the huge amount of notifications might come in in 2 cases:
- when KDE Connect first connect to my phone, showing me all notifications that have plied up
- my calendar app shows about 100 or more todos (that have accumulated over time) at an exact time of each day.

-- Backtrace (Reduced):
#4  0x00007fa9ce0b009d in KNotification::id() () from /lib/x86_64-linux-gnu/libKF5Notifications.so.5
[...]
#7  0x00007fa9ce0abba3 in KNotificationPlugin::finished(KNotification*) () from /lib/x86_64-linux-gnu/libKF5Notifications.so.5
#8  0x00007fa9ccae741e in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fa9cd76c713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007fa9ccab9e3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
Comment 2 n-fit 2024-07-22 20:28:54 UTC
this has been driving me insane. sometimes it kills the whole of plasma session in xorg
Comment 3 cwo 2024-08-04 11:51:23 UTC
*** Bug 472528 has been marked as a duplicate of this bug. ***
Comment 4 cwo 2024-08-04 11:52:50 UTC
Thank you for the bug report! Another bug report that seems to cover the same crash has a more informative stack trace, so I'm marking this 
as a duplicate of that one.

*** This bug has been marked as a duplicate of bug 472528 ***