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 553915 - gnome-keyboard-applet crashed with SIGSEGV in gkbd_indicator_reinit_ui()
gnome-keyboard-applet crashed with SIGSEGV in gkbd_indicator_reinit_ui()
Status: RESOLVED FIXED
Product: libgnomekbd
Classification: Core
Component: Config
2.24.x
Other Linux
: Normal critical
: ---
Assigned To: libgnomekbd maintainers
Sergey V. Udaltsov
: 553914 560437 563437 575795 593557 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-09-26 10:22 UTC by Sebastien Bacher
Modified: 2009-08-30 16:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
the xkb configuration (60.26 KB, application/octet-stream)
2008-10-24 22:36 UTC, Sebastien Bacher
Details
the xkb config (57.84 KB, application/octet-stream)
2008-10-25 13:26 UTC, Sebastien Bacher
Details
xkbcomp output (60.11 KB, text/plain)
2008-10-28 21:20 UTC, Fryderyk Dziarmagowski
Details
xkbcomp uotput after resuming from suspend (53.79 KB, text/plain)
2008-10-28 21:21 UTC, Fryderyk Dziarmagowski
Details

Description Sebastien Bacher 2008-09-26 10:22:43 UTC
the bug has been opened on https://bugs.launchpad.net/ubuntu/+source/gnome-applets/+bug/273299

"Binary package hint: gnome-applets

I resumed from hibernation this morning (first time after upgrading to the Intrepid alpha) to find this crash notice from the keyboard layout switcher, and my keyboard is back to just qwerty (was dvorak).

gnome-applets 2.23.92-0ubuntu1

  • #0 gkbd_indicator_fill
    at gkbd-indicator.c line 279
  • #1 gkbd_indicator_reinit_ui
    at gkbd-indicator.c line 371
  • #2 gkbd_indicator_kbd_cfg_callback
    at gkbd-indicator.c line 472
  • #3 IA__g_cclosure_marshal_VOID__VOID
    at /build/buildd/glib2.0-2.18.1/gobject/gmarshal.c line 77
  • #4 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.18.1/gobject/gclosure.c line 767
  • #5 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.18.1/gobject/gsignal.c line 3244
  • #6 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.18.1/gobject/gsignal.c line 2977
  • #7 IA__g_signal_emit_by_name
    at /build/buildd/glib2.0-2.18.1/gobject/gsignal.c line 3071
  • #8 xkl_xkb_load_all_info
    at xklavier_xkb.c line 302
  • #9 xkl_engine_reset_all_info
    at xklavier.c line 523
  • #10 xkl_engine_process_property_evt
    at xklavier_evt.c line 426
  • #11 xkl_engine_filter_events
    at xklavier_evt.c line 48
  • #12 gkbd_indicator_filter_x_evt
    at gkbd-indicator.c line 526
  • #13 gdk_event_translate
    at /build/buildd/gtk+2.0-2.14.2/gdk/x11/gdkevents-x11.c line 349
  • #14 _gdk_events_queue
    at /build/buildd/gtk+2.0-2.14.2/gdk/x11/gdkevents-x11.c line 2299
  • #15 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.14.2/gdk/x11/gdkevents-x11.c line 2359
  • #16 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.18.1/glib/gmain.c line 2142
  • #17 g_main_context_iterate
    at /build/buildd/glib2.0-2.18.1/glib/gmain.c line 2776
  • #18 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.18.1/glib/gmain.c line 2984
  • #19 bonobo_main
    at bonobo-main.c line 311
  • #20 bonobo_generic_factory_main_timeout
    at bonobo-generic-factory.c line 411
  • #21 bonobo_generic_factory_main
    at bonobo-generic-factory.c line 368
  • #22 panel_applet_factory_main_closure
    at panel-applet.c line 1754
  • #23 panel_applet_factory_main
    at panel-applet.c line 1778
  • #24 main
    at switch.c line 37

Comment 1 Sebastien Bacher 2008-09-26 10:23:04 UTC
*** Bug 553914 has been marked as a duplicate of this bug. ***
Comment 2 Sergey V. Udaltsov 2008-09-26 17:23:05 UTC
What is your XKB configuration? Is there any way to reproduce the crash without going to hibernation?
Comment 3 Sebastien Bacher 2008-09-29 20:14:04 UTC
bug submitter reply

"I have:
* USA Dvorak
* USA Dvorak international
* USA International (with dead keys)
* Arabic qwerty/digits

where the second one is default.

Here's gconftool -a /desktop/gnome/peripherals/keyboard/kbd:
 layouts = [us dvorak,us dvorak-intl,us intl,ara qwerty_digits]
 model =
 options = [grp grp:alts_toggle,grp grp:shift_caps_toggle,grp grp:sclk_toggle]

(those big spaces are actually tabs within an entry)

I'm going to try resetting to the default configuration."
Comment 4 Sebastien Bacher 2008-10-13 09:17:02 UTC
new ubuntu comment

"I can reproduce this bug by plugging in a Apple USB keyboard into a docked ThinkPad X61 tablet.

gconftool -a /desktop/gnome/peripherals/keyboard/kbd
 layouts = [ch de_nodeadkeys,de nodeadkeys,us]
 model = evdev
 overrideSettings = true
 options = [eurosign eurosign:e,grp grp:sclk_toggle,grp_led grp_led:scroll,Compose key compose:caps,grp_led grp_led:caps,nbsp nbsp:level4]"
Comment 5 Sergey V. Udaltsov 2008-10-13 22:12:07 UTC
There is something in common. Whic is ... grp:sclk_toggle

Would the issue disappear if some other method of switching is used?

(I tried to reproduce it - no luck).

Also, I just looked at xkeyboard-config. I cannot find that method of switching. Is there any distro-specific patch for that method?
Comment 6 Sebastien Bacher 2008-10-14 12:53:23 UTC
the sclk_toggle is a debian patch apparently, I've asked the submitter if the issue still happens not using the sclk_toggle option
Comment 7 Sebastien Bacher 2008-10-24 14:07:39 UTC
gkbd-indicator-test and gnome-screensaver-dialog crash the same way on intrepid when doing a french installation and having no GNOME xkb settings

"279					if (short_group_name != NULL
(gdb) bt full
  • #0 gkbd_indicator_prepare_drawing
    at gkbd-indicator.c line 279
  • #1 gkbd_indicator_fill
    at gkbd-indicator.c line 139
  • #2 gkbd_indicator_init
    at gkbd-indicator.c line 623
  • #3 IA__g_type_create_instance
    at /build/buildd/glib2.0-2.18.2/gobject/gtype.c line 1674
  • #4 g_object_constructor
    at /build/buildd/glib2.0-2.18.2/gobject/gobject.c line 1334
  • #5 IA__g_object_newv
    at /build/buildd/glib2.0-2.18.2/gobject/gobject.c line 1211
  • #6 IA__g_object_new_valist
    at /build/buildd/glib2.0-2.18.2/gobject/gobject.c line 1274
  • #7 IA__g_object_new
    at /build/buildd/glib2.0-2.18.2/gobject/gobject.c line 1056
  • #8 gkbd_indicator_new
    at gkbd-indicator.c line 787
  • #9 main
    at gkbd-indicator-test.c line 57


running gkbd-indicator-test using XKL_DEBUG=300

"[1224857106,160,xklavier_config_xkb.c:xkl_rules_set_load/] 	Loading rules from [/usr/share/X11/xkb/rules/evdev]
[1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] 	keymap: (null)
[1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] 	keycodes: evdev+aliases(qwerty)
[1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] 	compat: complete
[1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] 	types: complete
[1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] 	symbols: pc+us+de:2+inet(evdev)
[1224857106,200,xklavier_config_xkb.c:xkl_xkb_config_native_prepare/] 	geometry: pc(pc105)
[1224857106,100,xklavier_config_xkb.c:xkl_xkb_multiple_layouts_supported/] 	!!! Multiple layouts ARE supported
[1224857106,150,xklavier.c:xkl_engine_constructor/] 	Actual backend: XKB
[1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] 	found 4 groups
[1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] 	Group 3 has name [France - Alternative]
[1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] 	Group 2 has name [-]
[1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] 	Group 1 has name [-]
[1224857106,200,xklavier_xkb.c:xkl_xkb_load_all_info/] 	Group 0 has name [-]"

"[1224857106,100,xklavier_config.c:xkl_config_registry_load_from_file/] 	Loading XML registry from file /usr/share/X11/xkb/rules/evdev.xml
[1224857106,150,gkbd-desktop-config.c:gkbd_desktop_config_load_from_gconf/] 	group_per_app: 1
[1224857106,150,gkbd-desktop-config.c:gkbd_desktop_config_load_from_gconf/] 	handle_indicators: 0
[1224857106,150,gkbd-desktop-config.c:gkbd_desktop_config_load_from_gconf/] 	layout_names_as_group_names: 1
[1224857106,150,gkbd-desktop-config.c:gkbd_desktop_config_load_from_gconf/] 	default_group: 0
[1224857106,150,gkbd-keyboard-config.c:gkbd_keyboard_config_copy_from_xkl_config/] 	Loaded Kbd model: [pc105]
[1224857106,150,gkbd-keyboard-config.c:gkbd_keyboard_config_copy_from_xkl_config/] 	Loaded Kbd layout (with variant): [fr	oss]
[1224857106,100,gkbd-desktop-config.c:gkbd_desktop_config_get_lv_descriptions/] 	ids: [fr][oss]
[1224857106,100,gkbd-desktop-config.c:gkbd_desktop_config_get_lv_descriptions/] 	description: [Fra][France][][Autre]
total: 1"

Comment 8 Sergey V. Udaltsov 2008-10-24 19:35:33 UTC
Something is seriously wrong with this config. Why are there 4 groups if there is only one fr(oss) layout? What do you have in xorg.conf? Could you please attach the result of xkbcomp :0 -xkb out.xkb
Comment 9 Sebastien Bacher 2008-10-24 22:36:22 UTC
Created attachment 121314 [details]
the xkb configuration

there is only some video option in the xorg.conf, no keyboard configuration

$ xkbcomp :0 -xkb out.xkb
Warning:          Could not load keyboard geometry for :0
                  BadAlloc (insufficient resources for operation)
                  Resulting keymap file will not describe geometry
Comment 10 Sergey V. Udaltsov 2008-10-24 22:51:31 UTC
That gets real nasty. Something bad with X configuration? It cannot load geometry - means either xk-c installation is broken somehow. Or X cannot report geometry through API. Either way it is odd.

The file is very strange as well - there are clearly 4 groups while you only ask one - fr(oss).

Next step - please try

setxkbmap -model evdev -layout fr -variant oss -option '' -print 

and

setxkbmap -model evdev -layout fr -variant oss -option '' -print | xkbcomp - -xkb out.xkb

In my config, I see only 1 group (in out.xkb see xkb_symbols section). How many groups do you see?
Comment 11 Sebastien Bacher 2008-10-25 13:24:31 UTC
$ setxkbmap -model evdev -layout fr -variant oss -option '' -print 
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(azerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+fr(oss)+inet(evdev)"	};
	xkb_geometry  { include "pc(pc104)"	};
};

Comment 12 Sebastien Bacher 2008-10-25 13:26:11 UTC
Created attachment 121338 [details]
the xkb config
Comment 13 Sergey V. Udaltsov 2008-10-25 13:34:14 UTC
Yes, that all looks perfect, as expected - one group. So, how happened that same configuration /model=evdev, layout(variant)=fr(oss)/ causes 4 groups to appear in Xorg? That's really odd. Do you have any ideas? Do you use something beside these parameters?
Comment 14 Sebastien Bacher 2008-10-25 13:39:02 UTC
the bug is there on a stock intrepid candidate french installation without change or an on hardy upgraded to intrepid, setting some keyboard configuration in GNOME workaround the issue though, no idea about what xorg is doing though
Comment 15 Sebastien Bacher 2008-10-25 13:48:02 UTC
calling "setxkbmap -model evdev -layout fr -variant oss -option ''" workaround the issue too
Comment 16 Sergey V. Udaltsov 2008-10-25 15:50:45 UTC
Sebastien, the gconf params provided above are clearly irrelevant to our current context. What is your configuration now?

gconftool -a /desktop/gnome/peripherals/keyboard/kbd
Comment 17 Sebastien Bacher 2008-10-25 16:45:50 UTC
$ gconftool -a /desktop/gnome/peripherals/keyboard/kbd
 layouts = []
 model = 
 options = []
Comment 18 Sergey V. Udaltsov 2008-10-26 10:04:41 UTC
Sebastien, now I am totally lost. How happened that empty configuration (= "g-s-d has nothing do initialize") and empty xorg.conf causes Xorg to load fr(oss) ???
Comment 19 Sebastien Bacher 2008-10-26 17:20:48 UTC
the xorg configuration corresponds to command line xkb configuration, not sure how that's set exactly, I'll ask tomorrow how that's done exactly though 
Comment 20 Sebastien Bacher 2008-10-27 10:57:49 UTC
the keyboard is configured by using hal-set-property to set the input.xkb. values for the model, layout, variant, options and rules
Comment 21 Sergey V. Udaltsov 2008-10-27 14:53:35 UTC
The resolution (as discussed on IRC):

1. The root cause is in Xorg. It misconfigures XKB.
2. libgnomekbd should handle that broken environment nicely (as smoothly as possible), without crashes.

#2 is committed. #1 has to be raised in xorg bugzilla.
Comment 22 Sergey V. Udaltsov 2008-10-28 00:37:59 UTC
I was told by Peter Huttere that this commit might have a fix: http://cgit.freedesktop.org/xorg/xserver/commit/?id=4808bdec45775342eb9a6352b41e4919e1a69279
Comment 23 Fryderyk Dziarmagowski 2008-10-28 20:40:38 UTC
xorg xserver 1.5.2 got above patch applied, but it changes nothing. After resume from suspend programs using libgnomekbd are crashing. libgnomekbd trunk seem to work better (no gnome-screensaver-dialog/gnome-keyboard-applet crash anymore), but i.e. gnome-keyboard-applet show some strange keyboard layouts (like ???).
Comment 24 Fryderyk Dziarmagowski 2008-10-28 20:52:01 UTC
oh, this is really evil. I've removed custom fdi hal configuration with definitions with custom XkbOptions and XkbLayout and now only "USA" layout appears (gnome-keyboard-applet) and can't be switched! Clicking on applet takes no effect at all. Even worse:
% gconftool-2 -a /desktop/gnome/peripherals/keyboard/kbd
 layouts = [pl,de]
 model = evdev
 options = [grp	grp:alts_toggle,grp	grp:alt_shift_toggle]

There is no "USA" layout defined...
Comment 25 Sergey V. Udaltsov 2008-10-28 21:12:26 UTC
Yes, those ??? layouts are caused by xorg. I can do nothing about them. What's in your "xprop -root | grep XKB" ? And "xkbcomp :0 -xkb out.xkb".
Comment 26 Fryderyk Dziarmagowski 2008-10-28 21:19:58 UTC
It looks like
% xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "base", "evdev", "pl,de", "", "grp:alt_shift_toggle"
_XKB_RULES_NAMES(STRING) = "base", "evdev", "pl,de", ",", "grp:alts_toggle,grp:alt_shift_toggle"

before and after suspend.

strange thing happens after suspend:
% xkbcomp :0 -xkb out.xkb.aftersuspend
Warning:          Could not load keyboard geometry for :0
                  BadAlloc (insufficient resources for operation)
                  Resulting keymap file will not describe geometry
Comment 27 Fryderyk Dziarmagowski 2008-10-28 21:20:44 UTC
Created attachment 121541 [details]
xkbcomp output
Comment 28 Fryderyk Dziarmagowski 2008-10-28 21:21:39 UTC
Created attachment 121542 [details]
xkbcomp uotput after resuming from suspend
Comment 29 Sergey V. Udaltsov 2008-10-28 21:32:19 UTC
To me it looks like the same xorg issue. Let's wait till xorg has it all sorted - then, if the issue perists, restart the investigation.
Comment 30 Sergey V. Udaltsov 2008-10-28 21:37:17 UTC
Opened a bug against xorg

https://bugs.freedesktop.org/show_bug.cgi?id=18277
Comment 31 Sergey V. Udaltsov 2008-10-28 22:33:45 UTC
Dupe of http://bugs.freedesktop.org/show_bug.cgi?id=14373

See the commit in that bug

Comment 32 Fryderyk Dziarmagowski 2008-10-29 16:25:20 UTC
this patch is included in 1.5.2 and as mentioned above I'm using it already.
The bug you've reported to fdo bugzilla has nothing to do with problem described in ubuntu bug and problems reported by me.
I'll try to open xorg bug report soon.
Comment 33 Sergey V. Udaltsov 2008-10-29 21:42:43 UTC
Fryderyk: well, may be it is another case indeed. With the messy xorg xkb code I would be surprized to have only one issue.
Comment 34 palfrey 2008-11-12 15:25:22 UTC
*** Bug 560437 has been marked as a duplicate of this bug. ***
Comment 35 Philip Withnall 2009-07-08 10:34:32 UTC
*** Bug 563437 has been marked as a duplicate of this bug. ***
Comment 36 Philip Withnall 2009-07-08 10:37:02 UTC
*** Bug 575795 has been marked as a duplicate of this bug. ***
Comment 37 Fabio Durán Verdugo 2009-08-30 16:13:53 UTC
*** Bug 593557 has been marked as a duplicate of this bug. ***