Crash in input.c #171

Closed
opened 1 year ago by JorwLNKwpH · 2 comments

Not really sure how this happened or how to reproduce, but this crash randomly happened when I had an editor open for a few minutes.

I ran into this on sway and foot 1.5.2.

Backtrace:

(gdb) bt full
#0  0x0000560c35bd9880 in keyboard_key (data=0x560c37a61430, wl_keyboard=<optimized out>, serial=897740, time=<optimized out>, key=111, state=1) at ../input.c:758
        seat = 0x560c37a61430
        term = <optimized out>
        ctrl = 4
        alt = 8
        shift = 1
        meta = 64
        should_repeat = true
        sym = 65362
        compose_status = <optimized out>
        mods = <optimized out>
        consumed = <optimized out>
        significant = <optimized out>
        effective_mods = <optimized out>
        keymap_mods = <optimized out>
        keymap = <optimized out>
        buf = "0܊O\377\177\000\000\004\000\000\000\000\000\000\000\340ۊO\377\177\000\000\252b7֮\177\000\000\060\024\246\067\fV\000\000\060#\246\067\fV\000\000\257\335\027,", '\000' <repeats 11 times>
        count = <optimized out>
        mod_param_map = {0, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0}
#1  0x0000560c35bda7bb in alternate_scroll (button=<optimized out>, amount=4, seat=0x560c37a61430) at ../input.c:1640
        i = 0
        key = 111
        key = <optimized out>
        i = <optimized out>
#2  mouse_scroll (seat=0x560c37a61430, amount=4) at ../input.c:1656
        term = <optimized out>
        button = <optimized out>
#3  0x0000560c35bda898 in wl_pointer_axis (wl_pointer=<optimized out>, time=<optimized out>, axis=<optimized out>, value=<optimized out>, data=0x560c37a61430) at ../input.c:1708
        seat = <optimized out>
        lines = -4
#4  wl_pointer_axis (data=0x560c37a61430, wl_pointer=<optimized out>, time=<optimized out>, axis=<optimized out>, value=<optimized out>) at ../input.c:1682
        seat = 0x560c37a61430
        lines = <optimized out>
#5  0x00007faed6376e6d in ?? ()
No symbol table info available.
#6  0x0000000000000000 in ?? ()
No symbol table info available.
(gdb) quit
Not really sure how this happened or how to reproduce, but this crash randomly happened when I had an editor open for a few minutes. I ran into this on sway and foot 1.5.2. Backtrace: ``` (gdb) bt full #0 0x0000560c35bd9880 in keyboard_key (data=0x560c37a61430, wl_keyboard=<optimized out>, serial=897740, time=<optimized out>, key=111, state=1) at ../input.c:758 seat = 0x560c37a61430 term = <optimized out> ctrl = 4 alt = 8 shift = 1 meta = 64 should_repeat = true sym = 65362 compose_status = <optimized out> mods = <optimized out> consumed = <optimized out> significant = <optimized out> effective_mods = <optimized out> keymap_mods = <optimized out> keymap = <optimized out> buf = "0܊O\377\177\000\000\004\000\000\000\000\000\000\000\340ۊO\377\177\000\000\252b7֮\177\000\000\060\024\246\067\fV\000\000\060#\246\067\fV\000\000\257\335\027,", '\000' <repeats 11 times> count = <optimized out> mod_param_map = {0, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0} #1 0x0000560c35bda7bb in alternate_scroll (button=<optimized out>, amount=4, seat=0x560c37a61430) at ../input.c:1640 i = 0 key = 111 key = <optimized out> i = <optimized out> #2 mouse_scroll (seat=0x560c37a61430, amount=4) at ../input.c:1656 term = <optimized out> button = <optimized out> #3 0x0000560c35bda898 in wl_pointer_axis (wl_pointer=<optimized out>, time=<optimized out>, axis=<optimized out>, value=<optimized out>, data=0x560c37a61430) at ../input.c:1708 seat = <optimized out> lines = -4 #4 wl_pointer_axis (data=0x560c37a61430, wl_pointer=<optimized out>, time=<optimized out>, axis=<optimized out>, value=<optimized out>) at ../input.c:1682 seat = 0x560c37a61430 lines = <optimized out> #5 0x00007faed6376e6d in ?? () No symbol table info available. #6 0x0000000000000000 in ?? () No symbol table info available. (gdb) quit ```
dnkl added the
bug
label 1 year ago
dnkl commented 1 year ago
Owner

The stack trace suggests you were scrolling with the mouse, in an alt-screen application that does not enable native mouse grabbing. In this case, mouse scrolls are translated to keyboard events.

The crash is in the function that processes key presses/releases.

The stack trace looks sane, except for the line information for the function we're crashing in; it points to a return statement. This could indicate a stack corruption issue.

It might help to run a build of foot with various code sanitizers enabled. I'll try to do that myself, but let me know if you find a way to reproduce this.

The stack trace suggests you were scrolling with the mouse, in an alt-screen application that does **not** enable native mouse grabbing. In this case, mouse scrolls are translated to keyboard events. The crash is in the function that processes key presses/releases. The stack trace looks sane, _except_ for the line information for the function we're crashing in; it points to a `return` statement. This could indicate a stack corruption issue. It might help to run a build of foot with various code sanitizers enabled. I'll try to do that myself, but let me know if you find a way to reproduce this.
dnkl closed this issue 1 year ago
dnkl commented 1 year ago
Owner

0d319f8793 may fix this.

I don't see anything else that could trigger this crash. If you do see a similar crash again, even after updating foot, please re-open this.

https://codeberg.org/dnkl/foot/commit/0d319f87936ea336d50b982344dc55aa58d25fb9 _may_ fix this. I don't see anything else that could trigger this crash. If you _do_ see a similar crash again, even after updating foot, please re-open this.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.