GNOME Bugzilla – Bug 657914
EmpathyIndividualStore segfaults if contact cannot be obtained by individual
Last modified: 2011-09-06 07:06:00 UTC
Created attachment 195373 [details] [review] possible fix to the segfault I found a weird problem which lead to a segfault. For some reasons there were some Individual that seemed empty, I think it was a problem related to telepathy-haze having problems. I saw those contact in Empathy main windows as element in the buddy list with all the property empty. There were always another element with the same name with the correct information. For example "Mr Foo" Account: my_foo Identifier: Foo@Bar Etc: ...some data and then another contact "Mr Foo" Account: <empty> Identifier: <empty> Etc: <empty> The latter one created the problem in EmpathyIndividualStore and when a contact was requested with empathy_contact_dup_from_folks_individual(ind) for example, it returned NULL. This is clearly a problem somewhere else, but empathy_contact_dup_from_folks_individual() is allowed to return NULL so null needs to be handled in individual_store_get_individual_status_icon_with_icon_name() as well. Not handling it leads to segfaults in weird cases like it. I tried to fix it here: http://cgit.collabora.com/git/user/kalfa/empathy.git/commit/?h=icon_from_contact_segfault&id=3479a7dc1387a990aa900e44215309ec82e8fda7 Not sure if it's the proper way to handle it, but it's the point to touch. When contact is null, icon_name won't be set and g_hash_table_lookup(t,icon_name) will sefgault. Note: as I used this patch, the empathy contacts disappeared for good, and I couldn't reproduce the bug anymore.
Created attachment 195378 [details] [review] possible fix to the segfault From the prev attach: removed a useless variable init, a leftover from a prev. approach.
Review of attachment 195378 [details] [review]: ++ That could be a folks issue actually, but yeah looks good.
*** Bug 657125 has been marked as a duplicate of this bug. ***