zen-tools / gxkb

πŸ‡ΊπŸ‡¦ πŸ‡΅πŸ‡± πŸ‡±πŸ‡Ή πŸ‡ͺπŸ‡ͺ X11 keyboard indicator and switcher
https://zen-tools.github.io/gxkb
141 stars 11 forks source link

gxkb crashes on switching to a different set of layout groups #18

Closed vdrandom closed 9 months ago

vdrandom commented 5 years ago

Run setxkbmap us,ru, switch to the second group, run setxkbmap us, gxkb crashes. The bug seems to have been introduced rather recently, with 3685178481860e86b7b1972430110bd7bdc3f4fd.

zen-tools commented 5 years ago

Thanks for the report. Unfortunately, I can't reproduce it on my computer.

Please, attach output of the next command:

cat /etc/default/keyboard
cat ~/.config/gxkb/gxkb.cfg
lsb_release -a

That can help in investigating.

vdrandom commented 5 years ago
> lsb_release -a
LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a

> cat ~/.config/gxkb/gxkb.cfg
[xkb config]
group_policy=1
default_group=0
never_modify_config=true
model=pc104
layouts=us,ru
variants=ducky,ducky
toggle_option=grp:win_space_toggle,ctrl:nocaps
compose_key_position=compose:menu

The variants are custom made, but the config seems to be irrelevant: the bug is reproduced every time with the automatically generated config from current setxkbmap (tested with setxkbmap us,ru -option β†’ setxkbmap us, setxkbmap us,es -option β†’ setxkbmap us).

I don't have /etc/default/keyboard in my system.

vdrandom commented 5 years ago

here's the strace

poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\24\0\6\0\21\1\0\0p\1\0\0\37\0\0\0\0\0\0\0\0\4\0\0", iov_len=24}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 24
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\10\270\4\r\0\0\0\37\0\0\0\0\0\0\0002\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 84
stat("/usr/share/X11/xkb/rules/evdev.xml", {st_mode=S_IFREG|0644, st_size=214994, ...}) = 0
stat("/usr/share/X11/xkb/rules/evdev.xml", {st_mode=S_IFREG|0644, st_size=214994, ...}) = 0
stat("/usr/share/X11/xkb/rules/evdev.xml", {st_mode=S_IFREG|0644, st_size=214994, ...}) = 0
stat("/usr/share/X11/xkb/rules/evdev.xml", {st_mode=S_IFREG|0644, st_size=214994, ...}) = 0
openat(AT_FDCWD, "/usr/share/X11/xkb/rules/evdev.xml", O_RDONLY) = 5
lseek(5, 0, SEEK_CUR)                   = 0
read(5, "<?xml version=\"1.0\" encoding=\"UT"..., 8192) = 8192
read(5, "      </configItem>\n    </model>"..., 16384) = 16384
read(5, "        <name>sanwaskbkg3</name>"..., 16384) = 16384
read(5, "o639Id>\n            </languageLi"..., 16384) = 16384
read(5, "variant>\n          <configItem>\n"..., 16384) = 16384
read(5, "  </configItem>\n        </varian"..., 16384) = 16384
read(5, "gItem>\n            <name>sundead"..., 16384) = 16384
read(5, "ariant>\n        <variant>\n      "..., 16384) = 16384
read(5, "       <configItem>\n            "..., 16384) = 16384
read(5, "ption>Slovak (QWERTY)</descripti"..., 16384) = 16384
read(5, "</configItem>\n        </variant>"..., 16384) = 16384
read(5, "onfigItem>\n    </layout>\n    <la"..., 16384) = 16384
read(5, "</option>\n    </group>\n    <grou"..., 16384) = 16384
read(5, "      <option>\n        <configIt"..., 16384) = 10194
read(5, "", 6190)                       = 0
close(5)                                = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV (core dumped) +++
zsh: segmentation fault (core dumped)  strace ./gxkb
vdrandom commented 5 years ago

~Seems like I cannot reproduce this on another machine. Weird, since I use Archlinux here as well.~ Reproduced after a package upgrade. Among other updated packages:

upgraded xorg-server-common (1.20.3-1 -> 1.20.4-1)
upgraded xorg-server (1.20.3-1 -> 1.20.4-1)
upgraded gdk-pixbuf2 (2.38.0-1 -> 2.38.1-1)