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 735168 - Crash while trying to add a new contact
Crash while trying to add a new contact
Status: RESOLVED FIXED
Product: gnome-contacts
Classification: Core
Component: general
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Contacts maintainer(s)
GNOME Contacts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-08-21 14:36 UTC by Rico Tzschichholz
Modified: 2014-08-21 15:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb backtrace (8.38 KB, text/plain)
2014-08-21 14:36 UTC, Rico Tzschichholz
  Details
ContactEditor: Ignore empty values for e-mail addresses, etc. (2.54 KB, patch)
2014-08-21 15:37 UTC, Philip Withnall
committed Details | Review
ContactEditor: Move string constants from Contact (3.41 KB, patch)
2014-08-21 15:37 UTC, Philip Withnall
committed Details | Review

Description Rico Tzschichholz 2014-08-21 14:36:14 UTC
Created attachment 284095 [details]
gdb backtrace

Plain crash while adding a new contact to an empty local address-book.
Comment 1 Philip Withnall 2014-08-21 14:38:10 UTC
Comment on attachment 284095 [details]
gdb backtrace

I’ll try and take a look at this later.

Relevant bits of the backtrace:

(gnome-contacts:8126): folks-WARNING **: email-details.vala:55: Empty e-mail address passed to EmailFieldDetails.

(gnome-contacts:8126): folks-WARNING **: phone-details.vala:72: Empty phone number passed to PhoneFieldDetails.

(gnome-contacts:8126): folks-WARNING **: postal-address-details.vala:284: Empty postal address passed to PostalAddressFieldDetails.

Program received signal SIGSEGV, Segmentation fault.
0x000000000042b725 in contacts_address_editor_construct (object_type=<optimized out>, _details=_details@entry=0x107a2f0)
    at contacts-contact-editor.c:542
542					g_object_get ((GObject*) ((FolksPostalAddress*) _tmp7_), _tmp10_, &postal_part, NULL);
(gdb) bt
  • #0 contacts_address_editor_construct
    at contacts-contact-editor.c line 542
  • #1 contacts_address_editor_new
    at contacts-contact-editor.c line 592
  • #2 contacts_contact_editor_attach_row_for_address
    at contacts-contact-editor.c line 2809
  • #3 contacts_contact_editor_add_edit_row
    at contacts-contact-editor.c line 4167
  • #4 contacts_contact_editor_add_new_row_for_property
    at contacts-contact-editor.c line 5786
  • #5 contacts_contact_editor_set_new_contact
    at contacts-contact-editor.c line 6055
  • #6 contacts_contact_pane_new_contact
    at contacts-contact-pane.c line 1527
  • #7 _g_closure_invoke_va
    at gclosure.c line 831

Comment 2 Philip Withnall 2014-08-21 15:37:34 UTC
Created attachment 284098 [details] [review]
ContactEditor: Ignore empty values for e-mail addresses, etc.

To avoid warnings from libfolks, as documented in the libfolks API.
Comment 3 Philip Withnall 2014-08-21 15:37:38 UTC
Created attachment 284099 [details] [review]
ContactEditor: Move string constants from Contact

This fixes a crash when creating a new contact in an empty address book,
caused by the string arrays only being populated when the Contact class
is initialised — which doesn’t happen if the address book is empty.

These arrays were only used in the ContactEditor class, so they
shouldn’t have been in the Contact class in the first place.
Comment 4 Philip Withnall 2014-08-21 15:38:22 UTC
Attachment 284098 [details] pushed as 002eb3d - ContactEditor: Ignore empty values for e-mail addresses, etc.
Attachment 284099 [details] pushed as df2f2b0 - ContactEditor: Move string constants from Contact