After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663889 - crash due to NameDetails which fail to guarantee non-null full-name/nickname
crash due to NameDetails which fail to guarantee non-null full-name/nickname
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
0.6.x
Other Linux
: High major
: folks-0.3.4
Assigned To: folks-maint
folks-maint
: 664755 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-11-11 23:36 UTC by misc
Modified: 2012-03-07 16:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
debug file before the crash (38.29 KB, text/plain)
2011-11-11 23:39 UTC, misc
  Details
guarantee full-name and nickname fields are actually non-NULL (2.67 KB, patch)
2011-11-14 22:34 UTC, Travis Reitter
reviewed Details | Review

Description misc 2011-11-11 23:36:32 UTC
After trying to set up a connexion to my corporate jabber server ( openfire, plugged on ldap ), gnome-shell and empathy crash, with a traceback going to libfolks. 
It crash with the following assertion :

folks:ERROR:individual.c:4841:__lambda10_: assertion failed: (name != NULL)

Since the account was just created ( likely on demand ), I suspect the vcard to be empty or something like that. I run this on fedora 16, with the latest stable release ( 0.6.5 ). 

I have tried to use gdb, but without much success. And I will attach a debug file, even if I think the problem is that gabble or some other telepathy component feed wrong data to libfolks.
Comment 1 misc 2011-11-11 23:39:03 UTC
Created attachment 201265 [details]
debug file before the crash
Comment 2 Travis Reitter 2011-11-14 22:31:55 UTC
(In reply to comment #0)
> After trying to set up a connexion to my corporate jabber server ( openfire,
> plugged on ldap ), gnome-shell and empathy crash, with a traceback going to
> libfolks. 
> It crash with the following assertion :
> 
> folks:ERROR:individual.c:4841:__lambda10_: assertion failed: (name != NULL)

I was able to work out the issue here, but in the future, please include a full stack trace (since I can't be sure the full path that this bug traveled, just the end point).

> Since the account was just created ( likely on demand ), I suspect the vcard to
> be empty or something like that. I run this on fedora 16, with the latest
> stable release ( 0.6.5 ). 

This appears to be due to a couple of issues:

1. immediate issue: we missed some spots where we need to ensure that specific strings are always non-null. I think I've caught them all in the branch I'll be proposing as a fix

2. bigger issue: we have some assertions we should be more graceful with (see the new bug #664072)
Comment 3 Travis Reitter 2011-11-14 22:34:16 UTC
Created attachment 201405 [details] [review]
guarantee full-name and nickname fields are actually non-NULL

Patch from branch:

http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo663889-null-strings
Comment 4 Travis Reitter 2011-11-14 22:35:29 UTC
Michael, could you please check that attachment #201405 [details] solves your problems?

I didn't reproduce it myself, though it seems like this should cover any possible path.
Comment 5 Philip Withnall 2011-11-14 22:54:34 UTC
Review of attachment 201405 [details] [review]:

Looks good to me, though I haven't checked for other places where null strings could be leaking through.
Comment 6 Travis Reitter 2011-11-22 15:34:58 UTC
Michael, any luck trying out the proposed patch?
Comment 7 Travis Reitter 2011-11-25 17:40:17 UTC
*** Bug 664755 has been marked as a duplicate of this bug. ***
Comment 8 Travis Reitter 2011-11-25 17:55:20 UTC
This should fix the crash a couple people have seen:

commit 50bc2ead6f963da7942d1c06cdd5e1a9e354fc85
Author: Travis Reitter <travis.reitter@collabora.co.uk>
Date:   Mon Nov 14 14:29:21 2011 -0800

    Ensure NameDetails public strings are non-null as we promise.
    
    Closes: bug#663889 - crash due to NameDetails which fail to guarantee
    non-null full-name/nickname

 NEWS                                    |    2 ++
 backends/eds/lib/edsf-persona.vala      |    2 ++
 backends/telepathy/lib/tpf-persona.vala |    2 ++
 backends/tracker/lib/trf-persona.vala   |    2 ++
 4 files changed, 8 insertions(+), 0 deletions(-)
Comment 9 misc 2011-11-30 06:59:21 UTC
I finally got the time for testing it, sorry to not have done earlier. It still crash with the same message message in .xsession-errors :

folks:ERROR:individual.c:4841:__lambda10_: assertion failed: (name != NULL)

Could it be that the profile is stored somewhere, and that I need to clean it up ? ( since another tester said this fixed the crash for him on 
https://admin.fedoraproject.org/updates/FEDORA-2011-16497/folks-0.6.5-2.fc16 ).

I will try to get a backtrace later today.
Comment 10 Philip Withnall 2012-03-05 16:43:00 UTC
Is this still a problem with version 0.6.7?
Comment 11 Debarshi Ray 2012-03-07 13:32:58 UTC
Those who were experiencing crashes even with that Fedora package update are happy with folks-0.6.6: https://bugzilla.redhat.com/760542
Comment 12 Travis Reitter 2012-03-07 16:56:01 UTC
(In reply to comment #11)
> Those who were experiencing crashes even with that Fedora package update are
> happy with folks-0.6.6: https://bugzilla.redhat.com/760542

Closing in that case. Thanks for following up!