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 778353 - providers: Disconnect all signal handlers from the GtkDialog before once add_account is done
providers: Disconnect all signal handlers from the GtkDialog before once add_...
Status: RESOLVED OBSOLETE
Product: gnome-online-accounts
Classification: Core
Component: general
3.23.x
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
: 778421 (view as bug list)
Depends on:
Blocks: 774222
 
 
Reported: 2017-02-08 16:38 UTC by Debarshi Ray
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
providers: disconnect from dialog's response signal when done (3.80 KB, patch)
2017-02-16 16:30 UTC, Georges Basile Stavracas Neto
none Details | Review
providers: Disconnect from the dialog once add_account is completed (3.03 KB, patch)
2017-02-17 15:22 UTC, Debarshi Ray
committed Details | Review
providers: Disconnect from the dialog once refresh_account is completed (1.93 KB, patch)
2017-02-17 15:22 UTC, Debarshi Ray
reviewed Details | Review

Description Debarshi Ray 2017-02-08 16:38:17 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=774222#c61

Some of the GoaProvider sub-classes don't disconnect their signal handlers from the dialog when the add_account vfunc ends. This means that they can run into a memory error next time the dialog is used. Ideally, they should disconnect, but destroying the dialog is more defensive.

Would be nice if these can be cherry-picked to gnome-3-22 so that we are tolerant to those who might be running a jhbuilt gnome-control-center with a system installed gnome-online-accounts.
Comment 1 Debarshi Ray 2017-02-10 13:07:00 UTC
*** Bug 778421 has been marked as a duplicate of this bug. ***
Comment 2 Georges Basile Stavracas Neto 2017-02-16 16:30:07 UTC
Created attachment 345961 [details] [review]
providers: disconnect from dialog's response signal when done

After completing the adding of a new account, successfully or
not, some online account providers doesn't disconnect from the
connected GtkDialog::response signal. This causes a crash now
that we're keeping the dialog around, as exemplified through
the following steps:

 - Open Control Center's Online Accounts panel
 - Open the Exchange account dialog
 - Close the dialog
 - Open any other account dialog (e.g. Google)
 - Close the dialog

Fix that by properly disconnecting from the dialog's response
signal.
Comment 3 Debarshi Ray 2017-02-17 15:09:19 UTC
Review of attachment 345961 [details] [review]:

::: src/goabackend/goaexchangeprovider.c
@@ +826,2 @@
  out:
+  g_signal_handlers_disconnect_by_func (dialog, dialog_response_cb, &data);

The way things stand, the refresh_account vfunc creates a new GtkDialog and destroys it. So disconnecting the signal isn't necessary.

However, with the new designs this will open a new second pop-up dialog. Maybe we should merge it with our existing dialog? What's the intended design here? We might have to change the signature of the refresh_account vfunc depending on what we decide.
Comment 4 Debarshi Ray 2017-02-17 15:22:23 UTC
Created attachment 346079 [details] [review]
providers: Disconnect from the dialog once add_account is completed
Comment 5 Debarshi Ray 2017-02-17 15:22:35 UTC
Created attachment 346080 [details] [review]
providers: Disconnect from the dialog once refresh_account is completed
Comment 6 Debarshi Ray 2017-02-17 15:28:38 UTC
Comment on attachment 346079 [details] [review]
providers: Disconnect from the dialog once add_account is completed

I took the liberty to split the patch between add and refresh_account, and pushed the first half of it. Let's keep the refresh_account bit around until we figure out how to handle it with the new design.

Thanks for the fixes, Georges.
Comment 7 Jeremy Bicha 2017-03-17 00:43:07 UTC
I can't duplicate my test case from
https://bugzilla.gnome.org/show_bug.cgi?id=778421 any more with gnome-online-accounts 3.23.91 and gnome-control-center 3.23.92.
Comment 8 GNOME Infrastructure Team 2021-07-05 10:59:23 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/

Thank you for your understanding and your help.