Reply to topic

Crash on exit and disable start on login

Horus
Registered Member
Posts
264
Karma
0
OS
Hello,

I'm using the i3 window manager together with a number of KDE applications, mostly kmail and dolphin. I do not use kalarm currently.

Versions are:
Qt: 5.5.1
KDE Frameworks: 5.19.0
KAlarm: 2.11.4-5ak
on Arch Linux.

Other settings regarding KDE is that $QT_QPA_PLATFORMTHEME = qt5ct. Otherwise no KDE5 application had any icons.

1) kalarm crashes with an segmentation fault whenenver I quit it. The (useless) backtrace is:
Code: Select all
Application: KAlarm (kalarm), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[KCrash Handler]
#5  0x00007f0a1d2cfa88 in QIcon::~QIcon() () from /usr/lib/libQt5Gui.so.5
#6  0x00007f0a1d2d8f88 in ?? () from /usr/lib/libQt5Gui.so.5
#7  0x00007f0a1d2d332e in ?? () from /usr/lib/libQt5Gui.so.5
#8  0x00007f0a1d2cfaba in QIcon::~QIcon() () from /usr/lib/libQt5Gui.so.5
#9  0x00007f0a1d2cfae9 in ?? () from /usr/lib/libQt5Gui.so.5
#10 0x00007f0a1c22ec38 in __run_exit_handlers () from /usr/lib/libc.so.6
#11 0x00007f0a1c22ec85 in exit () from /usr/lib/libc.so.6
#12 0x00007f0a1c219717 in __libc_start_main () from /usr/lib/libc.so.6
#13 0x00000000004a8c69 in _start ()

The crash also happens when I use KDE desktop environment.

2) I do not want kalarm to be started when I log in. The respective option is disabled. It also stays disabled after a restart. Still. kalarm starts when I login. This does not happen when using KDE.

I deleted all configuration files I could find, but nothing changed. There is no kalarm related file in ~/.config/autostart.

Thanks!
djarvie
KDE Developer
Posts
66
Karma
0
OS
In relation to the autostart issue, KAlarm is autostarted if ~/.config/kalarmrc contains "Autostart=true" in the [General] section. This is used by kalarm.autostart.desktop (which could be in various locations). Setting Autostart=false should fix it, but since you say that it works correctly under KDE, there may be something else (such as session restoration) which is starting it. I'm not familiar with the i3 window manager, so don't know what it might be doing.


KAlarm author
Horus
Registered Member
Posts
264
Karma
0
OS
Well, there is no Autostart option in kalarmrc

Code: Select all
% grep -i auto .config/kalarmrc
NoAutoStart=true
AskAutoStart=false

(just deleted the file and that's exactly what kalarm created when started and the option to not autostart was set)

i3 is just a window manager, it does not do any session restauration or alike.

/etc/xdg/autostart/kalarm.autostart.desktop contains
Code: Select all
X-KDE-autostart-condition=kalarmrc:General:AutoStart:false
which looks like an option that is only meant to be evaluated by KDE. Deleting this file will probably make the option work on other window managers, too. Doesn't seem like the way it should be for a non-root user.
Horus
Registered Member
Posts
264
Karma
0
OS
Maybe it's that switch statement

Code: Select all
        switch (option)
        {
            case KMessageBox::Yes:
                Preferences::setAutoStart(true);
                Preferences::setNoAutoStart(false);
                break;
            case KMessageBox::No:
                Preferences::setNoAutoStart(true);
                break;
            case KMessageBox::Cancel:
            default:
                return;
        }

in kalarmmap.cpp. Maybe it's missing a Preferences::setAutoStart(false); in case of KMessageBox::No? But that was just quick glance at the code....
djarvie
KDE Developer
Posts
66
Karma
0
OS
The line you quote in kalarm.autostart.desktop, and the code in kalarmapp.cpp, have been unchanged for a several years, and normally work correctly. kalarm.autostart.desktop is designed for all users (whether they are root is irrelevant).

The default value for AutoStart in kalarmrc is false, so your kalarmrc contents are correct if you don't want KAlarm to be started at login using the KDE's default autostart mechanism. Other mechanisms which could be starting KAlarm at login include session restoration, a specific entry in your desktop's autostart list, or via a script.


KAlarm author
Horus
Registered Member
Posts
264
Karma
0
OS
I use dex https://github.com/jceb/dex/ to autostart the files. It does find /etc/xdg/autostart/kalarm.autostart.desktop and evaluates it.

As far as I understand the .desktop file specification https://specifications.freedesktop.org/ ... 01s05.html the Hidden attribute is intended to deactivate a autostart file. /etc/xdg/autostart/kalarm.autostart.desktop does not have Hidden set. The only thing which sounds like it is connected to a disabled autostart is X-KDE-autostart-condition=kalarmrc:General:AutoStart:false and the respective key in ~/.config/kalarmrc is actually set to False. T

However, I haven't found X-KDE-autostart-condition anywhere in the Free Desktop standards. How do you expect it to work on standard compliant parsers? Obviously it works correctly with the KDE desktop file parser.

I hope you intend your app to also work outside of KDE, don't you?
djarvie
KDE Developer
Posts
66
Karma
0
OS
Yes, I would prefer that autostart would work with non-KDE desktops as well. Using X-KDE-autostart-condition is the standard way for KDE applications, which is why KAlarm uses it. If use of a Hidden attribute would make it work in other environments, I would be happy to implement that in addition. Have you tested that out on your system?


KAlarm author
Horus
Registered Member
Posts
264
Karma
0
OS
Hey,

Copying the file from /etc/xdg/autostart to ~/.config/autostart makes it overwrite the global settings. Adding a Hidden=true disables it. I've tested it only with dex, but I'm sure it also works with KDE, since I have other files there, that are disabled that way.

The X-KDE-autostart-condition is a clever idea (automatic connection to a specific config section), but it's ignorant to the the greater Linux ecosystem, which consists of numerous desktop / window managers. Thanks for being open to that!
djarvie
KDE Developer
Posts
66
Karma
0
OS
Autostarting on non-KDE desktops, even when you have disabled it, has now been fixed using the Hidden attribute. The fix has been applied to the 4.14 branch (which is unlikely to ever get another official release by KDE), and it will also be in KDE Applications 16.04.1, which should be released next month.

Thanks for your useful suggestions on this.


KAlarm author

 
Reply to topic

Bookmarks



Who is online

Registered users: 1ykos, Baidu [Spider], Bing [Bot], Exabot [Bot], Google [Bot], hstoellinger, jingmx, manliol, Sogou [Bot], Yahoo [Bot]