lbonn / rofi

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support
Other
983 stars 42 forks source link

[BUG] Crash with mouse scrolling #8

Closed travankor closed 4 years ago

travankor commented 4 years ago

Rofi crashes when scrolling with mouse. This crash seems to be reproducible on the latest sway/wlroots git but version 1.5 is likely affected as well.

Steps to reproduce

Backtrace

Core was generated by `rofi -show drun'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055608fd9e5f8 in rofi_view_handle_mouse_motion (state=0x0, x=296, y=200) at ../source/view.c:866
866 ../source/view.c: No such file or directory.
[Current thread is 1 (Thread 0x7f5cc1f202c0 (LWP 9653))]
(gdb) bt full
#0  0x000055608fd9e5f8 in rofi_view_handle_mouse_motion (state=0x0, x=296, y=200) at ../source/view.c:866
No locals.
#1  0x000055608fd8d721 in wayland_pointer_send_events (self=0x556090150490) at ../source/wayland/display.c:531
        state = 0x0
        button = 4294967295
#2  0x00007f5cc2f8ce6d in ?? () from /usr/lib/libffi.so.7
No symbol table info available.
#3  0x00007f5cc2f8c2aa in ?? () from /usr/lib/libffi.so.7
No symbol table info available.
#4  0x00007f5cc39f6a1f in wl_closure_invoke (closure=closure@entry=0x55609042af10, target=<optimized out>, target@entry=0x556090173aa0, opcode=opcode@entry=5, data=<optimized out>, flags=1) at ../src/connection.c:1018
        count = <optimized out>
        cif = {abi = FFI_UNIX64, nargs = 2, arg_types = 0x7ffc19db8fc0, rtype = 0x7f5cc2f8e180 <ffi_type_void>, bytes = 0, flags = 0}
        ffi_types = {0x7f5cc2f8e060 <ffi_type_pointer>, 0x7f5cc2f8e060 <ffi_type_pointer>, 0x7f5cc2f8e0e0 <ffi_type_uint32>, 0x7f5cc2f8e0e0 <ffi_type_uint32>, 0x7f5cc2f8e0e0 <ffi_type_uint32>, 0x7f5cc2f8e0e0 <ffi_type_uint32>, 
          0x5560901507c0, 0x7f5cc39f6775 <wl_closure_clear_fds+53>, 0x7f5cc39fee78 <wl_pointer_events+120>, 0xbdbdc82d13438500, 0x8, 0x55609042af10, 0x5560901494f0, 0x8, 0x7ffc19db90d0, 0x7f5cc39fb72f, 0x0, 
          0x7f5cc39f844d <wl_display_read_events+157>, 0x7ffc19db90a0, 0x7ffc00000000, 0x5560901495d8, 0x556090173aa0}
        ffi_args = {0x7ffc19db8f90, 0x7ffc19db8f98, 0x5560901730a8, 0x5560901730b0, 0x5560901730b8, 0x5560901730c0, 0x55609042afe0, 0x0, 0x7ffc19db90e0, 0x1, 0x0, 0x0, 0x75, 0x0, 0x7ffc19db9110, 0xbdbdc82d13438500, 0x19db9175, 
          0x7ffc19db9130, 0x7f5cc39fb705, 0x5560901730c8, 0x556090173090, 0x5560901730c8}
        implementation = <optimized out>
#5  0x00007f5cc39f7ed3 in dispatch_event (display=display@entry=0x5560901494f0, queue=<optimized out>) at ../src/wayland-client.c:1445
        closure = 0x55609042af10
        proxy = 0x556090173aa0
        opcode = 5
        proxy_destroyed = <optimized out>
#6  0x00007f5cc39f826c in dispatch_queue (queue=0x5560901495c0, display=0x5560901494f0) at ../src/wayland-client.c:1591
        count = 3
        count = <optimized out>
#7  wl_display_dispatch_queue_pending (display=0x5560901494f0, queue=0x5560901495c0) at ../src/wayland-client.c:1833
        ret = <optimized out>
#8  0x00007f5cc39f82cc in wl_display_dispatch_pending (display=<optimized out>) at ../src/wayland-client.c:1896
No locals.
#9  0x000055608fd8755d in _g_water_wayland_source_dispatch (source=0x5560901490f0, callback=0x55608fd879f0 <wayland_error>, user_data=0x0) at ../subprojects/libgwater-wayland/libgwater-wayland.c:107
        self = 0x5560901490f0
        revents = <optimized out>
#10 0x00007f5cc5292e4e in g_main_dispatch (context=0x556090147a80) at ../glib/gmain.c:3309
        dispatch = 0x55608fd87500 <_g_water_wayland_source_dispatch>
        prev_source = 0x0
        was_in_call = 0
        user_data = 0x0
        callback = 0x55608fd879f0 <wayland_error>
        cb_funcs = 0x7f5cc534d300 <g_source_callback_funcs>
        cb_data = 0x556090148fb0
        need_destroy = <optimized out>
        source = 0x5560901490f0
        current = 0x556090262ec0
        i = 0
        current = <optimized out>
        i = <optimized out>
        __func__ = <optimized out>
        source = <optimized out>
        _g_boolean_var_ = <optimized out>
        was_in_call = <optimized out>
        user_data = <optimized out>
        callback = <optimized out>
        cb_funcs = <optimized out>
        cb_data = <optimized out>
        need_destroy = <optimized out>
        dispatch = <optimized out>
        prev_source = <optimized out>
        _g_boolean_var_ = <optimized out>
#11 g_main_context_dispatch (context=context@entry=0x556090147a80) at ../glib/gmain.c:3974
No locals.
#12 0x00007f5cc5294d90 in g_main_context_iterate (context=0x556090147a80, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4047
--Type <RET> for more, q to quit, c to continue without paging--
        max_priority = 2147483647
        timeout = 1193
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = <optimized out>
        fds = 0x556090191f80
#13 0x00007f5cc5295d13 in g_main_loop_run (loop=0x556090147ba0) at ../glib/gmain.c:4241
        self = <optimized out>
        __func__ = "g_main_loop_run"
#14 0x000055608fd85b68 in main (argc=<optimized out>, argv=<optimized out>)
    at ../source/rofi.c:1159
        path = <optimized out>
        proxy = <optimized out>
        windowid = 0x0
        theme_str = 0x0
        interval = 1
        pfd = 6
        __func__ = "main"
(gdb) 
lbonn commented 4 years ago

Could not reproduce it myself but there were indeed some oversight in the code.

Can you try again on the tip of the wayland branch?

travankor commented 4 years ago

Thanks, it does seem like this bug is fixed. I have not had any crashes so far.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.