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 710094 - gnome-music crashes when trying to play certain songs
gnome-music crashes when trying to play certain songs
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.10.x
Other Linux
: Normal critical
: 3.10
Assigned To: jack gurulian
gnome-music-maint
: 710161 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-10-14 11:54 UTC by jack gurulian
Modified: 2013-10-15 11:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for the crash when title is not found (770 bytes, patch)
2013-10-14 11:54 UTC, jack gurulian
needs-work Details | Review
git patch fix (820 bytes, patch)
2013-10-15 08:55 UTC, jack gurulian
needs-work Details | Review
git patch fix (717 bytes, patch)
2013-10-15 10:43 UTC, jack gurulian
none Details | Review

Description jack gurulian 2013-10-14 11:54:24 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):
  • File "/usr/lib/python3.3/site-packages/gnomemusic/notification.py", line 87 in _update_track
    'gnome-music')
TypeError: Argument 1 does not allow None as a value

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.
Comment 1 jack gurulian 2013-10-14 11:56:57 UTC
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.
Comment 2 Arnel Borja 2013-10-15 01:45:22 UTC
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.
Comment 3 Vadim Rutkovsky 2013-10-15 07:18:21 UTC
*** Bug 710161 has been marked as a duplicate of this bug. ***
Comment 4 jack gurulian 2013-10-15 08:54:25 UTC
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.
Comment 5 jack gurulian 2013-10-15 08:55:49 UTC
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)
Comment 6 Vadim Rutkovsky 2013-10-15 10:08:18 UTC
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
Comment 7 jack gurulian 2013-10-15 10:43:06 UTC
You are right, sorry about that. Here you go!
Comment 8 jack gurulian 2013-10-15 10:43:45 UTC
Created attachment 257341 [details] [review]
git patch fix
Comment 9 Vadim Rutkovsky 2013-10-15 11:03:00 UTC
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)