Crash when viewing layout with invalid XKB data
gkbd-keyboard-display crashes with Polish layout (gkbd-keyboard-display -l pl
).
Maybe the layout file is corrupted as the following error is logged to journal when running the command above.
Jul 05 13:37:05 kaiser /nix/store/8kr96ljnp0b2cjfxyv3gqzahnmqads6k-gdm-3.28.2/libexec/gdm-x-session[1440]: syntax error: line 500 of pl
Jul 05 13:37:05 kaiser /nix/store/8kr96ljnp0b2cjfxyv3gqzahnmqads6k-gdm-3.28.2/libexec/gdm-x-session[1440]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Jul 05 13:37:05 kaiser /nix/store/8kr96ljnp0b2cjfxyv3gqzahnmqads6k-gdm-3.28.2/libexec/gdm-x-session[1440]: > Error: Error interpreting include file "pl"
Jul 05 13:37:05 kaiser /nix/store/8kr96ljnp0b2cjfxyv3gqzahnmqads6k-gdm-3.28.2/libexec/gdm-x-session[1440]: > Exiting
Jul 05 13:37:05 kaiser /nix/store/8kr96ljnp0b2cjfxyv3gqzahnmqads6k-gdm-3.28.2/libexec/gdm-x-session[1440]: > Abandoning symbols file "default"
Jul 05 13:37:05 kaiser /nix/store/8kr96ljnp0b2cjfxyv3gqzahnmqads6k-gdm-3.28.2/libexec/gdm-x-session[1440]: Errors from xkbcomp are not fatal to the X server
Jul 05 13:37:05 kaiser /nix/store/8kr96ljnp0b2cjfxyv3gqzahnmqads6k-gdm-3.28.2/libexec/gdm-x-session[1440]: (EE) Error loading keymap /tmp/server-0.xkm
I am using libgnomekbd 3.26.0 on NixOS.
Other Slavic languages like cz
or sk
work fine.
Stack trace:
#0 0x00007ff008f8123d in get_preferred_height_for_width (widget=0x1dd0420, width=1440, minimum_height=0x7fff32d9c748, natural_height=0x7fff32d9c74c) at gkbd-keyboard-drawing.c:2146
#1 0x00007ff007f836bf in gtk_widget_query_size_for_orientation () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#2 0x00007ff007f83abc in gtk_widget_compute_size_for_orientation () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#3 0x00007ff007f83cf4 in gtk_widget_get_preferred_height_for_width () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#4 0x00007ff007dd2bba in gtk_box_get_content_size () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#5 0x00007ff007e22223 in gtk_css_custom_gadget_get_preferred_size () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#6 0x00007ff007e26331 in gtk_css_gadget_get_preferred_size () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#7 0x00007ff007dd3733 in gtk_box_get_preferred_height_and_baseline_for_width () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#8 0x00007ff007f83873 in gtk_widget_query_size_for_orientation () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#9 0x00007ff007f83abc in gtk_widget_compute_size_for_orientation () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#10 0x00007ff007f83cf4 in gtk_widget_get_preferred_height_for_width () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#11 0x00007ff007dd2bba in gtk_box_get_content_size () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#12 0x00007ff007e22223 in gtk_css_custom_gadget_get_preferred_size () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#13 0x00007ff007e26331 in gtk_css_gadget_get_preferred_size () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#14 0x00007ff007dd3733 in gtk_box_get_preferred_height_and_baseline_for_width () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#15 0x00007ff007f83873 in gtk_widget_query_size_for_orientation () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#16 0x00007ff007f83abc in gtk_widget_compute_size_for_orientation () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#17 0x00007ff007f83cf4 in gtk_widget_get_preferred_height_for_width () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#18 0x00007ff008042b20 in gtk_window_get_preferred_height_for_width () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#19 0x00007ff007f836bf in gtk_widget_query_size_for_orientation () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#20 0x00007ff007f83abc in gtk_widget_compute_size_for_orientation () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#21 0x00007ff007f83dc5 in gtk_widget_get_preferred_height_and_baseline_for_width () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#22 0x00007ff007f83ebd in _gtk_widget_get_preferred_size_and_baseline () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#23 0x00007ff008044dc4 in gtk_window_compute_configure_request () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#24 0x00007ff0080494bd in gtk_window_realize () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#25 0x00007ff0022a7a7d in g_closure_invoke () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#26 0x00007ff0022ba8de in signal_emit_unlocked_R () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#27 0x00007ff0022c2ec5 in g_signal_emit_valist () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#28 0x00007ff0022c38df in g_signal_emit () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#29 0x00007ff008039e66 in gtk_widget_realize () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#30 0x00007ff00804781d in gtk_window_show () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#31 0x00007ff0022a7a7d in g_closure_invoke () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#32 0x00007ff0022ba8de in signal_emit_unlocked_R () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#33 0x00007ff0022c2ec5 in g_signal_emit_valist () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#34 0x00007ff0022c38df in g_signal_emit () from /nix/store/dkq5gx9xpc7sx1k29kxjhwjk9dq4lkz8-glib-2.56.0/lib/libgobject-2.0.so.0
#35 0x00007ff008034046 in gtk_widget_show () from /nix/store/a0ld9f3i3kn2vk3508726729l7vcfrax-gtk+3-3.22.30/lib/libgtk-3.so.0
#36 0x0000000000401bd9 in main (argc=<optimized out>, argv=<optimized out>) at gkbd-keyboard-display.c:94
Downstream issue: https://github.com/NixOS/nixpkgs/issues/42987
Edited by Piotr Drąg