GNOME Bugzilla – Bug 707938
gnome-music crashes with TypeError: Argument 0 does not allow None as a value
Last modified: 2013-09-15 13:23:33 UTC
gnome-music does not like my music collection: whenever I switch to 'songs' view, it 'dies' with:
+ Trace 232473
g_file = Gio.file_new_for_uri(item.get_url()) TypeError: Argument 0 does not allow None as a value
(this is with 3.9.91 tarball release) Debugging the output from the tracker query sent, the difference is that some files do not have nfo:FileDataObject information stored (that sounds more like a tracker issue). As a result, gnome-music can not 'find' the file information and 'denies' its service.
Created attachment 254736 [details] [review] query: do not return objects where tracker does not have FileDataObject information.
For debugging purpose: I uploaded one flac file to https://www.dropbox.com/sh/flf9oud54jcy2pl/K4m0gde0rb NOTE: This is for debugging purpose only;
*** Bug 707870 has been marked as a duplicate of this bug. ***
(In reply to comment #1) > Created an attachment (id=254736) [details] [review] > query: do not return objects where tracker does not have FileDataObject > information. hm. I've applied this patch, but g-m crashes.
(In reply to comment #4) > (In reply to comment #1) > > Created an attachment (id=254736) [details] [review] [details] [review] > > query: do not return objects where tracker does not have FileDataObject > > information. > hm. I've applied this patch, but g-m crashes. Crashes how? Different than before? Still on the same file? Note: the patch changes the spaqrl query sent to tracker and basically only requests replies of stuff that has a FileDataObject field...
(In reply to comment #4) > (In reply to comment #1) > > Created an attachment (id=254736) [details] [review] [details] [review] > > query: do not return objects where tracker does not have FileDataObject > > information. > hm. I've applied this patch, but g-m crashes. Is there any backtrace in terminal?
(In reply to comment #6) > (In reply to comment #4) > > (In reply to comment #1) > > > Created an attachment (id=254736) [details] [review] [details] [review] [details] [review] > > > query: do not return objects where tracker does not have FileDataObject > > > information. > > hm. I've applied this patch, but g-m crashes. > > Is there any backtrace in terminal?
+ Trace 232474
callback(source, param, item)
g_file = Gio.file_new_for_uri(track.get_url())
(In reply to comment #7)
+ Trace 232476
g_file = Gio.file_new_for_uri(track.get_url()) That looks 'similar' but is a slightly different entry point to the issue. Very likely there are more queries that could do with the same filter addition.
(In reply to comment #8) I've used my album. bug 707870 ok. can you send patch ? My audio: https://docs.google.com/file/d/0B2_hwQWHTMu7ZGlYYkx0TnBKbEU/edit?usp=sharing *only for testing*
Dominique, could you please fix all queries for this too? In queries.py: SONGS, SONGS_COUNT, album_songs, get_song_with_url (last one is in playlists/freeze-break branch, please put it into a separate patch).
Created attachment 254800 [details] [review] query: do not return objects where tracker does not have FileDataObject information.
(In reply to comment #11) > Created an attachment (id=254800) [details] [review] > query: do not return objects where tracker does not have FileDataObject > information. REplaces previous patch. Solves (in my tests) the 2nd equal crash, which happened when entering 'the album' details.
(In reply to comment #11) > Created an attachment (id=254800) [details] [review] > query: do not return objects where tracker does not have FileDataObject > information. yup. this patch fixes my problem
(In reply to comment #13) > (In reply to comment #11) > > Created an attachment (id=254800) [details] [review] [details] [review] > > query: do not return objects where tracker does not have FileDataObject > > information. > yup. this patch fixes my problem Does the Load More button still shows up even if all songs are already loaded? I'm afraid it does, because it seems the patch doesn't handle it. (I can't reproduce this, so I can't test it myself.)
Review of attachment 254800 [details] [review]: This patch also bumps libgd which potentially can cause other regressions. I don't think its a good idea to bump libgd right before the final release. Please remove libgd part from the patch
(In reply to comment #14) > (In reply to comment #13) > > (In reply to comment #11) > > > Created an attachment (id=254800) [details] [review] [details] [review] [details] [review] > > > query: do not return objects where tracker does not have FileDataObject > > > information. > > yup. this patch fixes my problem > > Does the Load More button still shows up even if all songs are already loaded? > I'm afraid it does, because it seems the patch doesn't handle it. (I can't > reproduce this, so I can't test it myself.) Where I should find this button ? After this patch I can click Artists/Songs/open problematic album w/o/ crash..
(In reply to comment #16) > Where I should find this button ? > > After this patch I can click Artists/Songs/open problematic album w/o/ crash.. When you scroll down to the end of a view, the Load More button will show up if there's more items available. In Songs view, it shouldn't show up because that view will load all items. But if there's something wrong with the count value from tracker, it will show up. So, just go to Songs view then scroll down to end, check if a wide button will show up in the bottom.
(In reply to comment #17) > (In reply to comment #16) > > Where I should find this button ? > > > > After this patch I can click Artists/Songs/open problematic album w/o/ crash.. > > When you scroll down to the end of a view, the Load More button will show up if > there's more items available. In Songs view, it shouldn't show up because that > view will load all items. But if there's something wrong with the count value > from tracker, it will show up. > > So, just go to Songs view then scroll down to end, check if a wide button will > show up in the bottom. yup. I have this button, but they does nothing
(In reply to comment #18) > > So, just go to Songs view then scroll down to end, check if a wide button will > > show up in the bottom. > yup. I have this button, but they does nothing Will update the patch this evening for SOUND_COUNT. Should not be that difficult after all (I could never load all my 7000 files anyway, so never reached this)
Created attachment 254877 [details] [review] query: do not return objects where tracker does not have FileDataObject information.
Review of attachment 254877 [details] [review]: Looks good. Didn't test it yet though
Review of attachment 254877 [details] [review]: Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> At all songs don't see button "Load more" and it doesn't crashes. Thanks
Comment on attachment 254877 [details] [review] query: do not return objects where tracker does not have FileDataObject information. Committed as f1380018. Thank you for the patch!
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.