segfault in gnome-keyboard-properties

Bug #82373 reported by Alex Mauer
20
Affects Status Importance Assigned to Milestone
gnome-control-center
Fix Released
Critical
control-center (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-control-center

In feisty.
gnome-keyboard-properties segfaults on startup. debug info (debug symbols from people.ubuntu.com/~pitti/ddebs):

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1225725280 (LWP 11047)]
def_group_in_gconf_changed (client=0x8060448, cnxn_id=4294967295,
    entry=0x80a58a8, dialog=0x80a5598)
    at /build/buildd/control-center-2.17.90/./capplets/keyboard/gnome-keyboard-properties-xkblt.c:128
128 /build/buildd/control-center-2.17.90/./capplets/keyboard/gnome-keyboard-properties-xkblt.c: No such file or directory.
        in /build/buildd/control-center-2.17.90/./capplets/keyboard/gnome-keyboard-properties-xkblt.c
(gdb) bt
#0 def_group_in_gconf_changed (client=0x8060448, cnxn_id=4294967295,
    entry=0x80a58a8, dialog=0x80a5598)
    at /build/buildd/control-center-2.17.90/./capplets/keyboard/gnome-keyboard-properties-xkblt.c:128
#1 0x08050f59 in xkb_layouts_fill_selected_tree (dialog=0x80a5598)
    at /build/buildd/control-center-2.17.90/./capplets/keyboard/gnome-keyboard-properties-xkblt.c:417
#2 0x0804f131 in setup_xkb_tabs (dialog=0x80a5598, changeset=0x0)
    at /build/buildd/control-center-2.17.90/./capplets/keyboard/gnome-keyboard-properties-xkb.c:179
#3 0x0804e99d in main (argc=Cannot access memory at address 0x0
)
    at /build/buildd/control-center-2.17.90/./capplets/keyboard/gnome-keyboard-properties.c:172
#4 0xb7836ebc in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#5 0x0804e211 in _start ()

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. The backtrace matches http://bugzilla.gnome.org/show_bug.cgi?id=395448 upstream. What version of Ubuntu do you use?

Changed in control-center:
assignee: nobody → desktop-bugs
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

From the backtrace that looks like feisty

Revision history for this message
Alex Mauer (hawke) wrote :

The bug report also mentions "in feisty" near the top.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Right, must have skipped the short like on the quick glance to the text before the backtrace ;)

Changed in control-center:
status: Unknown → Confirmed
Revision history for this message
C de-Avillez (hggdh2) wrote :

folks, gnome-keyboard-properties is, right now, completely unusable (at least for two of us). What about raising the sev here to match upstream?

Revision history for this message
Sebastien Bacher (seb128) wrote :

changing the bug importance will not make it fixed any faster, the best you can do to speed up things is to work on a patch

Revision history for this message
C de-Avillez (hggdh2) wrote :
Download full text (5.7 KiB)

OK, I accept it. The only issue I have is that I have never programmed under GTK, so I am not willing to write a patch on this.

Nevertheless, I can -- and did -- debug the application, and this is what I see:

hggdh@xango:/usr/src/src/gnome-control-center/control-center-2.17.90/capplets/keyboard$ gdb /usr/src/src/gnome-control-center/control-center-2.17.90/capplets/keyboard/.libs/lt-gnome-keyboard-properties
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/src/src/gnome-control-center/control-center-2.17.90/capplets/keyboard/.libs/lt-gnome-keyboard-properties
[Thread debugging using libthread_db enabled]
[New Thread 47079464161120 (LWP 29427)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47079464161120 (LWP 29427)]
def_group_in_gconf_changed (client=<value optimized out>, cnxn_id=<value optimized out>, entry=<value optimized out>, dialog=0x629100) at gnome-keyboard-properties-xkblt.c:128
128 if (value->type == GCONF_VALUE_INT) {
(gdb) backtrace
#0 def_group_in_gconf_changed (client=<value optimized out>, cnxn_id=<value optimized out>, entry=<value optimized out>, dialog=0x629100)
    at gnome-keyboard-properties-xkblt.c:128
#1 0x000000000040a60f in xkb_layouts_fill_selected_tree (dialog=0x629100) at gnome-keyboard-properties-xkblt.c:417
#2 0x0000000000408b2d in setup_xkb_tabs (dialog=0x629100, changeset=0x0) at gnome-keyboard-properties-xkb.c:179
#3 0x00000000004084a7 in main (argc=<value optimized out>, argv=<value optimized out>) at gnome-keyboard-properties.c:172
(gdb) list
123 guint cnxn_id,
124 GConfEntry * entry, GladeXML * dialog)
125 {
126 GConfValue *value = gconf_entry_get_value (entry);
127
128 if (value->type == GCONF_VALUE_INT) {
129 GtkWidget *tree_view = WID ("xkb_layouts_selected");
130 GtkTreeModel *model =
131 GTK_TREE_MODEL (gtk_tree_view_get_model
132 (GTK_TREE_VIEW (tree_view)));
(gdb) backtrace
#0 def_group_in_gconf_changed (client=<value optimized out>, cnxn_id=<value optimized out>, entry=<value optimized out>, dialog=0x629100)
    at gnome-keyboard-properties-xkblt.c:128
#1 0x000000000040a60f in xkb_layouts_fill_selected_tree (dialog=0x629100) at gnome-keyboard-properties-xkblt.c:417
#2 0x0000000000408b2d in setup_xkb_tabs (dialog=0x629100, changeset=0x0) at gnome-keyboard-properties-xkb.c:179
#3 0x00000000004084a7 in main (argc=<value optimized out>, argv=<value optimized out>) at gnome-keyboard-properties.c:172
(gdb) list 123
118 gtk_tree_path_free (chpath);
119 }
120
121 static void
122 def_group_in_gconf_changed (GConfCli...

Read more...

Revision history for this message
C de-Avillez (hggdh2) wrote :

OK, I found it. Looking upstream & looking at the gnome CVS for gnome-control-centre/gnome-keyboard-properties, I found a reference to http://bugzilla.gnome.org/show_bug.cgi?id=398631. In there, there is a comment that a similar segv is caused by a missing file -- desktop_gnome_peripherals_keyboard_xkb.schemas. This file is installed by libgnomekbd-common -- which *is* installed in my machine.

BUT -- the file is not there. So I reinstalled libgnomekbd-common, and the segv went away.

So, for me, this seems to have been fixed upstream by 398631.

Why the schema was not installed... is a question I am unable to answer right now. But the bypass is to re-install libgnomekbd-common.

Revision history for this message
C de-Avillez (hggdh2) wrote :

bloody hurry caused a bad comment above. My G-C-C *does* have the fix in upstream 398631 installed...

So 398631 has not actually fixed the issue (since err is NULL, which would signal no error, but the GConfEntry returned by the call is still NULL).

So the real fix would be in gconf_client_get_entry, I guess.

Changed in control-center:
status: Confirmed → Rejected
Revision history for this message
Sebastien Bacher (seb128) wrote :

The schemas registration sometime seem to not work correctly, bug #50150 is about that. Not sure if a crash without schemas should be considered as a bug, the schemas is a part of the software and should be installed and correctly configured

Changed in control-center:
status: Rejected → Fix Released
Revision history for this message
Alex Mauer (hawke) wrote :

Yeah, but I would think it should be handled rather than crashing. The program obviously shouldn't work normally (though that would be ideal), but it shouldn't crash either.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Making program robust to broken installations might be a good idea, there is plenty of bugs happening on normal use that have higher priority to be worked on though

Changed in control-center:
status: Fix Released → Confirmed
Changed in control-center:
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

fixed upstream

Changed in control-center:
status: Confirmed → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

That upload fixes the bug:

 control-center (1:2.17.92-0ubuntu1) feisty; urgency=low
 .
   * New upstream version:
     about-me:
     - Change default dir for the image chooser
     - Dont use composite pixbuf to avoid unnecessary clipping
     - Prevent child watcher from accessing already released memory
       (Ubuntu: #86193)
     default applications:
     - Really fix DATADIR
     - Dont try reading into invalid territory when the user set a custom
       command without spaces (Ubuntu: #84715)
     fontilus:
     - Use GOption argument parsing
     keybindings:
     - Clear GConf client cache before reloading
     keyboard:
     - Avoid crashing on NULLs (Ubuntu: #82373)
     settings daemon:
     - Properly round volumes so that volume-up and -down act symetrically
       (Ubuntu: #36302)
     - Dont ignore errors when X refuses to update the pointer mapping
     - Dont install the same filter twice for the default root window
     - Correctly pass the function address when setting up the event filter
     - Fix warnings
     shell:
     - Revert to old menu for 2.18
     theme switcher:
     - Update selected fg color from the correct slot (Ubuntu: #86944)
     - Fix warnings
     - Format guint16 values accordingly
     themus:
     - Populate the VFS file info fields properly so that Nautilus shows, e.g.,
       read-only emblems in themes://
     windows:
     - Remove some long-dead code
     - Dont leak stuff on error
   * debian/capplets-data.install:
     - updated for a directory change
   * debian/patches/90_revert_change_creating_high_cpu_usage.patch:
     - dropped, fixed with the new version
   * debian/patches/91_fix_default_applications_xml_path.patch:
     - dropped, fixed with the new version

Changed in control-center:
status: Fix Committed → Fix Released
Revision history for this message
Seth (erstazi9) wrote :

I am getting this in 6.10 Edgy, what are the proper procedures to remedy this? I am not up to par with software programming or I would look into the bug.

I appreciate the great work you guys do!

Revision history for this message
Sebastien Bacher (seb128) wrote :

The bug is fixed with the unstable version, the easier way is to update then

Changed in gnome-control-center:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.