[Bug 51444] Crash in TpBaseClient

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jun 26 19:40:50 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=51444

--- Comment #1 from Xavier Claessens <xclaesse at gmail.com> 2012-06-26 10:40:50 PDT ---
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).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list