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 742739 - Seg fault when attempting to add more than one phone number upon contact creation
Seg fault when attempting to add more than one phone number upon contact crea...
Status: RESOLVED OBSOLETE
Product: gnome-contacts
Classification: Core
Component: general
3.14.x
Other Linux
: Normal major
: ---
Assigned To: GNOME Contacts maintainer(s)
GNOME Contacts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-01-11 04:45 UTC by icasdri
Modified: 2018-01-24 15:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
contacts-contact-editor: Notify for current row (4.57 KB, patch)
2015-01-16 10:51 UTC, Jonas Danielsson
none Details | Review
contacts-contact-editor: Update all rows on insert (1.13 KB, patch)
2015-01-16 10:51 UTC, Jonas Danielsson
none Details | Review
contacts-contact-editor: Notify for current row (4.28 KB, patch)
2015-01-16 10:55 UTC, Jonas Danielsson
none Details | Review
contacts-contact-editor: Update all rows on insert (1.13 KB, patch)
2015-01-16 10:55 UTC, Jonas Danielsson
none Details | Review
contacts-contact-editor: Notify for current row (3.59 KB, patch)
2015-01-16 11:06 UTC, Jonas Danielsson
committed Details | Review
contacts-contact-editor: Update all rows on insert (1.13 KB, patch)
2015-01-16 11:06 UTC, Jonas Danielsson
committed Details | Review

Description icasdri 2015-01-11 04:45:39 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
Comment 1 Jonas Danielsson 2015-01-16 10:51:45 UTC
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.
Comment 2 Jonas Danielsson 2015-01-16 10:51:49 UTC
Created attachment 294663 [details] [review]
contacts-contact-editor: Update all rows on insert
Comment 3 Jonas Danielsson 2015-01-16 10:52:54 UTC
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 :)
Comment 4 Jonas Danielsson 2015-01-16 10:55:00 UTC
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.
Comment 5 Jonas Danielsson 2015-01-16 10:55:05 UTC
Created attachment 294665 [details] [review]
contacts-contact-editor: Update all rows on insert
Comment 6 Jonas Danielsson 2015-01-16 11:06:29 UTC
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.
Comment 7 Jonas Danielsson 2015-01-16 11:06:33 UTC
Created attachment 294668 [details] [review]
contacts-contact-editor: Update all rows on insert
Comment 8 Jonas Danielsson 2015-01-16 12:57:50 UTC
And maybe some logic is needed for remove_row as well? Haven't tried that.
Comment 9 GNOME Infrastructure Team 2018-01-24 15:14:20 UTC
-- 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.