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 398631 - crash in Keyboard: Clicking the keyboard ic...
crash in Keyboard: Clicking the keyboard ic...
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Keyboard
2.17.x
Other All
: High critical
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 395448 409960 419795 426031 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-01-20 07:22 UTC by ryusuke
Modified: 2007-04-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
don't crash if the key doesn't exist (543 bytes, patch)
2007-01-20 10:00 UTC, Jens Granseuer
none Details | Review

Description ryusuke 2007-01-20 07:22:18 UTC
Version: 2.17.5

What were you doing when the application crashed?
Clicking the keyboard icon from the control center.


Distribution: Unknown
Gnome Release: 2.17.5 2007-01-11 (FreeBSD GNOME Project)
BugBuddy Version: 2.17.3

System: FreeBSD 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #8: Sun Jan  7 03:24:21 JST 2007     root@giji.:/usr/obj/usr/src/sys/GIJI6 i386
X Vendor: The X.Org Foundation
X Vendor Release: 60900000
Selinux: No
Accessibility: Disabled

Memory status: size: 24048 vsize: 0 resident: 24048 share: 0 rss: 14428 rss_rlim: 0
CPU usage: start_time: 0 rtime: 0 utime: 0 stime: 0 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 0

Backtrace was generated from '/usr/local/bin/gnome-keyboard-properties'

[New LWP 100168]
[Switching to LWP 100168]
0x29136941 in wait4 () from /lib/libc.so.6

Thread 1 (LWP 100168)

  • #0 wait4
    from /lib/libc.so.6
  • #1 waitpid
    from /lib/libc.so.6
  • #2 waitpid
    from /lib/libpthread.so.2
  • #3 libgnomeui_segv_handle
    at gnome-ui-init.c line 872
  • #4 sigaction
    from /lib/libpthread.so.2
  • #5 ??
  • #6 ??
  • #7 ??
  • #8 ??
  • #9 ??
  • #10 sigaction
    from /lib/libpthread.so.2
  • #11 xkb_layouts_fill_selected_tree
    at gnome-keyboard-properties-xkblt.c line 415
  • #12 setup_xkb_tabs
    at gnome-keyboard-properties-xkb.c line 179
  • #13 setup_dialog
    at gnome-keyboard-properties.c line 172
  • #14 main
    at gnome-keyboard-properties.c line 256


----------- .xsession-errors (26013 sec old) ---------------------
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/zip-drive with mime Folder and service type 1
flushing data (17994 words left) to inverted word index - please wait
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/vm-design with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/vinum with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/storage-devices with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/solid-state with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/serial-uart with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/releng-packages with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/releng with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/relaydelay with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/pxe with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/problem-reports with mime Folder and service type 1
saving basic metadata for *new* file /home/ryusuke/fdp/doc/en_US.ISO8859-1/articles/pr-guidelines with mime Folder and service type 1
...Too much output, ignoring rest...
--------------------------------------------------
Comment 1 Jens Granseuer 2007-01-20 09:58:58 UTC
This looks like a similar problem to bug 308024
Comment 2 Jens Granseuer 2007-01-20 10:00:27 UTC
Created attachment 80750 [details] [review]
don't crash if the key doesn't exist

Does this patch fix the crash?
Comment 3 ryusuke 2007-01-20 15:57:44 UTC
Thanks for comment and patch.

I tried your patch.
But unfortunately, the patch does not fix the crash. (crash is reproduced)

I use the laptop and keyboard works well. 
Comment 4 Sergey V. Udaltsov 2007-01-20 16:46:39 UTC
Are you sure desktop_gnome_peripherals_keyboard_xkb.schemas was properly installed when you install libgnomekbd? What is the value of the key /schemas/desktop/gnome/peripherals/keyboard/general/defaultGroup ?
Comment 5 Jens Granseuer 2007-01-20 16:59:45 UTC
Sergey, the app shouldn't crash even if the schema is missing.
Comment 6 Sergey V. Udaltsov 2007-01-20 17:23:03 UTC
I would not argue - I just would like to understand the reason of crash, that's why I am asking. And if my guess is correct - I will come up with the fix.

Though, non-installed gconf schema means broken installation process - which may cause any kind of troubles, yeah?
Comment 7 Jens Granseuer 2007-01-20 17:37:09 UTC
I guess that depends on the nature of the key that's missing. In many cases I'd expect suitable defaults to not cause any harm at all.

Anyway, as we're apparently on the same page, as you said, there's no need to argue, fortunately. That said, I must admit the trace puzzles me a little bit. gnome-keyboard-properties-xkblt.c:415 calls def_group_in_gconf_changed() in my copy, I don't see how that could possibly crash. Unless it actually crashes inside that function (which was my first guess and the reason for the patch above), but then it really should appear in the trace.

ryusuke, if you know how to operate gdb, could you try to bring some light into this? (in addition to what Sergey asked, of course)
Comment 8 ryusuke 2007-01-21 00:33:28 UTC
Thanks to Sergey and Jens, I can fix the crash!

As Sergey said,
desktop_gnome_peripherals_keyboard_xkb.schemas was not installed.
(I don't know what kind of install troubles happened.)
 
I uninstalled the libgnomekbd, and installed the libgnomekbd again.
In this new installation, desktop_gnome_peripherals_keyboard_xkb.schemas was
installed correctly.

After this reinstallation, the crash is not reproduced.
Comment 9 Sergey V. Udaltsov 2007-01-21 12:20:03 UTC
Ok, I'll fix it - make it a bit more tolerant to the absent gconf key (it is not a critical key, anyway). But I do not have clear understanding of the real point of crash myself - a call to def_group_in_gconf_changed() should be performed ok (unless gcc generated some funny code validating pointers - you see, gce has strange value 0x7).
Comment 10 Sergey V. Udaltsov 2007-01-21 18:33:27 UTC
I've committed the fix (checking the GError) which should make the code more tolerant to that kind of problem.
Comment 11 Jens Granseuer 2007-02-03 19:53:10 UTC
*** Bug 395448 has been marked as a duplicate of this bug. ***
Comment 12 Jens Granseuer 2007-02-20 17:21:04 UTC
*** Bug 409960 has been marked as a duplicate of this bug. ***
Comment 13 Sebastien Bacher 2007-02-23 13:35:28 UTC
Ubuntu bug https://launchpad.net/bugs/87296 has a similar crash with GNOME 2.17.91, reopening

"gnome-keyboard-properties crashed with SIGSEGV in gconf_client_get_entry()

i use 106 keyboard. in kde,i select 106 korean keyboard layout.
i try to set gnomeś control center- keyboard selection ,it will be crash.
...
Package: gnome-control-center 1:2.17.91-0ubuntu4
..."

Backtrace from the crash:

  • #0 def_group_in_gconf_changed
    at gnome-keyboard-properties-xkblt.c line 128
  • #1 xkb_layouts_fill_selected_tree
    at gnome-keyboard-properties-xkblt.c line 417
  • #2 setup_xkb_tabs
    at gnome-keyboard-properties-xkb.c line 179
  • #3 main
    at gnome-keyboard-properties.c line 172

Comment 14 Jens Granseuer 2007-02-23 17:36:10 UTC
Hopefully, this fixes it for good:

2007-02-23  Jens Granseuer  <jensgr@gmx.net>

        * gnome-keyboard-properties-xkblt.c: (def_group_in_gconf_changed):
        add another NULL check. Should really fix #398631.
Comment 15 Jens Granseuer 2007-03-18 18:26:06 UTC
*** Bug 419795 has been marked as a duplicate of this bug. ***
Comment 16 Jens Granseuer 2007-04-04 16:12:38 UTC
*** Bug 426031 has been marked as a duplicate of this bug. ***