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 756165 - broken code in geoclue handler
broken code in geoclue handler
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Geolocation
unspecified
Other All
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
: 756290 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-10-07 03:34 UTC by Matthias Clasen
Modified: 2015-10-14 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Call finish only once (1.08 KB, patch)
2015-10-13 17:51 UTC, Pranav Kant
committed Details | Review

Description Matthias Clasen 2015-10-07 03:34:49 UTC
Here's a stacktrace:

https://retrace.fedoraproject.org/faf/reports/818033/

Looking at empathy-geoclue-helper.c:299, we find:

static void
client_cb (GObject *source,
    GAsyncResult *result,
    gpointer user_data)
{
  GTask *task = user_data;
  EmpathyGeoclueHelper *self = g_task_get_source_object (task);
  GError *error = NULL;

  self->priv->client = gclue_client_proxy_new_finish (result, &error);
  if (!gclue_client_proxy_new_for_bus_finish (result, &error))
    {
...

so you are calling two different finish methods on the same result. That can't work.
Comment 1 Debarshi Ray 2015-10-09 15:07:49 UTC
*** Bug 756290 has been marked as a duplicate of this bug. ***
Comment 2 Pranav Kant 2015-10-13 17:51:42 UTC
Created attachment 313209 [details] [review]
Call finish only once
Comment 3 Peter 2015-10-14 09:29:18 UTC
Thanks for your patch! I don't know if I have the time to test it, but I have a question. Is there an option or any other way to switch of geoclue temporarily?
I've tried already:
1. $ gnome-control-center
2. -> Privacy
3. Location Services = off

But that doesn't help.
Comment 4 Debarshi Ray 2015-10-14 09:40:05 UTC
Review of attachment 313209 [details] [review]:

Thanks, Pranav. It looks good to me.

::: libempathy-gtk/empathy-geoclue-helper.c
@@ +295,3 @@
 
+  self->priv->client = gclue_client_proxy_new_for_bus_finish (result, &error);
+  if (self->priv->client == NULL)

I wonder how this could have worked till now.