memory leak in mpris interface

Bug #1333343 reported by Corey Kearney
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nuvola Apps Runtime (Nuvola Player)
Fix Released
Critical
Unassigned

Bug Description

Fix committed to lp:nuvola-player/2.4.x as r835. Will be released in Nuvola Player 2.4.1.
<http://bazaar.launchpad.net/~fenryxo/nuvola-player/2.4.x/revision/835>

Fix committed to lp:nuvola-player as r840. Will be released in Nuvola Player 2.5.0.
<http://bazaar.launchpad.net/~fenryxo/nuvola-player/trunk/revision/840>

Original report:

Nuvolaplayer seems to have a slow leak in the mpris interface. When notifications are turned on memory usage creeps up with every song, turning them off helps but usage is still creeeping. I've only tried google music, as that's all I have a subscription to. I found while messing with dbus, nuvola is doing this in the background:

snkiz@DontPanic:~$ PLAYER=nuvolaplayer
snkiz@DontPanic:~$ qdbus org.mpris.MediaPlayer2.$PLAYER /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.GetAll org.mpris.MediaPlayer2.Player
CanControl: true
CanGoNext: true
CanGoPrevious: true
CanPause: true
CanPlay: false
CanSeek: false
Metadata: mpris:artUrl: file:///home/snkiz/.cache/nuvolaplayer/album_art.3
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
..... repeated many times
.....
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
mpris:trackid: 1
xesam:album: 2001 (Edited Version)
xesam:artist: Dr. Dre
xesam:title: Big Ego's (Edited)
PlaybackStatus: Playing

anything else that is required to fix this, let me know

Revision history for this message
Maxamillion (mtinc2) wrote :

I can confirm that this is definitely a prominent bug in the latest release of nuvola player. It also has quite the adverse effect on qdbus, making it progressively slower to receive information with each new track that is played. After leaving one of my playlists on loop for around 5-6 hours it caused my conky+dzen2 bar marquee to slow to a crawl, with qdbus taking over a second to load the information. And when you're polling dbus for this information several times a second it can be very difficult to deal with.

Revision history for this message
Maxamillion (mtinc2) wrote :

So I found a fix, but unfortunately I'm not exactly the most versed in bzr (or launchpad in general) to actually push this fix into the main project (I'm more of a git person). The problem seems to be that the getter/setter for the metadata recursively inserts the "mpris:trackid" property every time the getter is accessed. To fix it, the insertion for "mpris:trackid" was moved to on_song_changed.

If anyone is interested in fixing this, just use this mpris.vala instead: https://gist.github.com/shinyquagsire23/10b900caf9605d5f4348

Revision history for this message
Corey Kearney (snkiz-deactivatedaccount) wrote :

Hey max nice job. Screwing with conky is how I found it myself. if you write a patch and attach it here I'm sure some one could merge it.

Revision history for this message
Maxamillion (mtinc2) wrote :

Alright, here's a patch. Hopefully this can get in because this bug was quite annoying while I was dealing with it. Memory leaks are never a fun thing to deal with. :P

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Thanks for taking time to report this bug and providing a patch.

Fix committed to lp:nuvola-player/2.4.x as r835. Will be released in Nuvola Player 2.4.1.
<http://bazaar.launchpad.net/~fenryxo/nuvola-player/2.4.x/revision/835>

Fix committed to lp:nuvola-player as r840. Will be released in Nuvola Player 2.5.0.
<http://bazaar.launchpad.net/~fenryxo/nuvola-player/trunk/revision/840>

Changed in nuvola-player:
status: New → Fix Committed
importance: Undecided → Critical
milestone: none → 2.4.1
description: updated
Changed in nuvola-player:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.