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 778595 - gnome-control-center may segfault in User Accounts panel
gnome-control-center may segfault in User Accounts panel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-14 09:36 UTC by Mohammed Sadiq
Modified: 2017-02-16 08:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-accounts: Fix timeouts handling when changing name (1.78 KB, patch)
2017-02-15 08:05 UTC, Ondrej Holy
needs-work Details | Review
user-accounts: Fix crash when name is changed and dialogue closed (1.80 KB, patch)
2017-02-16 07:43 UTC, Ondrej Holy
committed Details | Review

Description Mohammed Sadiq 2017-02-14 09:36:54 UTC
In certain cases gnome-control-center may segfault in User Accounts. This also happens in latest stable (3.22 as packaged in Debian testing, may not be upto date).

How to reproduce:
1. Open 'Add User...' dialog
2. Give some Full Name, say "My Name"
3. Press and hold backspace untill the typed name is deleted completely
4. Press 'Escape' key

Result:
Sometimes gnome-control-center segfaults

The following is logged to terminal:

(gnome-control-center:8437): Gtk-CRITICAL **: gtk_combo_box_text_get_active_text: assertion 'GTK_IS_COMBO_BOX_TEXT (combo_box)' failed

(gnome-control-center:8437): Gtk-CRITICAL **: gtk_bin_get_child: assertion 'GTK_IS_BIN (bin)' failed

(gnome-control-center:8437): Gtk-CRITICAL **: gtk_label_set_label: assertion 'GTK_IS_LABEL (label)' failed

(gnome-control-center:8437): Gtk-CRITICAL **: gtk_entry_get_text: assertion 'GTK_IS_ENTRY (entry)' failed


bt from gdb (As jhbuild builds are not built with debugging enabled by default, this all is what I get, sorry):

(gdb) bt full
  • #0 is_valid_name
  • #1 local_validate
  • #2 dialog_validate
  • #3 local_username_timeout
  • #4 g_timeout_dispatch
    at /home/sadiq/jhbuild/checkout/glib/glib/gmain.c line 4674
  • #5 g_main_dispatch
    at /home/sadiq/jhbuild/checkout/glib/glib/gmain.c line 3203
  • #6 g_main_context_dispatch
    at /home/sadiq/jhbuild/checkout/glib/glib/gmain.c line 3856
  • #7 g_main_context_iterate
    at /home/sadiq/jhbuild/checkout/glib/glib/gmain.c line 3929
  • #8 g_main_context_iteration
    at /home/sadiq/jhbuild/checkout/glib/glib/gmain.c line 3990
  • #9 g_application_run
    at /home/sadiq/jhbuild/checkout/glib/gio/gapplication.c line 2381
  • #10 main
(gdb) 


Thanks
Comment 1 Ondrej Holy 2017-02-15 08:05:02 UTC
Created attachment 345778 [details] [review]
user-accounts: Fix timeouts handling when changing name

Timeout id variables contain typos and consequently, the sources are
not properly removed in all cases. Then the dialog may crash in certain
cases if it is closed before the source functions are called.
Comment 2 Bastien Nocera 2017-02-15 09:46:03 UTC
Review of attachment 345778 [details] [review]:

> Fix timeouts handling when changing name

The users don't care about the timeouts. Something like this:
"Fix crash when name is changed and dialogue closed"
would be better.

It also doesn't look like a typo. It's the wrong variable being used, plain and simple.
Comment 3 Ondrej Holy 2017-02-16 07:43:38 UTC
Created attachment 345923 [details] [review]
user-accounts: Fix crash when name is changed and dialogue closed

Wrong variables are used to store timeout id, consequently, the sources
are not properly removed in all cases. Then the dialog may crash in certain
cases if it is closed before the source functions are called.
Comment 4 Bastien Nocera 2017-02-16 07:59:23 UTC
Review of attachment 345923 [details] [review]:

Looks good.
Comment 5 Ondrej Holy 2017-02-16 08:22:27 UTC
Attachment 345923 [details] pushed as 60c315b - user-accounts: Fix crash when name is changed and dialogue closed
Comment 6 Ondrej Holy 2017-02-16 08:32:15 UTC
Pushed to gnome-3-22 also.