Running queries via dbus

Alex Merry kde at randomguy3.me.uk
Mon Mar 22 00:58:45 CET 2010


On Sunday 21 March 2010 23:15:14 Jacopo De Simoi wrote:
> Dear amarockers,
>   I've been investigating the reasons behind a large number of bug reports
> for krunner in which the interface was not providing search results
> anymore under some diverse conditions. One of these conditions relates to
> the "control audio player" runner, which performs collection queries on
> the amarok database via dbus. From the runner side it appears that the
> reply is never sent, so the runner is blocked for the usual dbus timeout
> (~25 secs) and this causes the issues reported in all these bug reports.
> Running amarok with QDBUS_DEBUG=1 gives some interesting insight on what's
> going on:
> 
> here follows the interesting part:
> 
> QDBusConnectionPrivate(0x760f40) got message: QDBusMessage(type=MethodCall,
> service=":1.38015", path="/Collection",
> interface="org.kde.amarok.Collection", member="Query", signature="s",
> contents=("<query version="1.0"><limit value="10" /><filters><or><include
> field="title" value="in" /><or><include field="artist" value="in"
> /><or><include field="album" value="in"
> /></or></or></or></filters><includeCollection id="localCollection"
> /></query>") ) amarok:  XQR: include filter
> amarok:  XQR: include filter
> amarok:  XQR: include filter
> QDBusMarshaller: type `float' (135) is not registered with D-BUS. Use
> qDBusRegisterMetaType to register it QDBusConnection: error: could not
> send reply message to service "": Marshalling failed: Unregistered type
> float passed in arguments amarok:  sending async reply failed

Ah, well the issue is that we're trying to pass back a float, but only doubles 
are registered as valid D-Bus types by default.

In particular, Meta::Track has float as the return type of bpm().  Perhaps it 
would be sensible to make this a qreal?  Also, score() should probably also 
return qreal (rather than double) for consistency.

Alex



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20100321/7da34ae2/attachment.sig 


More information about the Amarok-devel mailing list