GNOME Bugzilla – Bug 731613
gnome-music-3.12.2 fails to start if xdg default directories are not created
Last modified: 2015-01-09 11:26:41 UTC
As reported downstream at: https://bugs.gentoo.org/show_bug.cgi?id=512300 gnome-music fails to start if xdg directories are missing in home directory: # gnome-music /usr/lib64/python3.3/site-packages/gi/module.py:178: Warning: g_array_append_vals: assertion 'array' failed g_type = info.get_g_type() /usr/lib64/python3.3/site-packages/gi/module.py:178: Warning: g_hash_table_lookup: assertion 'hash_table != NULL' failed g_type = info.get_g_type() /usr/lib64/python3.3/site-packages/gi/module.py:178: Warning: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed g_type = info.get_g_type() Traceback (most recent call last):
+ Trace 233693
from gnomemusic.application import Application
from gnomemusic.window import Window
from gnomemusic.query import Query
class Query():
GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_MUSIC)
Created attachment 281663 [details] [review] A possible workaround for the xdg user dirs does not exist and gnome-music fails to start.. to test the patch comment the line XDG_MUSIC_DIR in ~/.config/user-dirs.dirs It provides a possible workaround to the xdg user dirs does not exist problem... so that atleast the program is able to successfully start and inform the user about the existing problem.....
to test the patch comment the line XDG_MUSIC_DIR line in ~/.config/user-dirs.dirs
Review of attachment 281663 [details] [review]: Allan, any ideas how do we treat 'broken environment' situation? I don't think we should be showing a very detailed error message here. Pranav, if I'm not mistaken you were running Music in LXDE when this error occurred? ::: gnomemusic/view.py @@ +339,3 @@ label = builder.get_object('label1') + if Query.MUSIC_DIR == None: + label.set_label(_('Your Environment is not Configured Properly')) This label is a bit misleading and doesn't help user in any way, we'd better stick to existing "No Music found" label
Maybe it could tell users about review xdg-user-dirs-update usage in their setup (as a hint)
(In reply to comment #4) > Maybe it could tell users about review xdg-user-dirs-update usage in their > setup (as a hint) Yes, That could also be a good Idea.But as Vadim said, we should not display a detailed error message.....so, I think we could stick to the "No Music Found" and I will update the patch likewise......
(In reply to comment #3) > Review of attachment 281663 [details] [review]: > > Allan, any ideas how do we treat 'broken environment' situation? I don't think > we should be showing a very detailed error message here. > > Pranav, if I'm not mistaken you were running Music in LXDE when this error > occurred? > > ::: gnomemusic/view.py > @@ +339,3 @@ > label = builder.get_object('label1') > + if Query.MUSIC_DIR == None: > + label.set_label(_('Your Environment is not Configured Properly')) > > This label is a bit misleading and doesn't help user in any way, we'd better > stick to existing "No Music found" label Hi Vadim, I think the error is not specific to LXDE....cause When I tried running Gnome-music in gnome environment then also it was giving me the error unless and until I ran xdg-user-dirs-update which created the required directories for me... I think this should be added as a dependency to gnome-music package....and for the patch I will change it to "No Music Found" label as for now...
Created attachment 281880 [details] [review] Fixes the bug for xdg-user-dirs not found bug...... Fixes the bug for xdg-user-dirs not found bug......Now, the program displays "No Music Found!" When xdg-user-dirs are not created..
Added The updated patch...
Review of attachment 281880 [details] [review]: minor correction...
Created attachment 281952 [details] [review] Final updated patch Fixed a minor correction in earlier version.....
Hello, Maybe this should be a new bug, but even WITH xdg directories created gnome-music is NOT able to locate them. With this patch the application does indeed start. I have proved that gnome-music can not find the directory by modifying the error message displayed in the first set label of view.py and when gnome-music launches it displays that modified error message. If it was able to locate the directory then the second label should have been displayed. This is clearly an error with gnome-music. I do have tracker 1.0.2 installed even though the requirements for it are not placed anywhere that the end user can find them. Christopher.
Pushed an updated patch as https://git.gnome.org/browse/gnome-music/commit/?id=0444ce2, this is fixed in upcoming 3.15.4 Sorry this took too long, there were several problems with previous patch (e.g. string update, which is not acceptable for stable version)
Cannot it be included to 3.14 branch to get it fixed in next 3.14.x version too then? :) Well, thanks a lot anyway for fixing it :D
Right, pushed https://git.gnome.org/browse/gnome-music/commit/?id=7b072bd to gnome-3-14
Created attachment 294067 [details] [review] Check for xdg-user-dirs-update existence Hello there, I think this still needs a proper check for downstream packagers to know that they should have that kind of compliance. I didn't find a README where I think it should be noted as well.
Review of attachment 294067 [details] [review]: I don't think gnome-music deps (e.g. gtk+) can be built without XDG dirs support, so this is not really required