GNOME Bugzilla – Bug 735168
Crash while trying to add a new contact
Last modified: 2014-08-21 15:38:29 UTC
Created attachment 284095 [details] gdb backtrace Plain crash while adding a new contact to an empty local address-book.
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
+ Trace 233980
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.
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.
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