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 777541 - Crashes as soon as trying to play a song
Crashes as soon as trying to play a song
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.23.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2017-01-20 17:03 UTC by ubri
Modified: 2017-02-13 21:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-music -d output (431.16 KB, text/plain)
2017-01-20 18:06 UTC, ubri
  Details
player.py : Check if the GstElement query was successful before using duration. (1.34 KB, patch)
2017-01-21 12:06 UTC, Abhinav Singh
committed Details | Review

Description ubri 2017-01-20 17:03:32 UTC
Well, the title says it : each time I try to play a song, gnome-music crashes.
Arch linux up-to-date. 
Custom build of gnome-music-3.23.4. 
Output : 
(gnome-music:21447): Grilo-WARNING **: [dleyna] grl-dleyna-servers-manager.c:138: Unable to fetch the list of available servers: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name com.intel.dleyna-server was not provided by any .service files
Traceback (most recent call last):
  • File "/usr/lib/python3.6/site-packages/gnomemusic/player.py", line 980 in _update_position_callback
    self._update_timeout()
  • File "/usr/lib/python3.6/site-packages/gnomemusic/player.py", line 876 in _update_timeout
    timeout_period, self._update_position_callback)
  • File "/usr/lib/python3.6/site-packages/gi/overrides/GLib.py", line 678 in timeout_add
    return GLib.timeout_add(priority, interval, function, *user_data)
OverflowError: -10452 not in range 0 to 4294967295

Comment 1 ubri 2017-01-20 18:06:26 UTC
Created attachment 343913 [details]
gnome-music -d output
Comment 2 Abhinav Singh 2017-01-21 12:06:17 UTC
Created attachment 343949 [details] [review]
player.py : Check if the GstElement query was successful before using duration.

If the query fails then it is a possibility that duration becomes negative, and hence calls to GLib.timeout_add might crash the application.
The query also returns a boolean to indicate success, and it should be used.
Comment 3 Marinus Schraal 2017-02-02 16:20:38 UTC
Review of attachment 343949 [details] [review]:

lgtm

Has the reporter tested this by any chance?
Comment 4 Abhinav Singh 2017-02-03 06:34:07 UTC
(In reply to Marinus Schraal from comment #3)
> Review of attachment 343949 [details] [review] [review]:
> 
> lgtm
> 
> Has the reporter tested this by any chance?

He was present on the IRC when he reported this. He tested the patch and it was working.

PS: I was never able to test it. I tried audios of many sizes but music never crashed for me.
Comment 5 Marinus Schraal 2017-02-13 21:32:28 UTC
I can't reproduce it either, but it might be a local 
configuration/gstreamer version issue. But it is never a bad thing to 
check for the validity of a return value, so nice catch there. Thanks 
for the patch.

I did rewrite the commit msg somewhat.