GNOME Bugzilla – Bug 636714
Reaches code that should not be reached
Last modified: 2010-12-13 15:48:51 UTC
Created attachment 176019 [details] gdb bt of empathy crash When starting Empathy I get the following error: Core:ERROR:imable.c:308:folks_imable_normalise_im_address: code should not be reached I have added the (useful part of the) traceback.
I have worked around the problem by moving ~/.local/share/relationships.ini away, so apparently the problem is in this file. I am not comfortable putting it online, please contact me privately if you want to have/see it.
Created attachment 176301 [details] [review] Throw exceptions from IMable.normalise_im_address() instead of aborting due to an assertion failure http://git.collabora.co.uk/?p=user/pwith/folks;a=shortlog;h=refs/heads/636714-normalise-im-address-exception This patch fixes the problem by throwing an exception from IMable.normalise_im_address() if an invalid IM address is detected (note, however, that it doesn't claim to detect all invalid IM addresses at the moment). This allows the key-file code to ignore invalid IM addresses caused by corruption or incorrect editing of relationships.ini. Paul, thanks for sending your relationships.ini to me; it was very helpful. I'd be interested to know how it got into the mess it's in though (the problem was being caused by truncated Jabber addresses which had somehow got into the file). I suspect it might be because of bug #628930. Has this relationships.ini file been used by a version of libfolks < 0.1.17 at all? Thanks.
According to my aptitude log I have had 0.1.13, 0.1.15 and 0.1.16, but in the beginning I haven't used it much, i.e. for merging people.
That makes sense. Linking contacts with folks < 0.1.17 would have corrupted relationships.ini (though it appears to have done so in a way which didn't render the entire file invalidly encoded). 0.1.17 would have worked fine with the corrupted relationships.ini, as it didn't have IM address normalisation. The crashing, if I'm correct, should've started as soon as you upgraded to ≥ 0.3.0. If that's the case, then the corruption was caused by bug #628930, and there should be nothing else to worry about.
Review of attachment 176301 [details] [review]: The overall logic makes sense to me.
I can confirm that the crashing started since the upgrade to 0.3.2.
Merged to master, thanks. commit f3ac848861074425cb88753ddddf124f4f7d358c Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sun Dec 12 17:52:52 2010 +0000 Bug 636714 — Assertion failure on invalid IM address Handle invalid IM addresses in relationships.ini more gracefully by throwing an exception from IMable.normalise_im_address() if it detects an invalid address, rather than aborting due to an assertion failure. Closes: bgo#636714 NEWS | 3 + backends/key-file/kf-persona.vala | 49 +++++++++++++++++++---- backends/telepathy/lib/tpf-persona.vala | 12 +++++- folks/imable.vala | 65 ++++++++++++++++++++++++++---- 4 files changed, 109 insertions(+), 20 deletions(-)