Bug 129024

Summary: "halt system" with message box open crashes KAlarm on next startup
Product: [Applications] kalarm Reporter: Oliver Grimm <logistikka>
Component: generalAssignee: David Jarvie <djarvie>
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: KAlarm config file for "settings crash"
KAlarm daemon config file for "settings crash"
KAlarm config file for the "startup crash"

Description Oliver Grimm 2006-06-12 09:23:15 UTC
Version:           1.3.9 (using KDE KDE 3.5.2)
OS:                Linux

To reproduce do
- start kalarm
- enter a new reminder (type "message box") with a time stamp one minute later from now
- wait till the message pops up
- press Ctrl-Alt-Del and select "halt system"
- wait till the system is down
- restart your computer
- when KDE tries to run KAlarm on restart it crashes
Comment 1 David Jarvie 2006-06-12 10:35:24 UTC
Can you provide a crash backtrace?

Does a simple logout (as opposed to system shutdown) produce the same crash when you log back on again?

I think that Ctrl-Alt-Del does different things on different systems, and on some it does a hard reboot, so I don't want to risk trying it in case I corrupt my filessystem. To reproduce the problem without doing Ctrl-Alt-Del, what alternative way of shutting down the system can I use? Does the normal KDE logout option of system halt have the same effect?
Comment 2 Oliver Grimm 2006-06-12 13:35:43 UTC
Pressing Ctrl-Alt-Del gives me the KDM logout dialog. Choosing the "shutdown" option there properly logs out and halts the system. I do not see why Ctrl-Alt-Del should trigger different things if it invokes KDM-logout.

Well, I tried to reproduce the crash. Since I am working on a different machine today, I wanted to change the settings such that they resemble the ones of the machine I was working with yesterday. Changing settings-->run_on_demand=yes and (apply or OK) gave me a crash, too. So I cannot reproduce the previous crash succesfully. The auto backtrace of the "settings crash" is

[KCrash handler]
#5  0xb7baae55 in QString::setLength () from /usr/lib/libqt-mt.so.3
#6  0xb7baaef0 in QString::real_detach () from /usr/lib/libqt-mt.so.3
#7  0xb7baf285 in QString::replace () from /usr/lib/libqt-mt.so.3
#8  0xb7baf75c in QString::replace () from /usr/lib/libqt-mt.so.3
#9  0xb7094c2f in KConfigBase::hasKey () from /usr/lib/libkdecore.so.4
#10 0xb70c870d in KConfigBase::writePathEntry () from /usr/lib/libkdecore.so.4
#11 0xb70c8801 in KConfigBase::writePathEntry () from /usr/lib/libkdecore.so.4
#12 0x080dcbd1 in ?? ()
#13 0x081c3d28 in ?? ()
#14 0x081671f0 in Preferences::mMessageColours ()
#15 0x08166e1c in typeinfo for QObject ()
#16 0x00000001 in ?? ()
#17 0x00000000 in ?? ()

A simple logout & login produces the crash, too.

I'll try to get some more backtraces from the other machine.
Comment 3 David Jarvie 2006-06-12 14:06:27 UTC
Could you please supply your KAlarm configuration file from both machines (in the case of the "settings crash", its contents before the crash). The configuration file is kalarmrc, which is likely to be in ~/.kde/share/config/kalarmrc or some similar path - or try $KDEHOME/share/config/kalarmrc. Also, please say exactly what changes you tried to make to the KAlarm configuration before it crashed.

Unfortunately, the crash trace, although it gives a slight clue to what's going wrong, isn't really adequate.
Comment 4 Oliver Grimm 2006-06-12 15:55:50 UTC
Created attachment 16570 [details]
KAlarm config file for "settings crash"
Comment 5 Oliver Grimm 2006-06-12 15:56:32 UTC
Created attachment 16571 [details]
KAlarm daemon config file for "settings crash"
Comment 6 Oliver Grimm 2006-06-12 16:02:05 UTC
I have uploaded the two config files for the "settings crash" case.

To reproduce do
- start KAlarm
- menu --> settings --> click radio box "run on demand"
- uncheck "show icon in system tray"
- click OK or APPLY
- crash(!)

I'll upload the config files of the other machine later.

Maybe someone who compiled it with debug symbols enabled can provide a better backtrace.
Comment 7 David Jarvie 2006-06-12 22:54:16 UTC
I ran KAlarm 1.3.9 on my system, using your kalarmrc, and in the Preferences dialogue, clicked "run on demand" and then unchecked "autostart system tray icon at login" (there is no "show icon in system tray" in the preferences dialogue!), but it did not crash.

Can you confirm that the "show icon in system tray" option which you refer to is in the Preferences dialogue, and is it named "autostart system tray icon at login"?

What distro are you running?
Comment 8 Oliver Grimm 2006-06-13 15:19:50 UTC
well, the preferences (my translation from a German interface) here is set like this:

(x) start reminders with logon (daemon?)
( ) always active
  ( ) ...
  ( ) ...
  ( ) ...
(x) run on demand
  ( ) show icon in system tray

I'm running Debian/testing. I just tried it on a third machine (Debian too) and got the same crash here. Yes, it might be a deb-specific issue... Maybe some more people could confirm/reject my report.
Comment 9 David Jarvie 2006-06-13 21:07:08 UTC
I also run Debian/testing. I tried the settings crash test again, using your config files, but it still doesn't crash on my system (using the version of KAlarm from Debian/testing). I wonder if you could perhaps consider building KAlarm from the source package with better debug output enabled, so that you could give me a usable backtrace? Otherwise, there isn't much else I can do without being able to reproduce the crash.
Comment 10 Oliver Grimm 2006-06-14 16:59:33 UTC
I'm sorry, but I won't build the app from sources right now since I do not have the developers tools installed and my internet connection is just a dialup. Maybe there's someone else who can provide the backtrace with debug symbols, esp. for the settings problem.
Comment 11 David Jarvie 2006-06-15 01:04:53 UTC
Looking again at the backtrace which you supplied, I do wonder if there is some sort of library incompatibility which is causing your problems. It seems to have crashed deep inside the KDE libraries, and when I've seen such things before, it has usually turned out not to be the application which was at fault. Are your Qt and KDE packages all up-to-date? Or perhaps they are, and the problem might go away once some of the packages are updated later.

Can you supply kalarmrc for the crash which you originally reported?
Comment 12 Oliver Grimm 2006-06-15 12:23:54 UTC
Yes, the crash might be caused in the KDE libraries. But it's just the opposite of what you have guessed: the settings crash appears only on those machines that I keep updated on a day-to-day basis. The settings crash does NOT occur on my desktop system where I have many packages not updated. This makes me think that the problem will not go away with updating but instead get worse.

I'll attach the kalarmc for the orginal "startup crash". This is the machine where I do not (yet) get the settings crash.
Comment 13 Oliver Grimm 2006-06-15 12:26:17 UTC
Created attachment 16622 [details]
KAlarm config file for the "startup crash"
Comment 14 David Jarvie 2006-06-15 13:23:57 UTC
It is perfectly possible to have library incompatibilities on a system which is kept up to date. It does happen that library incompatibilities can arise which take some time to be fixed. That happened recently with glib2 and arts, but the incompatibility now seems to have gone away again. As it happens, I haven't updated my system for a couple of weeks, so that could explain why I don't see the settings crash either.

The fact that all the up to date systems have the crash, and both out of date systems (yours and mine) don't have the crash definiely lends support to my suspicion that the settings crash is a library problem, not a KAlarm problem.
Comment 15 David Jarvie 2006-06-17 03:20:57 UTC
The original crash which you reported has now been fixed (for KDE 3.5.4).

I strongly suspect that the other "settings crash" is due to a library problem rather than KAlarm (for the reasons already stated), so I'm marking the bug as fixed. I suggest that you report the other crash to the Debian bug tracking system instead, mentioning this bug report.
Comment 16 Oliver Grimm 2006-06-25 13:18:34 UTC
Debian bug report for settings crash:
Comment 17 Oliver Grimm 2006-07-22 01:09:26 UTC
I'm reopening because I can now supply a decent backtrace for the settings crash. Feel free to close again if it does not help.

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1245324704 (LWP 16145)]
[KCrash handler]
#5  0xb7bd5e55 in QString::setLength () from /usr/lib/libqt-mt.so.3
#6  0xb7bd5ef0 in QString::real_detach () from /usr/lib/libqt-mt.so.3
#7  0xb7bda285 in QString::replace () from /usr/lib/libqt-mt.so.3
#8  0xb7bda75c in QString::replace () from /usr/lib/libqt-mt.so.3
#9  0xb70bfc2f in KConfigBase::hasKey () from /usr/lib/libkdecore.so.4
#10 0xb70f370d in KConfigBase::writePathEntry () from /usr/lib/libkdecore.so.4
#11 0xb70f3801 in KConfigBase::writePathEntry () from /usr/lib/libkdecore.so.4
#12 0x080dcbd1 in Preferences::save (syncToDisc=false)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kalarm/preferences.cpp:402
#13 0x080dd8c0 in MiscPrefTab::apply (this=0x82937b0, syncToDisc=false)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kalarm/prefdlg.cpp:483
#14 0x0809fc29 in KAlarmPrefDlg::slotApply (this=0xbfa344a4)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kalarm/prefdlg.cpp:164
#15 0x0808330c in KAlarmPrefDlg::slotOk (this=0xbfa344a4)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kalarm/prefdlg.cpp:173
#16 0xb68a3609 in KDialogBase::qt_invoke () from /usr/lib/libkdeui.so.4
#17 0x080806d3 in KAlarmPrefDlg::qt_invoke (this=0xb699f380, _id=74, 
    _o=0x9d873008) at ./prefdlg.moc:96
#18 0xb78b954b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#19 0xb78b9fdc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#20 0xb7c53c09 in QButton::clicked () from /usr/lib/libqt-mt.so.3
#21 0xb7954c2c in QButton::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#22 0xb78f3c78 in QWidget::event () from /usr/lib/libqt-mt.so.3
#23 0xb784f87a in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#24 0xb784fdff in QApplication::notify () from /usr/lib/libqt-mt.so.3
#25 0xb715024e in KApplication::notify () from /usr/lib/libkdecore.so.4
#26 0xb77e106f in QApplication::sendSpontaneousEvent ()
   from /usr/lib/libqt-mt.so.3
#27 0xb77dc7a4 in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#28 0xb77dac94 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#29 0xb77f42a2 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#30 0xb7868255 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#31 0xb784e3b9 in QApplication::enter_loop () from /usr/lib/libqt-mt.so.3
#32 0xb7a6c7c4 in QDialog::exec () from /usr/lib/libqt-mt.so.3
#33 0x08110f80 in TrayWindow::slotPreferences (this=0x8266ca8)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kalarm/traywindow.cpp:150
#34 0x08118ca4 in TrayWindow::qt_invoke (this=0x8266ca8, _id=65, 
    _o=0xbfa3462c) at ./traywindow.moc:109
#35 0xb78b954b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#36 0xb78b9fdc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#37 0xb680cf49 in KAction::activated () from /usr/lib/libkdeui.so.4
#38 0xb6846e81 in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#39 0xb686602e in KAction::slotPopupActivated () from /usr/lib/libkdeui.so.4
#40 0xb6866301 in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#41 0xb78b954b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#42 0xb7c4b1a9 in QSignal::signal () from /usr/lib/libqt-mt.so.3
#43 0xb78d6c4c in QSignal::activate () from /usr/lib/libqt-mt.so.3
#44 0xb79de419 in QPopupMenu::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#45 0xb681a041 in KPopupMenu::mouseReleaseEvent () from /usr/lib/libkdeui.so.4
#46 0xb78f3c78 in QWidget::event () from /usr/lib/libqt-mt.so.3
#47 0xb784f87a in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#48 0xb784fdff in QApplication::notify () from /usr/lib/libqt-mt.so.3
#49 0xb715024e in KApplication::notify () from /usr/lib/libkdecore.so.4
#50 0xb77e106f in QApplication::sendSpontaneousEvent ()
   from /usr/lib/libqt-mt.so.3
#51 0xb77dc4f1 in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#52 0xb77dac94 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#53 0xb77f42a2 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#54 0xb7868255 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#55 0xb786817a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#56 0xb784e38d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#57 0x081190ec in main (argc=-1652084728, argv=0x9d873008)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kalarm/main.cpp:126
#58 0xb644deb0 in __libc_start_main () from /lib/tls/libc.so.6
#59 0x08077001 in _start () at ../sysdeps/i386/elf/start.S:119
Comment 18 Oliver Grimm 2006-11-06 10:41:29 UTC
Seems to be fixed in KDE 3.5.5 (Debian/testing).
Comment 19 David Jarvie 2006-11-07 12:25:42 UTC
Good. I couldn't get any further with your latest backtrace - all the indications are that it was a KDE libraries problem of some sort.