After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707938 - gnome-music crashes with TypeError: Argument 0 does not allow None as a value
gnome-music crashes with TypeError: Argument 0 does not allow None as a value
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other All
: Urgent critical
: 3.10
Assigned To: Dominique Leuenberger
gnome-music-maint
: 707870 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-09-11 20:21 UTC by Dominique Leuenberger
Modified: 2013-09-15 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
query: do not return objects where tracker does not have FileDataObject information. (1.09 KB, patch)
2013-09-11 20:22 UTC, Dominique Leuenberger
none Details | Review
query: do not return objects where tracker does not have FileDataObject information. (1.35 KB, patch)
2013-09-12 18:33 UTC, Dominique Leuenberger
needs-work Details | Review
query: do not return objects where tracker does not have FileDataObject information. (1.36 KB, patch)
2013-09-13 17:09 UTC, Dominique Leuenberger
committed Details | Review

Description Dominique Leuenberger 2013-09-11 20:21:59 UTC
gnome-music does not like my music collection:
whenever I switch to 'songs' view, it 'dies' with:
  • File "/usr/lib/python3.3/site-packages/gnomemusic/view.py", line 366 in _add_item
    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.
Comment 1 Dominique Leuenberger 2013-09-11 20:22:01 UTC
Created attachment 254736 [details] [review]
query: do not return objects where tracker does not have FileDataObject information.
Comment 2 Dominique Leuenberger 2013-09-11 20:32:10 UTC
For debugging purpose: I uploaded one flac file to
  https://www.dropbox.com/sh/flf9oud54jcy2pl/K4m0gde0rb

NOTE: This is for debugging purpose only;
Comment 3 Vadim Rutkovsky 2013-09-11 23:51:33 UTC
*** Bug 707870 has been marked as a duplicate of this bug. ***
Comment 4 Igor Gnatenko 2013-09-12 08:13:30 UTC
(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.
Comment 5 Dominique Leuenberger 2013-09-12 08:25:25 UTC
(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...
Comment 6 Arnel Borja 2013-09-12 08:46:36 UTC
(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?
Comment 7 Igor Gnatenko 2013-09-12 09:06:04 UTC
(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?

  • File "/usr/lib/python3.3/site-packages/gnomemusic/grilo.py", line 106 in _callback
    callback(source, param, item)
  • File "/usr/lib/python3.3/site-packages/gnomemusic/widgets.py", line 286 in _on_populate_album_songs
    g_file = Gio.file_new_for_uri(track.get_url())
TypeError: Argument 0 does not allow None as a value

Comment 8 Dominique Leuenberger 2013-09-12 09:08:46 UTC
(In reply to comment #7)

  • File "/usr/lib/python3.3/site-packages/gnomemusic/grilo.py", line 106
  • File "/usr/lib/python3.3/site-packages/gnomemusic/widgets.py", line 286

    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.
Comment 9 Igor Gnatenko 2013-09-12 09:24:33 UTC
(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*
Comment 10 Arnel Borja 2013-09-12 09:42:55 UTC
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).
Comment 11 Dominique Leuenberger 2013-09-12 18:33:22 UTC
Created attachment 254800 [details] [review]
query: do not return objects where tracker does not have FileDataObject information.
Comment 12 Dominique Leuenberger 2013-09-12 18:35:58 UTC
(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.
Comment 13 Igor Gnatenko 2013-09-13 11:49:06 UTC
(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
Comment 14 Arnel Borja 2013-09-13 12:06:41 UTC
(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.)
Comment 15 Vadim Rutkovsky 2013-09-13 12:24:47 UTC
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
Comment 16 Igor Gnatenko 2013-09-13 12:53:57 UTC
(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..
Comment 17 Arnel Borja 2013-09-13 14:48:35 UTC
(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.
Comment 18 Igor Gnatenko 2013-09-13 14:55:59 UTC
(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
Comment 19 Dominique Leuenberger 2013-09-13 15:00:16 UTC
(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)
Comment 20 Dominique Leuenberger 2013-09-13 17:09:03 UTC
Created attachment 254877 [details] [review]
query: do not return objects where tracker does not have FileDataObject information.
Comment 21 Vadim Rutkovsky 2013-09-13 22:01:45 UTC
Review of attachment 254877 [details] [review]:

Looks good. Didn't test it yet though
Comment 22 Igor Gnatenko 2013-09-14 09:38:41 UTC
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 23 Arnel Borja 2013-09-15 13:22:14 UTC
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!
Comment 24 Arnel Borja 2013-09-15 13:23:33 UTC
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.