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 666200 - Wizard stays forever in the finishing page
Wizard stays forever in the finishing page
Status: RESOLVED FIXED
Product: gnome-bluetooth
Classification: Core
Component: wizard
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-bluetooth-general-maint@gnome.bugs
gnome-bluetooth-general-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2011-12-14 20:18 UTC by Daniele Forsi
Modified: 2012-01-18 12:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lib: Add missing calls to result complete (2.24 KB, patch)
2011-12-16 17:12 UTC, Bastien Nocera
committed Details | Review
lib: Call correct function to Connect() to service (1.83 KB, patch)
2012-01-17 19:49 UTC, Bastien Nocera
needs-work Details | Review

Description Daniele Forsi 2011-12-14 20:18:54 UTC
Device seems to be properly configured on the bluez side but no callback is executed on the gnome-bluetooth side.
I traced the cause to "table" being NULL in lib/bluetooth-client.c in bluetooth_client_connect_service() at line 1768:

	if (connect && table == NULL) {
		if (proxy != NULL)
			g_object_unref (proxy);
		g_simple_async_result_set_op_res_gboolean (simple, FALSE);
		g_object_unref (simple);
		return;

But I don't know why some code paths return without executing a callback.
Comment 1 Bastien Nocera 2011-12-16 17:12:17 UTC
Created attachment 203686 [details] [review]
lib: Add missing calls to result complete

Otherwise we never finish connecting or disconnecting on failure.
Comment 2 Bastien Nocera 2011-12-16 17:19:15 UTC
Feel free to commit this patch if this fixes the bug for you.
Comment 3 Daniele Forsi 2011-12-17 16:32:33 UTC
No visible changes.
IIUIC the GUI will move to another page only if connect_callback or disconnect_callback are executed which isn't the case in the "goto fail" code path.

I'm not sure that my table == NULL case should be treated as a failure because even if the wizard didn't finish I can see the phone in bluetooth-applet and use bluetooth-sendto; browsing fails though it may be unrelated as I never used it before on this machine.
Comment 4 Bastien Nocera 2012-01-17 19:45:22 UTC
(In reply to comment #3)
> No visible changes.
> IIUIC the GUI will move to another page only if connect_callback or
> disconnect_callback are executed which isn't the case in the "goto fail" code
> path.

No. It will be executed when the GIO async call returns, so when g_simple_async_result_complete() or g_simple_async_result_complete_in_idle() is called.

> I'm not sure that my table == NULL case should be treated as a failure because
> even if the wizard didn't finish I can see the phone in bluetooth-applet and
> use bluetooth-sendto; browsing fails though it may be unrelated as I never used
> it before on this machine.

s/fail/bail/ We just need to exit early because we have nothing to do...

But that's not enough. The Connect() function doesn't exist on org.bluez.Device, and the wrong function is called to finish the disconnect if we're disconnecting each service. Some patches here, but need to finish up.
Comment 5 Bastien Nocera 2012-01-17 19:49:35 UTC
Created attachment 205479 [details] [review]
lib: Call correct function to Connect() to service
Comment 6 Bastien Nocera 2012-01-17 19:51:14 UTC
Comment on attachment 205479 [details] [review]
lib: Call correct function to Connect() to service

Missing the correct _finish() calls.
Comment 7 Bastien Nocera 2012-01-18 12:14:14 UTC
commit 7eccac1c3b34573eae02102b74b6c38069d8df9d
Author: Bastien Nocera <hadess@hadess.net>
Date:   Tue Jan 17 19:46:06 2012 +0000

    lib: Call correct function to Connect() to service
    
    And use correct function for the 2 variants of disconnect
    calls.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=666200