empathy-chat crash at startup, the bug was reported in https://bugzilla.gnome.org/show_bug.cgi?id=678807. It seems to be a tp-glib 0.19.x regression. #0 _tp_base_client_handle_channels (iface=<optimized out>, account_path=<optimized out>, connection_path=<optimized out>, channels_arr=0x1946460, requests_arr=0x1932b40, user_action_time=50973156, handler_info=0x19491e0, context=0x18f2bc0) at base-client.c:2338 #1 0x00007f4652588a14 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6 #2 0x00007f4652588435 in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6 #3 0x00007f465a15c50b in g_cclosure_marshal_generic (closure=0x7fff5bebdf00, return_gvalue=0x0, n_param_values=8, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x7f465e1815f0) at /build/buildd/glib2.0-2.32.3/./gobject/gclosure.c:1454 #4 0x00007f465f2bf198 in invoke_object_method (message=0x193db30, connection=0x18f02f0, method=0x7f465e421ba0, object_info=0x7f465e41f7c0, object=0x191c290) at dbus-gobject.c:1889 #5 object_registration_message (connection=0x18f02f0, message=0x193db30, user_data=<optimized out>) at dbus-gobject.c:2151 #6 0x00007f4659244b01 in ?? () from /lib/x86_64-linux-gnu/libdbus-1.so.3 #7 0x00007f46592369f0 in dbus_connection_dispatch () from /lib/x86_64-linux-gnu/libdbus-1.so.3 #8 0x00007f465f2bc425 in message_queue_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at dbus-gmain.c:90 #9 0x00007f4659e9ed53 in g_main_dispatch (context=0x17f3330) ---Type <return> to continue, or q <return> to quit--- at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:2539 #10 g_main_context_dispatch (context=0x17f3330) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3075 #11 0x00007f4659e9f0a0 in g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x17f3330, self=<optimized out>) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3146 #12 g_main_context_iterate (context=0x17f3330, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3083 #13 0x00007f4659e9f164 in g_main_context_iteration (context=0x17f3330, may_block=1) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3207 #14 0x00007f465a432c94 in g_application_run (application=0x1901030, argc=<optimized out>, argv=0x7fff5bebe548) at /build/buildd/glib2.0-2.32.3/./gio/gapplication.c:1507 #15 0x000000000042f52e in main ()
Found the root cause! It hit g_return_val_if_fail (TP_IS_ACCOUNT (account), NULL); in empathy_tp_chat_new(). In that case indeed NULL channel is returned and no error is provided. This is because tp_connection_get_account() returns NULL because the TpAccount does not know its Connection yet. This is because in HandleChannels we create both TpAccount and TpConnection objects but we need to wait for TpAccount to prepare CORE before it calls _tp_connection_set_account(). This crash does not happen when empathy-chat is already started because empathy-chat loads a full Folks aggregator, so it has the time to prepare CORE on all TpAccount before HandleChannel happens. I think TpBaseClient should prepare TpAccount and TpConnection before creating the TpChannel. I think it is reasonable to consider that TpChannel's constructor assert that its TpConnection is already prepared (atm it doesn't, TpChannel even prepare CORE on its connection as part of TpChannel's CORE feature).
Here is a fix in tp-glib: http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/log/?h=empathy-chat
The patch has vanished. Is it still applicable? Did this get fixed? ...
Looks as though this may have been fixed in 0.19.3.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-glib/issues/96.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.