GNOME Bugzilla – Bug 742739
Seg fault when attempting to add more than one phone number upon contact creation
Last modified: 2018-01-24 15:14:20 UTC
Steps to reproduce: 1. Open gnome-contacts 2. Make sure an addressbook is selected (it happens with both the local addressbook and online accounts) 3. Click "+" (in headerbar) to add a new contact 4. Give the new contact a name 5. Type a phone number into the given (already shown) phone number box 6. Go to "Add Detail" at bottom, and add another phone number box (can be either Mobile or Home, doesn't seem to matter) 7. Type another phone number into the newly added box -- (notice for some reason that the text of the previous number is highlighted, don't know if this is related, but bug persists even if I manually de-select the text) 8. Click "Add" (in headerbar) with both phone number boxes filled out and observe that gnome-contacts segfaults with (gnome-contacts:...): folks-WARNING **: phone-details.vala:72: Empty phone number passed to PhoneFieldDetails. Segmentation fault (core dumped) 9. Re-open gnome-contacts and observe that the new contact is nowhere to be found I've noticed that the segfault only occurs when adding another phone number (no segfault when adding another email) and only when doing so on a new contact (no segfault when editing an existing one) Some hopefully useful information: Distribution: Arch Linux gnome-contacts 3.14.2 folks 0.10.0 libnotify 0.7.6 dconf 0.22.0 gnome-online-accounts 3.14.2 libgee 0.16.0 telepathy-glib 0.24.0 gnome-shell 3.14.3 gtk3 3.14.6 systemd 218 linux 3.18.1
Created attachment 294662 [details] [review] contacts-contact-editor: Notify for current row We can not use the row variable in the change handlers, since the row can change.
Created attachment 294663 [details] [review] contacts-contact-editor: Update all rows on insert
The contact-editor code is somewhat of a mess. It might benefit from a refactor. I do not know the code well, but this fixes the issue for me. The first patch seems straight forward bug fix enough. The second one is also needed but I struggle to understand what it all means :)
Created attachment 294664 [details] [review] contacts-contact-editor: Notify for current row We can not use the row variable in the change handlers, since the row can change.
Created attachment 294665 [details] [review] contacts-contact-editor: Update all rows on insert
Created attachment 294667 [details] [review] contacts-contact-editor: Notify for current row We can not use the row variable in the change handlers, since the row can change.
Created attachment 294668 [details] [review] contacts-contact-editor: Update all rows on insert
And maybe some logic is needed for remove_row as well? Haven't tried that.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-contacts/issues/57.