Bug 459901 - Kalarm crashes after boot and defer
Summary: Kalarm crashes after boot and defer
Status: RESOLVED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-10-01 19:50 UTC by Ross
Modified: 2022-10-04 11:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 22.08.2


Attachments
kalarmrc file (3.56 KB, text/plain)
2022-10-03 15:30 UTC, Ross
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ross 2022-10-01 19:50:47 UTC
Application: kalarm (3.5.1 (KDE Gear 22.08.1))

Qt Version: 5.15.6
Frameworks Version: 5.98.0
Operating System: Linux 5.19.10-1-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.25.5 [KCrashBackend]

-- Information about the crash:
When booting the computer and logging into my account, if there is a kalarm alert and I click the defer button, kalarm will crash every time.

Only on booting. Waking from sleep does not cause the crash.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: KAlarm (kalarm), signal: Segmentation fault

[KCrash Handler]
#4  0x0000556eb1b92169 in std::__atomic_base<int>::load (__m=<optimized out>, this=<optimized out>) at /usr/include/c++/12/bits/atomic_base.h:488
#5  QAtomicOps<int>::loadRelaxed<int> (_q_value=..., _q_value=...) at /usr/include/qt5/QtCore/qatomic_cxx11.h:239
#6  QBasicAtomicInteger<int>::loadRelaxed (this=<optimized out>) at /usr/include/qt5/QtCore/qbasicatomic.h:107
#7  QtPrivate::RefCount::isShared (this=<optimized out>) at /usr/include/qt5/QtCore/qrefcount.h:101
#8  QMap<DeferAlarmDlg*, MessageDisplay::DeferDlgData*>::detach (this=<optimized out>) at /usr/include/qt5/QtCore/qmap.h:361
#9  QMap<DeferAlarmDlg*, MessageDisplay::DeferDlgData*>::operator[] (akey=<optimized out>, this=<optimized out>) at /usr/include/qt5/QtCore/qmap.h:680
#10 MainWindow::showDeferAlarmDlg (this=0x0, data=0x556eb3fd7360) at /usr/src/debug/kalarm-22.08.1-1.1.x86_64/src/mainwindow.cpp:1773
#11 0x0000556eb1baa5b8 in MessageDisplay::executeDeferDlg (data=0x556eb3fd7360) at /usr/src/debug/kalarm-22.08.1-1.1.x86_64/src/messagedisplay.cpp:228
#12 MessageWindow::slotDefer (this=0x556eb3df90c0) at /usr/src/debug/kalarm-22.08.1-1.1.x86_64/src/messagewindow.cpp:1186
#13 0x00007f68d459b05d in ?? () from /lib64/libQt5Core.so.5
#14 0x00007f68d5604092 in QAbstractButton::clicked(bool) () from /lib64/libQt5Widgets.so.5
#15 0x00007f68d56042fa in ?? () from /lib64/libQt5Widgets.so.5
#16 0x00007f68d5605b98 in ?? () from /lib64/libQt5Widgets.so.5
#17 0x00007f68d5605db7 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /lib64/libQt5Widgets.so.5
#18 0x00007f68d5553c48 in QWidget::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#19 0x00007f68d55123fe in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#20 0x00007f68d551a922 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#21 0x00007f68d4564178 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#22 0x00007f68d5518a9e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib64/libQt5Widgets.so.5
#23 0x00007f68d556ca68 in ?? () from /lib64/libQt5Widgets.so.5
#24 0x00007f68d556ffc0 in ?? () from /lib64/libQt5Widgets.so.5
#25 0x00007f68d55123fe in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#26 0x00007f68d4564178 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#27 0x00007f68d4c6fa3d in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib64/libQt5Gui.so.5
#28 0x00007f68d4c4338c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Gui.so.5
#29 0x00007f68cf3f60ea in ?? () from /lib64/libQt5XcbQpa.so.5
#30 0x00007f68d239aa50 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#31 0x00007f68d239ae08 in ?? () from /lib64/libglib-2.0.so.0
#32 0x00007f68d239ae9c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#33 0x00007f68d45bb806 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#34 0x00007f68d4562beb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#35 0x00007f68d456ad56 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#36 0x0000556eb1af2986 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kalarm-22.08.1-1.1.x86_64/src/main.cpp:75
[Inferior 1 (process 2245) detached]

Reported using DrKonqi
Comment 1 David Jarvie 2022-10-03 15:09:28 UTC
Can you please attach your KAlarm config file. It should be located at ~/.config/kalarmrc

Also, can you confirm whether there is a KAlarm main window visible when the crash occurs. If not, is KAlarm running in the system tray?
Comment 2 Ross 2022-10-03 15:30:32 UTC
Created attachment 152563 [details]
kalarmrc file

>Also, can you confirm whether there is a KAlarm main window visible when the
>crash occurs. If not, is KAlarm running in the system tray?

The main window is not visible, only the individual alarms. 
Kalarm is running in the system tray. It has been set to start at logon.
Comment 3 Ross 2022-10-03 21:35:25 UTC
Update - after booting the computer today I waited about 30 seconds before clicking the defer button. No crash.

I am wondering if the alarm popup appears before Kalarm has fully loaded, and if clicking "defer" during that loading time will cause the crash?
Comment 4 David Jarvie 2022-10-04 11:28:40 UTC
I haven't been able to reproduce the crash, but it looks as if session restoration of KAlarm hasn't fully worked. Your last comment 3 seems to confirm this - it looks as if it only fully initialises after autostart occurs 30 seconds later. If session restoration had worked properly, the crash wouldn't have happened no matter how soon you clicked defer. I've made a fix which I feel reasonably confident should work, but please test again after you have updated to KDE Gear 22.08.2 or later, and reopen the bug if it still crashes.

The fix is in KAlarm version 3.5.2 which will be released in KDE Gear 22.08.2, commit 97e71e60e1f7deac26547adb4decfe3531d2b376.