-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xkbcli interactive-x11 crashes with (slightly malformed?) custom keymap #252
Comments
A crash should definitely not happen. It's probably due to 1b3a1c2. How do you load the keymap? I tried
but |
With sway's |
Trying again now I still haven't managed to reproduce this, however it is very likely that the problem is caused by 1b3a1c2 (PR #217), specifically the fact that we no longer short-circuit on error: Lines 1175 to 1180 in f8c430c
According to the log messages, what is happening is that the keymap fails in We could fix this by being more defensive and keeping the non-short-circuit behavior, but this seems too subtle and hard to maintain to me. So I prefer to go back to short-circuit behavior. @psychon already mentioned what is needed in the PR message:
so I'll look into doing the needed discard's. |
In 1b3a1c2 we changed the error handling in this code to not bail out immediately but only after everything has been processed, to simplify the code. But I suspect the code isn't prepared for this and that's what causing the crash reported in the issue. Bring back the short-circuit error handling which would hopefully fix such crashes. Fixes: xkbcommon#252 Signed-off-by: Ran Benita <ran@unusedvar.com>
Heh, seems like my PR is the gift that keeps on giving. Sorry for that.
Now you made me install sway! And Wayland!..... Anyway, thanks for keeping enough hints on how to reproduce this:
Hm.
Oh. This means that...
Yup. That's it. Now it's time to test #258... |
In 1b3a1c2 we changed the error handling in this code to not bail out immediately but only after everything has been processed, to simplify the code. But I suspect the code isn't prepared for this and that's what causing the crash reported in the issue. Bring back the short-circuit error handling which would hopefully fix such crashes. Fixes: #252 Signed-off-by: Ran Benita <ran@unusedvar.com>
I wrote an XKB keymap from scratch for my laptop, because I wanted total control over what each of the keys did. I'm using sway as the primary window manager/compositor, and the keymap gives the behavior I want with native Wayland clients, but I still need to use a few X11 clients (notably emacs) and the keymap does not quite work as desired when fed to Xwayland. While trying to troubleshoot this, I managed to get xkbcli interactive-x11 to crash on startup:
gdb tells me the crash is actually inside libxkbcommon-x11.so!xkb_x11_keymap_new_from_device. I don't have debugging symbols to hand, unfortunately, so I can't be more specific.
Here is the troublesome custom keymap. I would argue that no matter how out of spec the keymap is libxkbcommon should not crash, but also I would appreciate any comments you may have on what might be wrong with this keymap.
The text was updated successfully, but these errors were encountered: