UOA provider plugins should each return a different GType

Bug #1035292 reported by Guillaume Desmottes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Empathy
Fix Released
Medium
gnome-control-center-signon (Ubuntu)
Confirmed
High
Unassigned

Bug Description

- Install account-plugin-empathy from the PPA
- Try adding an ICQ account and hit cancel
- Try adding a Groupwise account

The control center crashes trying to re-register the plugin.

(gnome-control-center:6227): GLib-GObject-WARNING **: cannot register existing type `EmpathyAccountsPlugin'

#0 g_logv (log_domain=0x7ffff616f94e "GLib-GObject", log_level=G_LOG_LEVEL_WARNING,
    format=0x7ffff6177568 "cannot register existing type `%s'",
    args1=args1@entry=0x7fffffffcd48) at /build/buildd/glib2.0-2.33.8/./glib/gmessages.c:765
#1 0x00007ffff5e8f032 in g_log (log_domain=log_domain@entry=0x7ffff616f94e "GLib-GObject",
    log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=<optimized out>)
    at /build/buildd/glib2.0-2.33.8/./glib/gmessages.c:792
#2 0x00007ffff61660c5 in check_type_name_I (
    type_name=type_name@entry=0x7fffc24cc8af "EmpathyAccountsPlugin")
    at /build/buildd/glib2.0-2.33.8/./gobject/gtype.c:743
#3 0x00007ffff616618b in g_type_register_static (parent_type=93825000817792,
    type_name=0x7fffc24cc8af "EmpathyAccountsPlugin", info=info@entry=0x7fffffffce80,
    flags=flags@entry=0) at /build/buildd/glib2.0-2.33.8/./gobject/gtype.c:2725
#4 0x00007ffff616639d in g_type_register_static_simple (parent_type=<optimized out>,
    type_name=<optimized out>, class_size=<optimized out>, class_init=<optimized out>,
    instance_size=<optimized out>, instance_init=<optimized out>, flags=0)
    at /build/buildd/glib2.0-2.33.8/./gobject/gtype.c:2693
#5 0x00007fffc22c5c34 in empathy_accounts_plugin_get_type () at empathy-accounts-plugin.c:29
#6 0x00007fffcd6d270c in ap_client_load_plugin (account=0x555555dea290)
    at libaccount-plugin/client.c:90
#7 0x00007fffcdb0221d in cc_credentials_authorization_page_set_account (self=0x555555ca27e0,
    value=value@entry=0x555555dea290) at src/cc-credentials-authorization-page.c:403
#8 0x00007fffcdb034c2 in cc_credentials_preferences_on_accounts_page_new_account_request (
    provider_name=<optimized out>, self=0x555555929740) at src/cc-credentials-preferences.c:298
#9 _cc_credentials_preferences_on_accounts_page_new_account_request_cc_credentials_accounts_page_new_account_request (_sender=<optimized out>, provider_name=<optimized out>,
    self=0x555555929740) at src/cc-credentials-preferences.c:447
#10 0x00007ffff6148f37 in g_cclosure_marshal_VOID__STRINGv (closure=0x555555cc1800,
    return_value=<optimized out>, instance=0x555555bb1360, args=<optimized out>,
    marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x5555559305d0)
    at /build/buildd/glib2.0-2.33.8/./gobject/gmarshal.c:1004
#11 0x00007ffff6146307 in _g_closure_invoke_va (closure=0x555555cc1800, return_value=0x0,
    instance=0x555555bb1360, args=0x7fffffffd318, n_params=1, param_types=0x5555559305d0)
    at /build/buildd/glib2.0-2.33.8/./gobject/gclosure.c:840
#12 0x00007ffff615faa8 in g_signal_emit_valist (instance=instance@entry=0x555555bb1360,
    signal_id=signal_id@entry=302, detail=detail@entry=0,
    var_args=var_args@entry=0x7fffffffd318)
    at /build/buildd/glib2.0-2.33.8/./gobject/gsignal.c:3211
#13 0x00007ffff61606f0 in g_signal_emit_by_name (instance=0x555555bb1360,
    detailed_signal=0x7fffcdb09e85 "new-account-request")
    at /build/buildd/glib2.0-2.33.8/./gobject/gsignal.c:3393
#14 0x00007ffff6148f37 in g_cclosure_marshal_VOID__STRINGv (closure=0x555555cbb8c0,
    return_value=<optimized out>, instance=0x555555bb15a0, args=<optimized out>,
    marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x555555c23c70)
    at /build/buildd/glib2.0-2.33.8/./gobject/gmarshal.c:1004
#15 0x00007ffff6146307 in _g_closure_invoke_va (closure=0x555555cbb8c0, return_value=0x0,
    instance=0x555555bb15a0, args=0x7fffffffd7c8, n_params=1, param_types=0x555555c23c70)
    at /build/buildd/glib2.0-2.33.8/./gobject/gclosure.c:840
#16 0x00007ffff615faa8 in g_signal_emit_valist (instance=instance@entry=0x555555bb15a0,
    signal_id=signal_id@entry=310, detail=detail@entry=0,
    var_args=var_args@entry=0x7fffffffd7c8)
    at /build/buildd/glib2.0-2.33.8/./gobject/gsignal.c:3211
#17 0x00007ffff61606f0 in g_signal_emit_by_name (instance=instance@entry=0x555555bb15a0,
    detailed_signal=detailed_signal@entry=0x7fffcdb09e85 "new-account-request")
    at /build/buildd/glib2.0-2.33.8/./gobject/gsignal.c:3393
#18 0x00007fffcdb0571c in cc_credentials_providers_page_add_account_for_current_selection (
    self=self@entry=0x555555bb15a0, providers_tree=providers_tree@entry=0x555555c00390)
    at src/cc-credentials-providers-page.c:674
#19 0x00007fffcdb05880 in cc_credentials_providers_page_on_providers_tree_button_press_event (
    event=<optimized out>, widget=<optimized out>, self=0x555555bb15a0)
    at src/cc-credentials-providers-page.c:738
#20 _cc_credentials_providers_page_on_providers_tree_button_press_event_gtk_widget_button_press_event (_sender=_sender@entry=0x555555c00390, event=<optimized out>,
    self=self@entry=0x555555bb15a0) at src/cc-credentials-providers-page.c:413
#21 0x00007ffff7691d2c in _gtk_marshal_BOOLEAN__BOXED (closure=0x555555ca0280,
    return_value=0x7fffffffdb10, n_param_values=<optimized out>, param_values=0x7fffffffdbc0,
    invocation_hint=<optimized out>, marshal_data=<optimized out>)
    at /build/buildd/gtk+3.0-3.5.10/./gtk/gtkmarshalers.c:85
#22 0x00007ffff6146040 in g_closure_invoke (closure=0x555555ca0280,
    return_value=0x7fffffffdb10, n_param_values=2, param_values=0x7fffffffdbc0,
    invocation_hint=0x7fffffffdb60) at /build/buildd/glib2.0-2.33.8/./gobject/gclosure.c:777
#23 0x00007ffff6157d10 in signal_emit_unlocked_R (node=node@entry=0x555555783160,
    detail=detail@entry=0, instance=instance@entry=0x555555c00390,
    emission_return=emission_return@entry=0x7fffffffdc90,
    instance_and_params=instance_and_params@entry=0x7fffffffdbc0)
    at /build/buildd/glib2.0-2.33.8/./gobject/gsignal.c:3551
#24 0x00007ffff615f70a in g_signal_emit_valist (instance=0x555555c00390,
    signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffde18)
    at /build/buildd/glib2.0-2.33.8/./gobject/gsignal.c:3310
#25 0x00007ffff61601e2 in g_signal_emit (instance=instance@entry=0x555555c00390,
    signal_id=<optimized out>, detail=detail@entry=0)
    at /build/buildd/glib2.0-2.33.8/./gobject/gsignal.c:3356
#26 0x00007ffff77d650e in gtk_widget_event_internal (widget=widget@entry=0x555555c00390,
    event=event@entry=0x555555ce06d0) at /build/buildd/gtk+3.0-3.5.10/./gtk/gtkwidget.c:6298
#27 0x00007ffff77d6929 in gtk_widget_event (widget=widget@entry=0x555555c00390,
    event=event@entry=0x555555ce06d0) at /build/buildd/gtk+3.0-3.5.10/./gtk/gtkwidget.c:5955
#28 0x00007ffff768fc75 in propagate_event_up (topmost=<optimized out>, event=<optimized out>,
    widget=0x555555c00390) at /build/buildd/gtk+3.0-3.5.10/./gtk/gtkmain.c:2400
#29 propagate_event (widget=<optimized out>, event=0x555555ce06d0, captured=<optimized out>,
    topmost=0x0) at /build/buildd/gtk+3.0-3.5.10/./gtk/gtkmain.c:2500
#30 0x00007ffff76919eb in gtk_main_do_event (event=0x555555ce06d0)
    at /build/buildd/gtk+3.0-3.5.10/./gtk/gtkmain.c:1713

Changed in gnome-control-center-signon (Ubuntu):
importance: Undecided → High
status: New → Confirmed
David King (amigadave)
Changed in online-accounts-gnome-control-center:
importance: Undecided → Critical
Revision history for this message
David King (amigadave) wrote :

This only happens with the Empathy plugin, not with the OAuth plugins provided by online-accounts-account-plugins. I will keep investigating, and see if I can find out what the Empathy plugin does differently.

Revision history for this message
David King (amigadave) wrote :

It seems that the Empathy plugin is at fault, or at least behaves differently to all the other account plugins, as a single plugin (EmpathyAccountPlugin) is used as the source for every account plugin provided by Empathy. This can be seen in the Makefile.am (look at the lib<provider>_la_SOURCES variables):

http://git.gnome.org/browse/empathy/tree/ubuntu-online-accounts/cc-plugins/Makefile.am

This means that each plugin has the same ap_module_get_object_type() method, and so the types are registered twice when more than one is used in a single run of the control center panel, which cannot succeed with the current plugin loader. Each provider plugin having a different GType seems like a reasonable assumption, and that it what the plugins in online-accounts-account-plugins do, for example:

http://bazaar.launchpad.net/~online-accounts/online-accounts-account-plugins/trunk/view/head:/src/windows-live.vala

affects: online-accounts-gnome-control-center → empathy
summary: - Crash trying to reload the same plugin twice
+ UOA provider plugins should each return a different GType
David King (amigadave)
Changed in empathy:
importance: Critical → Unknown
status: New → Unknown
Changed in empathy:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.