about providers shutdown

Jussi Kukkonen jhkukkon at cc.hut.fi
Thu Apr 17 06:59:20 PDT 2008


Emanuele Leomanni wrote:
> I will try to explain better:
>    when I run my application for the first time it will start geoclue-gpsd
> provider automatically. Then everything is ok, I can use my application
> properly.
> When I close my program I have noticed that geoclue-gpsd remains alive (as
> expected).
> Then, if I try to restart my application again I have this problem:
> 
> Using provider 'Gpsd'
> Error getting position: Did not receive a reply. Possible causes include:
> the remote application did not send a reply, the message bus security policy
> blocked the reply, the reply timeout expired, or the network connection was
> broken.
> 
> But, if I kill geoclue-gpsd and I restart my application everything is ok.

Thanks, I found the issue. the provider actually tries to shutdown
(since it guesses that there are no clients), and ends up calling
gps_del_callback() which apparently randomly hangs**. This explains your
situation (and some weird problems I had with another application as well).

The good news is that the call isn't really needed: we're closing the
session with gps_close() anyway on the next line. I Removed the
gps_del_callback() call and it seems to work, but let me know if it does
not -- I can't be 100% sure as the hanging happens only sometimes for me.

**) http://lists.berlios.de/pipermail/gpsd-users/2007-July/002787.html

Jussi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/geoclue/attachments/20080417/90d44c6d/attachment.pgp 


More information about the GeoClue mailing list