Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Albert is not quit graciously #12

Closed
rhoconlinux opened this issue Jan 27, 2015 · 37 comments
Closed

Albert is not quit graciously #12

rhoconlinux opened this issue Jan 27, 2015 · 37 comments
Labels
Bug P2 High Fix asap. Issue which ultimately pisses off most/every users. No blocker though.

Comments

@rhoconlinux
Copy link

Hi there, awesome awesome work!
I noticed that my settings (in special my custom keyboard shortcut to launch the program) are not saved. During the session it recongnizes the changes but apparently it doesn't write any conf file anywhere. When I kill the app using killall albert all my settings are restored to the default.

Im on ubuntu 1404 and I changed the launch key to f12, just in case this might be the issue.

Thanks!
ps. I also noticed that one can tweak a little bit the themes available. I created my own specially because of the font size (too big for me) and realized that the bottom panel doesn't grab the font size option. :)
ps2. I'm using the webupd8 ppa

@Huaba
Copy link

Huaba commented Jan 31, 2015

Same here on Ubuntu 14.04 with the webupd8 ppa. All settings are restored to the default after restart.

@sagikazarmark
Copy link

Same here with the same env above, except I am on 14.10

@sagikazarmark
Copy link

Manual fix:

Edit $HOME/.config/albert/albert.conf and replace hotkey= line with hotkey=Ctrl+Space or any other custom hotkey.

@ManuelSchneid3r
Copy link
Member

Sorry guys, I will fix this soon. Currently I am busy with my studies. I will do it after the examination period.

@rhoconlinux
Copy link
Author

thanks! :D
solved using @sagikazarmark workaround. A one-liner that solves the problem. In Ubuntu and derivatives, just copy and paste the code in a terminal depending on the desired hotkey.

Setting f12 as hotkey [IT IS ONE LINE]:

touch $HOME/.config/albert/albert.conf && echo "hotkey=f12" > $HOME/.config/albert/albert.conf

Setting Ctrl+Space as hotkey [IT IS ONE LINE]:

touch $HOME/.config/albert/albert.conf && echo "hotkey=Ctrl+Space" > $HOME/.config/albert/albert.conf

cheers! 👍

@keevitaja
Copy link

@rhoconlinux & others: how does this solve the problem? Each time i start the albert app, it rewrites the config file again!

@sagikazarmark
Copy link

sagikazarmark commented Feb 19, 2015 via email

@rhoconlinux
Copy link
Author

@keevitaja well... it seems like it doesn't write anything actually. That's the bug: Abert does't write the config file at user level at all.

As @sagikazarmark say, it doesn't update the hotkey... moreover, this affect EVERY setting you want to modify.

After I run the lines I posted above I didn't had any problems concerning the config file. Of course, would be nice to see where are the other options that appear in the GUI and what is the syntax to modifying them. But regarding the keymap issue, the workaround above worked for me for a while now.

Cheers!

PS: I noticed that every time I install a new application I have to rebuild manually the app index. That's kinda of inconvenient considering that it is built in milliseconds. So, probably a function that rebuilds the app index every time Albert is called could be a nice and handful improvement. :)

PS2: Does anybody know a way to disable modules? For instance if I want Albert to be just a super fast app launcher (and not, lets say, to be able to search on internet). Ideas? ...(probably this should go to another issue). 👍

This was referenced Feb 26, 2015
@ManuelSchneid3r
Copy link
Member

Hmm curious. Could somebody please check if this problem persists if you close albert via "F4", instead of rebooting/killing it? Regards

@keevitaja
Copy link

@ManuelSchneid3r yes, if you close the app with F4, the configuration is saved.

Btw there is one weird issue with fuzzy search. Not sure if it is a bug but:

qBittorrent can be search with qbit and bittor but not with torrent

And to autostart Albert i had to add the 5 sec delay!

@rhoconlinux you can remove the fileindex folders and rebuild the index!

@rhoconlinux
Copy link
Author

@keevitaja sorry, i didn't get it. What should I do in order to autobuild the index every time I call Albert?
...I tryed searching the indexed stuff but without luck. Is that data in a single file? would be awesome to know where it is. :)
Thanks

@ManuelSchneid3r
Copy link
Member

".local/share/albert/". It will move to "~/.cache/albert/" soon. But you will have no luck. It is binary.

What should I do in order to autobuild the index every time I call Albert?

As far as I remember none of the versions accomplishes this. I was working on a filesystem-watching design until I realized, that the current architecture is not future-proof. Please wait a while albert is undergoing heavy changes atm.

@keevitaja
Copy link

Can't wait for the new release!

@mektor
Copy link

mektor commented Aug 29, 2015

vim /$HOME/.config/albert/albert.conf
Then you write you own. Example.
Hotkey=Ctrl+Space
Hotkey=F2
Then you save changes and exit, modify access type of the file so it end up with -r--r--r-- and albert will only be able to read from it, and not modify it.
:wq
chmod u-r albert.conf
your are ready to go with albert.

@ManuelSchneid3r
Copy link
Member

Please tell me if this is still an issue with 0.7

@geckolinux
Copy link

Hi @ManuelSchneid3r I just installed Albert 0.7 on Arch, and it still doesn't save the config file.

@ManuelSchneid3r
Copy link
Member

How do you produce this issue? Please do the following,

killall -9 albert # Stop albert
rm -r ~/.config/albert # remove its config prior 0.7
rm -r ~/.config/manuelschneid3r # remove its 0.7 config
rm -r ~/.local/share/albert # remove its data
albert >> ~/albertdebug.txt 2>&1 # start and write output to a file

reproduce the issue and send me the file (@gmail.com)
Thank you.

@geckolinux
Copy link

Working great now on first run with no pre-existing configs. Thanks!

@ManuelSchneid3r ManuelSchneid3r changed the title settings are not saved (alpha 0.5) settings are not saved Oct 8, 2015
@SummerShaheen
Copy link

@rhoconlinux when i type this command "touch $HOME/.config/albert/albert.conf && echo "hotkey=ctrl+space" > $HOME/.config/albert/albert.conf "
in the terminal, it gives me " cannot touch ‘/home/summer/.config/albert/albert.conf’: No such file or directory"

@ManuelSchneid3r
Copy link
Member

The error message is not an issue of albert. Its from touch and most likely the folder is missing. However this is not the config folder. ~/.config/manuelschneid3r/albert.conf (since 0.7.. im not sure) is the correct place for the config. But this will change in the furture to ~/.config/albert/albert.conf or ~/.config/albert.conf. I know this is annoying but albert ist still alpha. I'm just a regular student and my time is finite, so please bare with me.

You can just ignore this problem by not using the raw config file and use the graphical frontend for changing setting. This is the recommended way for end users since there is no chance for typos or any other problems.

So please do not edit the config file by hand, if you are not forced to do so. If you are forced to do so, you are most likely using an old version/ppa of albert, if not please open an issue.

@SummerShaheen
Copy link

i just added albert to the startup applications and everything's working fine now, thank you.

@ManuelSchneid3r
Copy link
Member

Oomph looks like SIGTERM is not the only way apps get terminated...

@ManuelSchneid3r ManuelSchneid3r changed the title settings are not saved Albert is not quit graciously Mar 14, 2016
@ManuelSchneid3r
Copy link
Member

@tepf Could you please post your environment (use the issue template)?

@ManuelSchneid3r ManuelSchneid3r added the Bug P2 High Fix asap. Issue which ultimately pisses off most/every users. No blocker though. label Mar 14, 2016
@ManuelSchneid3r ManuelSchneid3r added this to the v0.9 milestone Mar 15, 2016
@schiegl
Copy link

schiegl commented Mar 15, 2016

@ManuelSchneid3r here it is:

Operating System: Arch Linux
Desktop Environment: XFCE 4.12
Qt Version: 5.5.1-10
Albert Version: 0.8.3-2
Source: AUR

@ManuelSchneid3r
Copy link
Member

Fine, Arch 👍
Please start gdb on the last coredump with coredumpctl gdb, print the backtrace by entering bt and post it here or in a pastebin or send it to me.

@schiegl
Copy link

schiegl commented Mar 15, 2016

I copied the whole log because I am not sure if did this right (also there is an error)

GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/albert...(no debugging symbols found)...done.
[New LWP 2969]
[New LWP 4192]
[New LWP 3005]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `albert -session 25bbae5c0-c7ff-470b-a420-3cc40dea70ca_1457900334_76818'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f8e47adc0b5 in Applications::Extension::updateIndex() () from /usr/share/albert/plugins/libapplications.so
[Current thread is 1 (Thread 0x7f8e5d05a800 (LWP 2969))]
(gdb) bt
#0  0x00007f8e47adc0b5 in Applications::Extension::updateIndex() () from /usr/share/albert/plugins/libapplications.so
#1  0x00007f8e47ae20db in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Applications::Extension::*)()>::call(void (Applications::Extension::*)(), Applications::Extension*, void**) () from /usr/share/albert/plugins/libapplications.so
#2  0x00007f8e47ae195c in void QtPrivate::FunctionPointer<void (Applications::Extension::*)()>::call<QtPrivate::List<>, void>(void (Applications::Extension::*)(), Applications::Extension*, void**) () from /usr/share/albert/plugins/libapplications.so
#3  0x00007f8e47ae0d0d in QtPrivate::QSlotObject<void (Applications::Extension::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () from /usr/share/albert/plugins/libapplications.so
#4  0x00007f8e5bdc9f97 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#5  0x00007f8e5bdd7028 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt5Core.so.5
#6  0x00007f8e5bdcaf83 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#7  0x00007f8e5c9cffcc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#8  0x00007f8e5c9d54a6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#9  0x00007f8e5bd9b9ab in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#10 0x00007f8e5bdf115d in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5
#11 0x00007f8e5bdf1699 in ?? () from /usr/lib/libQt5Core.so.5
#12 0x00007f8e5aaa8d87 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#13 0x00007f8e5aaa8fe0 in ?? () from /usr/lib/libglib-2.0.so.0
#14 0x00007f8e5aaa908c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#15 0x00007f8e5bdf233f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#16 0x00007f8e5bd9937a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#17 0x00007f8e5bda133c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#18 0x000000000044754a in AlbertApp::exec() ()
#19 0x0000000000446028 in main ()

@ManuelSchneid3r
Copy link
Member

Okay make an update this is fixed and in 0.8.4 (433fcc7). Thank you.

@schiegl
Copy link

schiegl commented Mar 15, 2016

After the update bt gives me this output:

#0  0x00007f1de2e680b5 in ?? ()
#1  0x0000002100000020 in ?? ()
#2  0x0000002300000022 in ?? ()
#3  0x0000000000000000 in ?? ()

@ManuelSchneid3r
Copy link
Member

Is it still segfaulting? Be careful with coredumpctl gdb it runs gdb on the last crash, which may not be related to albert. Check the man, its not that huge. Can you please post albert output in a pastebin? Just to see where this happens. Works fine for me. Can you reproduce the issue?

@ManuelSchneid3r
Copy link
Member

One of the major problems with this issue is that any abnormal temination will raise this symptoms, since a normal termination is required to serialize all data and the settings. I double checked anything in the serialization and signalhandling. It should be fine. There were a few segfault issues in the last versions which are fixed now. This should solve this problems too.
If this is happening to you again, please leave a comment and maybe some debugging matrial, e.g. a crash dump or at least the debug output. Regards

@excalibur1234
Copy link

One of the major problems with this issue is that any abnormal temination will raise this symptoms, since a normal termination is required to serialize all data and the settings.

how can i terminate albert normally?
there is no entry for albert in man pages, there are no common flags like "albert -h" or "albert --help" and the wiki explains a "ALT+F4" shortcut, which only closes albert's window but does not terminate the albert process running in the back.

when i reboot my system using the "reboot" or "systemctl reboot" command in my terminal, albert complains about non-gracious termination the next time i start it. which command do i have to enter into the settings --> plugins --> system --> reboot box in order to terminate albert normally before i reboot my system?

@ManuelSchneid3r
Copy link
Member

ManuelSchneid3r commented May 15, 2016

how can i terminate albert normally?

The major usecase is you dont. Run albert on session init and session teardown will terminate albert. Well it should. Pretty annoying is that many common sessions do kill the applications.

when i reboot my system using the "reboot" or "systemctl reboot" command in my terminal, albert complains about non-gracious termination the next time i start it.

Exactly. Dont use reboot or systemctl. Session that are terminated from the outside/init process kill its applications. Use your session commands.

which command do i have to enter into the settings --> plugins --> system --> reboot box in order to terminate albert normally before i reboot my system?

Depends on your desktop environment. Which one are you using? Currently there are missing good defaults.

When I talk of kill and terminate I mean sending SIGKILL or SIGTERM.

@excalibur1234
Copy link

i use the git version of lxqt on arch linux.

i start albert when lxqt starts with the command "albert". i found out how to terminate albert graciously:

kill -SIGTERM $(pidof albert)

@ManuelSchneid3r
Copy link
Member

ManuelSchneid3r commented May 15, 2016

Well you can still press Alt+F4 but make sure the hide on close option is disabled in the settings. Further using the context menu on the gear offers the quit action.

kill -SIGTERM $(pidof albert)

yes this works but its a bit overkill

@ManuelSchneid3r
Copy link
Member

ManuelSchneid3r commented May 27, 2016

I opened a collective issue #197 for termination / serialization problems on unix. If you want to track it make sure you watch it. Please continue any discussion related to this problem in #197.

@albertlauncher albertlauncher locked and limited conversation to collaborators Jun 24, 2016
@ManuelSchneid3r ManuelSchneid3r removed this from the v0.9 milestone Sep 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug P2 High Fix asap. Issue which ultimately pisses off most/every users. No blocker though.
Development

No branches or pull requests

10 participants