After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671994 - Contact list only appears after several seconds
Contact list only appears after several seconds
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Contact List
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-13 15:07 UTC by Cosimo Cecchi
Modified: 2012-03-15 07:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bump geoclue dep (716 bytes, patch)
2012-03-14 15:07 UTC, Guillaume Desmottes
committed Details | Review
location-manager: use geoclue_master_create_client_async() (2.27 KB, patch)
2012-03-14 15:07 UTC, Guillaume Desmottes
committed Details | Review
location-manager: use geoclue_master_client_set_requirements_async() (3.87 KB, patch)
2012-03-14 15:07 UTC, Guillaume Desmottes
committed Details | Review
location-manager: use geoclue_master_client_create_position_async() (2.29 KB, patch)
2012-03-14 15:07 UTC, Guillaume Desmottes
committed Details | Review
location-manager: use geoclue_master_client_create_address_async() (2.06 KB, patch)
2012-03-14 15:07 UTC, Guillaume Desmottes
committed Details | Review

Description Cosimo Cecchi 2012-03-13 15:07:33 UTC
After clicking on the Empathy icon in the Shell's dash, I have to wait for several seconds before seeing the contact list window. Note that the contact list will come up not fully loaded itself, and it will have a spinner on it for another couple of seconds when it is presented.
This only seems to happen the first time Empathy is launched.
Comment 1 Guillaume Desmottes 2012-03-14 14:08:21 UTC
Try starting it manually with EMPATHY_DEBUG=all  logs may help to find what's blocking it.
Comment 2 Cosimo Cecchi 2012-03-14 14:24:19 UTC
Looks like it's blocking here:

[ ... ]

empathy-DEBUG: setup_geoclue: Setting up Geoclue

** WARNING **: Metadata for error domain "geoclue-error-quark" already registered

Looking at the code, it seems on initialization EmpathyLocationManager calls synchronously into geoclue_master_create_client(), and then again synchronously into various methods on the GeoclueMasterClient object.
Comment 3 Guillaume Desmottes 2012-03-14 14:31:08 UTC
Oh I see geoclue gained async variants of these API now, great!
Comment 4 Guillaume Desmottes 2012-03-14 15:07:17 UTC
Created attachment 209721 [details] [review]
Bump geoclue dep

We need 0.12 for the shiny new async API.
Comment 5 Guillaume Desmottes 2012-03-14 15:07:21 UTC
Created attachment 209722 [details] [review]
location-manager: use geoclue_master_create_client_async()
Comment 6 Guillaume Desmottes 2012-03-14 15:07:25 UTC
Created attachment 209723 [details] [review]
location-manager: use geoclue_master_client_set_requirements_async()
Comment 7 Guillaume Desmottes 2012-03-14 15:07:29 UTC
Created attachment 209724 [details] [review]
location-manager: use geoclue_master_client_create_position_async()
Comment 8 Guillaume Desmottes 2012-03-14 15:07:32 UTC
Created attachment 209725 [details] [review]
location-manager: use geoclue_master_client_create_address_async()
Comment 9 Guillaume Desmottes 2012-03-14 15:08:41 UTC
Cosimo: could you please test those patches (or this branch : http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=geoclue-671994 ) and check if that fixes your issue?

Also, if you can give a quick review that would be great. :)
Comment 10 Cosimo Cecchi 2012-03-14 16:08:06 UTC
Review of attachment 209721 [details] [review]:

OK
Comment 11 Cosimo Cecchi 2012-03-14 16:12:17 UTC
Review of attachment 209722 [details] [review]:

Looks good, just two minor comments below.

::: libempathy-gtk/empathy-location-manager.c
@@ +483,2 @@
     {
+      DEBUG ("Failed to create GeoclueMasterClient: %s", error->message);

Looking at the geoclue code, I think you're supposed to free this GError as well here.

@@ +521,2 @@
   self->priv->geoclue_is_setup = TRUE;
+

Stray line?
Comment 12 Cosimo Cecchi 2012-03-14 16:15:12 UTC
Review of attachment 209723 [details] [review]:

::: libempathy-gtk/empathy-location-manager.c
@@ +453,2 @@
     {
       DEBUG ("set_requirements failed: %s", error->message);

Same here, I think the GError is supposed to be freed.

@@ +485,3 @@
   if (error != NULL)
     {
+      DEBUG ("set_requirements failed: %s", error->message);

Ditto.
Comment 13 Cosimo Cecchi 2012-03-14 16:16:10 UTC
Review of attachment 209724 [details] [review]:

::: libempathy-gtk/empathy-location-manager.c
@@ +486,2 @@
   if (error != NULL)
     {

Free the error
Comment 14 Cosimo Cecchi 2012-03-14 16:16:42 UTC
Review of attachment 209725 [details] [review]:

::: libempathy-gtk/empathy-location-manager.c
@@ +486,3 @@
+  if (error != NULL)
+    {
+{

Free the error.
Comment 15 Cosimo Cecchi 2012-03-14 16:17:10 UTC
Patchset works fine in my testing, thanks!
Comment 16 Guillaume Desmottes 2012-03-15 07:47:53 UTC
Rahh you're right; wtf is that for an API?!

Thanks a lot for the review; I'll fix those and merge.
Comment 17 Guillaume Desmottes 2012-03-15 07:52:41 UTC
Attachment 209721 [details] pushed as f2d9517 - Bump geoclue dep
Attachment 209722 [details] pushed as 4bfb1d6 - location-manager: use geoclue_master_create_client_async()
Attachment 209723 [details] pushed as 8eb401d - location-manager: use geoclue_master_client_set_requirements_async()
Attachment 209724 [details] pushed as 3c65039 - location-manager: use geoclue_master_client_create_position_async()
Attachment 209725 [details] pushed as d6edab7 - location-manager: use geoclue_master_client_create_address_async()