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

Most settings still not saved #65

Closed
hotice opened this issue Oct 8, 2015 · 15 comments
Closed

Most settings still not saved #65

hotice opened this issue Oct 8, 2015 · 15 comments

Comments

@hotice
Copy link

hotice commented Oct 8, 2015

Albert 0.7.3: The old hotkey not being saved issue was fixed but saving other settings is not fixed. For instance, if for the Files plugin I check all "Indexed types", then I click "Update index" and I let it index all the files, after I kill it and start it again, all the "Indexed types" are unchecked and it says "0 indexed files". Changing the theme is not saved either and so on...

@cpriego
Copy link

cpriego commented Oct 8, 2015

Same here, installed version 0.7.4 and only the hotkey setting is getting saved.

Trying to troubleshoot I found a funny behaviour, I deleted previous albert settings (deleted the albert folder in .config) and when trying to find the settings I discovered the albert folder was still there but with no settings, then a new folder named manuelschneid3r was there with the settings.

Once again deleted the albert folder and saw it reappear after closing and reopening Albert.

BTW I love the new Yosemite Themes, pretty slick.

@ManuelSchneid3r
Copy link
Member

How do you close albert? Which OS do you use? Which Qt Version is installed? 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 post the results.

Thank you.

@cpriego
Copy link

cpriego commented Oct 8, 2015

OS: Ubuntu 15.04
QT Versions: 5.4.1 and 4.8.6 (default versions in 15.04)
I was closing albert with pkill albert.

I did everything you asked, and here is the output of the file.

Warning: Could not open file "/home/$USER/.local/share/albert/history.dat"
Warning: Could not open file:  "/home/$USER/.local/share/albert/chromebookmarks.dat"
Warning: Could not open file:  "/home/$USER/.local/share/albert/applications.dat"
Warning: Could not open file:  "/home/$USER/.local/share/albert/files.dat"
Warning: Could not open file:  "/home/$USER/.local/share/albert/websearch.dat"
Warning: Unknown icon: "enpass.png"
Warning: QFileSystemWatcher::removePaths: list is empty

@ManuelSchneid3r
Copy link
Member

Are this really all messages? There should be a lot of more informational messages. How did you install albert? The -DCMAKE_INSTALL_PREFIX=/usr part is cruicial. Did you kill it with Ctrl+C?

@TheMuspilli
Copy link

Hello,

first of all: great program, I like Albert very much and love the idea of being DE agnostic.

Now to the issue. Excuse my verbosity, but I hope it might help. ;-)

I followed the procedure 3x in slightely different scenarios, version 0.7.3 (version 0.7.4 has not arrived in the AUR last time I checked).

System: Manjaro, Xfce
QT version: I installed xfce on top of a KDE Plasma5 installation, so I have both Qt5 and Qt4
(and I have no idea how to find out which version is used for what, my taskmanager shows not a single program running with "qt" in it ;-)).

In each case I started with emptied directories, just as you wrote.

Then

  • I defined a hotkey
  • changed the number of proposals
  • changed the theme to my own
  • files plugin: added a directory to index MP3s and folders
  • files plugin: let Albert create the index
  • left the config
  • tested that theme was there
  • tested that the number of proposed items was right
  • tested that Albert would find a MP3 from my collection and give it to the standard app (here SMPlayer)

Each time everything worked just fine while Albert was running.

After that I closed Albert using different ways.

Case1: Closing Albert with Alt-F4
Everything was saved (only on exit, before that only the hotkey was saved to disk)
~/.config/albert - empty
~./config/manuelschneid3r - complete albert.conf with all the right settings
~./local/share/albert - the *.dat for all plugins

Case 2: Closing Albert with "killall -9 albert"
Only the hotkey was saved
~/.config/albert - empty
~./config/manuelschneid3r - albert.conf with only the hotkey
~./local/share/albert - empty

Case 3: did not close Albert, but told the system to shut down (normal shutdown)
Only the hotkey was saved
~/.config/albert - empty
~./config/manuelschneid3r: 3 files, listed below
~./local/share/albert - only applications.dat (though before shuuting down I definitifly used the files plugin and generated an index, and ckecked that this index worked)

Here the details for case 3:

✓ [folognorri@unkulunkulu] ~ $ ls -al ./.config/manuelschneid3r/
insgesamt 20
drwxr-xr-x 2 folognorri users 4096 9. Okt 10:19 .
drwxr-xr-x 59 folognorri users 4096 9. Okt 10:23 ..
-rw-r--r-- 1 folognorri users 28 9. Okt 10:14 albert.conf
-rw-r--r-- 1 folognorri users 25 9. Okt 10:19 albert.conf.lock
-rw-r--r-- 1 folognorri users 182 9. Okt 10:19 albert.conf.n30056

✓ [folognorri@unkulunkulu] ~ $ cat ./.config/manuelschneid3r/albert.conf
[General]
hotkey=Ctrl+Space

✓ [folognorri@unkulunkulu] ~ $ cat ./.config/manuelschneid3r/albert.conf.lock
30056
albert
unkulunkulu

✓ [folognorri@unkulunkulu] ~ $ cat ./.config/manuelschneid3r/albert.conf.n30056
[General]
hotkey=Ctrl+Space

[applications]
fuzzy=false
paths=/home/folognorri/.local/share/applications, /usr/local/share/applications, /usr/share/applications
terminal=xterm -e %1

Restarting Albert the lock file was not touched in any way and also did not prevent that Albert would be started.

And now (finally ;-)) the debugfiles for all three cases:

Case 1 - Alt-F4:

✓ [folognorri@unkulunkulu] ~ $ cat albertdebug_newtoAltF4.txt
Warning: Could not open file "/home/folognorri/.local/share/albert/history.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/files.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/websearch.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/chromebookmarks.dat"
Warning: QFSFileEngine::open: No file name specified
Warning: Could not open ""
Warning: Could not open file: "/home/folognorri/.local/share/albert/applications.dat"
Warning: Unknown icon: "catfish"
Warning: Unknown icon: "gtk-find"
Warning: Unknown icon: "gtk-info"
Warning: Unknown icon: "gtk-execute"
Warning: Unknown icon: "web-browser"
Warning: Unknown icon: "media-cdrom"
Warning: Unknown icon: "media-cdrom"
Warning: Unknown icon: "ssh-askpass-gnome"
Warning: No icon specified in "/usr/share/applications/kde4/pimsettingexporter.desktop"
Warning: Unknown icon: "krename.png"
Warning: libpng warning: iCCP: known incorrect sRGB profile
Warning: QFileSystemWatcher::removePaths: list is empty

Case 2 - killall:

✓ [folognorri@unkulunkulu] ~ $ cat albertdebug_newtokill9.txt
Warning: Could not open file "/home/folognorri/.local/share/albert/history.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/files.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/websearch.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/chromebookmarks.dat"
Warning: QFSFileEngine::open: No file name specified
Warning: Could not open ""
Warning: Could not open file: "/home/folognorri/.local/share/albert/applications.dat"
Warning: Unknown icon: "catfish"
Warning: Unknown icon: "gtk-find"
Warning: Unknown icon: "gtk-info"
Warning: Unknown icon: "gtk-execute"
Warning: Unknown icon: "web-browser"
Warning: Unknown icon: "media-cdrom"
Warning: Unknown icon: "media-cdrom"
Warning: Unknown icon: "ssh-askpass-gnome"
Warning: No icon specified in "/usr/share/applications/kde4/pimsettingexporter.desktop"
Warning: Unknown icon: "krename.png"
Warning: libpng warning: iCCP: known incorrect sRGB profile
Warning: QFileSystemWatcher::removePaths: list is empty
Das ist SMPlayer Version 15.9.0, ausgeführt auf Linux

Case 3 - system shutdwon:

✓ [folognorri@unkulunkulu] ~ $ cat albertdebug_newtoshutdown.txt
Warning: Could not open file "/home/folognorri/.local/share/albert/history.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/files.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/websearch.dat"
Warning: Could not open file: "/home/folognorri/.local/share/albert/chromebookmarks.dat"
Warning: QFSFileEngine::open: No file name specified
Warning: Could not open ""
Warning: Could not open file: "/home/folognorri/.local/share/albert/applications.dat"
Warning: Unknown icon: "catfish"
Warning: Unknown icon: "gtk-find"
Warning: Unknown icon: "gtk-info"
Warning: Unknown icon: "gtk-execute"
Warning: Unknown icon: "web-browser"
Warning: Unknown icon: "media-cdrom"
Warning: Unknown icon: "media-cdrom"
Warning: Unknown icon: "ssh-askpass-gnome"
Warning: No icon specified in "/usr/share/applications/kde4/pimsettingexporter.desktop"
Warning: Unknown icon: "krename.png"
Warning: libpng warning: iCCP: known incorrect sRGB profile
Warning: QFileSystemWatcher::removePaths: list is empty
Das ist SMPlayer Version 15.9.0, ausgeführt auf Linux

Funny enough, Albert does not manage to mention the SMPlayer in the first case, which is the case in which he successfully stores the configuration settings and the index. Butimho he should store settings and index as soon as they are created. For some reason, upon leaving the config he only saves the hotkey and only on an Alt-F4 exit he deigns to write the other config settings and the index to disk. I checked also /tmp and ~/.cache (while Albert was running and worked perfectly well), but could not find traces of Albert there.

Hope this might help to narrow down the issue.
greets, Folo

@cpriego
Copy link

cpriego commented Oct 9, 2015

ManuelSchneid3r: I installed Albert following the instructions in the readme. Implying of course I did compile it with -DCMAKE_INSTALL_PREFIX=/usr, and no, I didn't kill it, it actually completed succesfully.

As a matter of fact, doing what TheMuspilli said (closing albert with ALT+F4) actually worked 😄 it saved all of the settings and the .dat files. The issue seems to be the settings are only being saved when closing albert through ALT+F4. Maybe adding a save button to trigger this actions could be a good temporary option (settings wise) though the indexes would be lost if not saved automatically.

@TheMuspilli
Copy link

I have to make minor corrections to what I wrote.

Though Albert saves his settings if closed with Alt+F4, he seems to just add new settings and not change old ones (probably with the exception of the hotkey). I observed that neither changing the number of proposals (btw: in v 0.7.3 there is a typo "popoals", ignore if already fixed in the latest version ) nor the deactivation of plugins was remembered. But fortunatly the new websearch engines and shortcuts were saved.

Question: is there some forum to exchange tips & tricks around Albert already? I think here would not be the right place to exchange websearch entries or discuss in depth wished for features.

@ManuelSchneid3r
Copy link
Member

Alt+F4 is a standard shutdown. The Qt eventloop leaves and stack unwinding calls the destructors which is intended to serialize all needed stuff. Problem is, that a session shutdown seems to be not a standard shutdown. On my machine everything is fine (thank you cinnamon).

If you could just do one more thing for me: The debugging information in the output is missing, since Release built type was set. Either install albert-git from AUR or build and install with the cmake argument -DCMAKE_BUILD_TYPE=Debug instead of Release. This will be more verbose and print messages about when indexing and serializing is done.

Further I am not sure if the terminal is a good way to debug this since it may be possible that the terminal kills its child processes hard (-9). So detaching the albert process sighup seems to be a good idea: Run nohup 2>&1 albert in a termial and close the terminal. Albert runs detached now and pipes all output into nohup.out. Reboot and send me the file or post here.

Again thank you for your help.

@TheMuspilli
Copy link

@ManuelSchneid3r:
I installed the git-version, made sure that the directories are empty, started this nohup-thingy, made the same changes as mentioned in my first post. Then I rebooted without closing Albert. This time however, the settings and the *.dat were saved. If it is not the new version, then it is something with the other AUR-version.

Before I shut down the system however, I had a look into ~/manuelschneid3r and ~/local/share/albert, and it was the same as before. An albert.conf with the hotkey only and none of the dat files, so they were saved to disk on Albert exiting and not when they were created as settings or index data.

As I cannot attach nohub.out here ("Unfortunately, we don’t support that file type. Try again with a PNG, GIF, JPG, DOCX, PPTX, XLSX, TXT, or PDF"), and I cannot spot an email address anywhere, I just uploaded the file into my SpiderOak account:

https://spideroak.com/browse/share/FoloGnorri127/8tpeIbQQlLXSqId9ieJd

I tested that I can access it, so it should work.

@cpriego
Copy link

cpriego commented Oct 11, 2015

Couldn't load directly the nohup.out but I'll paste here the content:

[PluginManager] Loading plugins.
[Pluginloader] Plugin loaded: "org.manuelschneid3r.albert.extension.applications"
[Applications] Initialize extension
[Applications] Deserializing from "/home/$USER/.local/share/albert/applications.dat"
[Applications] Index update triggered
[Applications] Extension initialized
[Applications] "Indexing desktop entries ..."
[Pluginloader] Plugin loaded: "org.manuelschneid3r.albert.extension.calculator"
[Calculator] Initialize extension
[Calculator] Extension initialized
[Pluginloader] Plugin loaded: "org.manuelschneid3r.albert.extension.websearch"
[Websearch] Initialize extension
[Websearch] Deserializing from "/home/$USER/.local/share/albert/websearch.dat"
[Websearch] Extension initialized
[PluginManager] Loading plugins done.
�[33;1mWarning:�[0;1m QFileSystemWatcher::removePaths: list is empty�[0m
[Applications] "Indexed 189 desktop entries."
�[33;1mWarning:�[0;1m link SVGCleanerId_0 hasn't been detected!�[0m
�[33;1mWarning:�[0;1m link SVGCleanerId_0 hasn't been detected!�[0m
�[33;1mWarning:�[0;1m link SVGCleanerId_0 hasn't been detected!�[0m
�[33;1mWarning:�[0;1m link SVGCleanerId_0 hasn't been detected!�[0m
�[33;1mWarning:�[0;1m link SVGCleanerId_0 hasn't been detected!�[0m
�[33;1mWarning:�[0;1m link SVGCleanerId_0 hasn't been detected!�[0m
[PluginManager] Unloading plugins.
[Applications] Finalize extension
[Applications] Serializing to "/home/$USER/.local/share/albert/applications.dat"
[Applications] Extension finalized
[Websearch] Finalize extension
[Websearch] Serializing to "/home/$USER/.local/share/albert/websearch.dat"
[Websearch] Extension finalized
[PluginManager] Unloading plugins done.

@ohnonot
Copy link

ohnonot commented Oct 12, 2015

i'm having the same issue.
installed albert to archlinux from the AUR.

i just entered "killall tint2" and it opened a web search on that.
i tried disabling the web search plugin, but it requires a restart.
after a restart all settings are reset (i.e. all plugins enabled).
albert created a folder in $HOME/.config/albert, but it's empty.
there's no man page, so i don-t even know how to manually edit the config file (albert -h doesn't help either).

it doesn't even seem to have remembered my last command.

reading this issue, i looked in ~/.config/manuelschneider. there's albert.conf, but no matter what, it only contains

[General]
hotkey=Ctrl+Alt+A

the folders ~/.config/albert and ~/.local/share/albert are empty.

in any case, for me, a launcher that doesn't support shell commands is not useful.

@ManuelSchneid3r
Copy link
Member

@ohnonot Theres #18 which covers your problem.
Is this really still an issue with 0.7.4? All those logs show that the destuctors are called. Hence the settings are saved. Provided the application is teminated with SIGTERM, the eventloop leaves and the destructors of the plugins are called. I contrary if you kill the process with Ctrl-C you can see that the pluginloader does not destruct the plugins, meaning no settings are written.

From what I discovered now is that the reboot comand does not terminate in a nice way.

@ManuelSchneid3r
Copy link
Member

efc07bd should close this, at least I can kill it now with killall albert and the settings are saved. I would appreciate if somebody could confirm this.

@cpriego
Copy link

cpriego commented Oct 12, 2015

ManuelSchneid3r Installed latest build from master, it works!

Both #66 and #65 are already fixed.

Thank you so much, albert is getting more and more amazing every day.

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants