Hi,<div><br></div><div><div class="gmail_quote">On Wed, Aug 1, 2012 at 4:02 AM, Simon Persson <span dir="ltr"><<a href="mailto:simonpersson1@gmail.com" target="_blank">simonpersson1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div style="font-family:'DejaVu Sans Mono';font-size:8pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Hello!</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">I'm the author of BoomBox, a phonon based music player with an mpris2 interface.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Lately it was taking ages to start my player, after several attempts at debugging this, only today did I find out that kde-telepathy (0.4.1) was causing this.</p>
</div></blockquote><div><br></div><div>Thanks for contacting us about it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:'DejaVu Sans Mono';font-size:8pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">From the commit to boombox I just did:</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> Kde telepathy has a mpris based "now playing" module running in the kded</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> daemon, during boombox startup it detected a new player and started</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> probing it. However, BoomBox was not ready to answer.. it was still</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> going to do creation of other objects before going to the main loop.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> This creation (of phonon mediaobject and kio objects) needed to talk to</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> services in kded, but kded was waiting for boombox. deadlock.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> Resolve by creating mpris interface object last in startup phase.</p></div></blockquote><div><br></div><div>We don't do any probing at all. Our service just sits there and waits for dbus signals from the player (see the code at [1]) and even then we just parse the dbus messages and we simply do nothing (and don't block) if we find there's nothing we want (like song info or player state).</div>
<div><br></div><div>What KDE version are you using? There is a new mpris2 dataengine in Plasma 4.9 afaik, I have zero knowledge about its implementation, but maybe it was that?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-family:'DejaVu Sans Mono';font-size:8pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">So, I was able to fix this. Other programs may be trickier to reorganize (during debugging I observered that amarok has the same problem).</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">I'm not sure where to point the blame here.. applications or ktp.. but maybe the kded module could sleep a few seconds after detecting a new mpris player before it starts probing it??</p>
</div></blockquote><div><br></div><div>I'm quite positive that the blame is not on us ;) I will recheck our code once again just to be sure. But I also think that players shouldn't advertise themselves on the bus before they are ready to actually communicate on the bus. So ultimately, it's the player's problem.</div>
<div><br></div></div>[1] - <a href="http://quickgit.kde.org/index.php?p=ktp-kded-module.git&a=blob&h=8386dd9b3a7393e2c5b521452bda7141f7585738&hb=fb1dd9b080038a68ba49a5eca12c07ab1839bff2&f=telepathy-mpris.cpp">http://quickgit.kde.org/index.php?p=ktp-kded-module.git&a=blob&h=8386dd9b3a7393e2c5b521452bda7141f7585738&hb=fb1dd9b080038a68ba49a5eca12c07ab1839bff2&f=telepathy-mpris.cpp</a><br clear="all">
<div><br></div><div>Cheers</div><div>--</div><div><font color="#666666">Martin Klapetek | KDE Developer</font></div><br>
</div>