GNOME Bugzilla – Bug 710094
gnome-music crashes when trying to play certain songs
Last modified: 2013-10-15 11:03:00 UTC
Created attachment 257245 [details] [review] Fix for the crash when title is not found When trying to play certain songs, gnome-music crashes. These songs return None on the item.get_title() property. VLC shows that the title exists in the details though. This is the output: Detected new source available: 'Tracker' and it supports search Traceback (most recent call last):
+ Trace 232609
'gnome-music')
I also created a dirty patch that temporarily fixes the issue, but since the title exists but music cannot read it, it should be fixed more thoroughly.
sorry, the issue was in line 85 upstream and NOT 87. What I copied was the output after some modifications I made when creating the patch.
Review of attachment 257245 [details] [review]: Thanks for the patch! However, to get the title, a method is available in gnome-music which uses "Untitled" as title if it doesn't exists. Also, we prefer a git patch, though if you can't provide one, we could just create one with author set to "Jack Gurulian" with e-mail the same as your bugzilla e-mail. ::: notification.py @@ +78,3 @@ album = item.get_string(Grl.METADATA_KEY_ALBUM)\ or _("Unknown Album") + title = item.get_title()\ Use AlbumArtCache.get_media_title to get title instead.
*** Bug 710161 has been marked as a duplicate of this bug. ***
I have not created a git patch before, so hopefully I did not do something wrong. Here is the patch, along with the proposed changes. It works fine with me. Also, in order to stay in constant with the "Untitled" message, I switched the previous message I had. I know that a more solid solution should be given, since gnome-music does not really return "Untitled" on malformed titles, but I do not have time to look into it before the weekend.
Created attachment 257331 [details] [review] git patch fix Fixed a crash that occurred when a song with a title that could not be read correctly was selected (bug 710094)
Review of attachment 257331 [details] [review]: ::: gnomemusic/notification.py @@ +79,3 @@ or _("Unknown Album") + title = AlbumArtCache.get_media_title(item)\ + or _("Untitled") 'get_media_title' already sets unknown title to '_("Unknown")' so the last part is not needed
You are right, sorry about that. Here you go!
Created attachment 257341 [details] [review] git patch fix
Thanks, Jack! Committed as efb6a7c to gnome-3-10 (will appear in 3.10.2) Committed as 915c729 to master (will appear in 3.11)