GNOME Bugzilla – Bug 398631
crash in Keyboard: Clicking the keyboard ic...
Last modified: 2007-04-04 16:12:38 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
+ Trace 103692
Thread 1 (LWP 100168)
----------- .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... --------------------------------------------------
This looks like a similar problem to bug 308024
Created attachment 80750 [details] [review] don't crash if the key doesn't exist Does this patch fix the crash?
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.
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 ?
Sergey, the app shouldn't crash even if the schema is missing.
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?
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)
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.
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).
I've committed the fix (checking the GError) which should make the code more tolerant to that kind of problem.
*** Bug 395448 has been marked as a duplicate of this bug. ***
*** Bug 409960 has been marked as a duplicate of this bug. ***
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:
+ Trace 113218
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.
*** Bug 419795 has been marked as a duplicate of this bug. ***
*** Bug 426031 has been marked as a duplicate of this bug. ***