GNOME Bugzilla – Bug 778353
providers: Disconnect all signal handlers from the GtkDialog before once add_account is done
Last modified: 2021-07-05 10:59:23 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.
*** Bug 778421 has been marked as a duplicate of this bug. ***
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.
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.
Created attachment 346079 [details] [review] providers: Disconnect from the dialog once add_account is completed
Created attachment 346080 [details] [review] providers: Disconnect from the dialog once refresh_account is completed
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.
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.
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.