Sound indicator works incorrect with playing status

Bug #656947 reported by Vsevolod Velichko
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
The Sound Menu
Fix Released
Medium
Conor Curran
indicator-sound (Ubuntu)
Fix Released
Low
Unassigned
Maverick
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: indicator-sound

I'm the developer of the application, integrating MPD into ubuntu sound menu (https://launchpad.net/mpd-sound-menu), but I've found strange behavior in sound indicator:
When I start my program, it provides MPRISv2 interface and registers in the indicator-sound. However indicator sound receives all track metadata, but doesn't shows current playing status (playing or paused). Only after I pause and unpause the MPD, sound indicator "catches" the current status and shows right icon.
Look at the file attached. Lines marked with ">" are showed when indicator requests the corresponding propert. Lines marked with "<" are showed when my application sends org.freedesktop.DBus.Properties notification about changed property.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: indicator-sound 0.4.7-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic i686
Architecture: i386
Date: Fri Oct 8 18:54:54 2010
ProcEnviron:
 LANGUAGE=pl_PL:pl:ru_RU:ru:en_GB:en
 PATH=(custom, user)
 LANG=pl_PL.utf8
 SHELL=/bin/bash
SourcePackage: indicator-sound

Related branches

Revision history for this message
Vsevolod Velichko (torkvemada) wrote :
Conor Curran (cjcurran)
Changed in indicator-sound:
assignee: nobody → Conor Curran (cjcurran)
importance: Undecided → Low
Omer Akram (om26er)
Changed in indicator-sound (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Conor Curran (cjcurran)
Changed in indicator-sound:
status: New → In Progress
Revision history for this message
Conor Curran (cjcurran) wrote :

Hi,
Thanks for reporting this. I'm trying to reproduce right now. Can you tell me if mpd sends a property-changed signal when its playback state has changed ?

Conor

Revision history for this message
Vsevolod Velichko (torkvemada) wrote :

Hi,
Sure. Look at the mpdsoundmenu.log i attached above. As I mentioned, lines, marked with "<" are lines, when mpd emits org.freedesktop.DBus.Properties notification, it's one of the first lines of the output:
< PlaybackStatus QVariant(QString, "Playing")

Also, with latest (0.4.9-0ubuntu1) version of indicator-sound and 0.3ubuntu5 version of mpd-sound-menu I've noted that when I make some seconds pause after application start and registration as indicator, playing state is shown OK.
Is it possible, that indicator registration is made asynchronously and indicator-sound just aren't ready at the moment when I send notification?

Revision history for this message
Conor Curran (cjcurran) wrote :

Exactly Vsevolod,

Basically registration takes place through libindicate. After registration the menu attempts then to create a connection to the DBus MPRIS interface for that particular player. Only when this MPRIS connection is established can the menu receive or send state messages.
If you test with rhythmbox you will see that when you start the player, the state of the player is updated on the UI on menu.

I suspect what you suggest above is where the problem is. I just checked the code base to see if the method initial_update in the mpris2-controller.vala is called and to my surprise its not ! All other players are working fine though.
There are two ways to fix this, to prove could you delay the state property update signal to be sent 4 seconds after registration. For a proper fix we should talk further.

Conor

Conor

Revision history for this message
Vsevolod Velichko (torkvemada) wrote :

Well, I've just tested now, even 6ms delay is enough (while 5ms is still too short delay :) ) for me, but I suppose that we can't be sure if it (or 100, 500 or even 4000) will be sufficient to every possible user. As one of the possible solutions I see some indicator_server (in my case QIndicatorServer) isReady() method or something like that.

Revision history for this message
Conor Curran (cjcurran) wrote :

Sorry for the delay, UDS can be distracting :)
So I will hope to get a fix for this out in 0.5.0. Will post a dev branch shortly so that you can test and verify.

Conor

Changed in indicator-sound:
milestone: none → 0.5.0
importance: Low → Medium
Revision history for this message
Conor Curran (cjcurran) wrote :

i386 - deb of the branch with the potential fixes.

Revision history for this message
Conor Curran (cjcurran) wrote :

Vsevolod, can you test with the deb attached ?

Revision history for this message
Vsevolod Velichko (torkvemada) wrote :

Thanks, Conor, I've installed the deb, and now everything works ok, even if I make no delay before connection. So I suppose, that this fix can be merged into mainline.

Conor Curran (cjcurran)
Changed in indicator-sound:
status: In Progress → Fix Committed
Revision history for this message
Conor Curran (cjcurran) wrote :

Excellent thanks Vsevolod, no need for a delay any more. Once the mpris connection is established the service will fetch the overall state from the client. Will merge in later and get this out in a SRU (0.5.0) early next week.

Conor

Conor Curran (cjcurran)
Changed in indicator-sound:
status: Fix Committed → Fix Released
Changed in indicator-sound (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted indicator-sound into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in indicator-sound (Ubuntu Maverick):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Vsevolod Velichko (torkvemada) wrote :

Martin, I tested it and everything is OK.
Thank you!

Omer Akram (om26er)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Conor Curran (cjcurran) wrote :

Martin, this fix has introduced a slight regression which i'm fixing today. Would like to drop this release and go with 0.5.0.1 instead. Will have a tarball rolled this afternoon. Literally just a one liner change which fixes the annoying regression.

"Fixes slight visual bug whereby on starting media client (like rhythmbox ) the metadata widget (the part of the menu which holds the track album art and text) does not appear unless the widget is populated."

branch with the fix.

lp:~cjcurran/indicator-sound/metadata-widget-blank-maverick

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for the info Conor. I'm marking as verification-failed then.
Please resubmit once it's fixed.

Changed in indicator-sound (Ubuntu Maverick):
assignee: nobody → Conor Curran (cjcurran)
status: Fix Committed → In Progress
tags: added: regression-proposed verification-failed
removed: verification-done
madbiologist (me-again)
tags: added: verification-needed
removed: regression-proposed verification-failed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

0.5.0.1-0ubuntu1 is in proposed changing to 'fix committed'

Changed in indicator-sound (Ubuntu Maverick):
assignee: Conor Curran (cjcurran) → nobody
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-sound - 0.5.0.1-0ubuntu1

---------------
indicator-sound (0.5.0.1-0ubuntu1) maverick-proposed; urgency=low

  * New upstream release.
    - Fixed a regression, which would show the metadata widget when the
      player has no current track (LP: #674016)

indicator-sound (0.5.0-0ubuntu1) maverick-proposed; urgency=low

  * New upstream release.
    - Buttons' hover image stays after dragging (LP: #643395)
    - Sound indicator works incorrect with playing status (LP: #656947)
    - sound applet volume slider has no effect if pulseaudio is
      restarted (LP: #662296)
    - Default music player should be present in the menu from a clean
      install (LP: #664743)
 -- Ken VanDine <email address hidden> Fri, 12 Nov 2010 09:40:47 -0500

Changed in indicator-sound (Ubuntu Maverick):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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