Skip to content
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

Segfault when switching vt, opening window, then switching back #7

Open
adlocode opened this issue Jul 27, 2022 · 1 comment
Open

Comments

@adlocode
Copy link
Contributor

adlocode commented Jul 27, 2022

When I run Hopalong using the DRM backend on one VT, switch VT, open a terminal and start a program to open a window on Hopalong, then switch back to Hopalong's VT, Hopalong segfaults.

Steps to reproduce:
Run Hopalong on tty3 (wayland-1)
Switch to main desktop on tty2 (wayland-0)
Run WAYLAND_DISPLAY=wayland-1 weston-terminal
Switch back to tty3
Hopalong segfaults

I haven't got the full backtrace but gdb's top line is:

Thread 1 "hopalong" received signal SIGSEGV, Segmentation fault.
0x0000000000409956 in hopalong_view_focus (view=0x1711830, surface=0x175c930) at ../src/compositor/hopalong-view.c:365
365			wlr_seat_keyboard_notify_enter(seat, surface,

Here is the full backtrace:

Thread 1 "hopalong" received signal SIGSEGV, Segmentation fault.
0x0000000000409956 in hopalong_view_focus (view=0x1594d50, surface=0x15ce250) at ../src/compositor/hopalong-view.c:365
365			wlr_seat_keyboard_notify_enter(seat, surface,
#0  0x0000000000409956 in hopalong_view_focus (view=0x1594d50, surface=0x15ce250) at ../src/compositor/hopalong-view.c:365
#1  0x000000000040694a in hopalong_xdg_surface_map (listener=0x1594da0, data=0x16d6940) at ../src/compositor/hopalong-xdg.c:26
#2  0x00007ffff7bed3cc in wlr_signal_emit_safe () at /lib64/libwlroots.so.10
#3  0x00007ffff7be8286 in surface_commit_state () at /lib64/libwlroots.so.10
#4  0x00007ffff7af6746 in ffi_call_unix64 () at /lib64/libffi.so.8
#5  0x00007ffff7af34d2 in ffi_call_int.lto_priv () at /lib64/libffi.so.8
#6  0x00007ffff7f906c8 in wl_closure_invoke.constprop () at /lib64/libwayland-server.so.0
#7  0x00007ffff7f94904 in wl_client_connection_data () at /lib64/libwayland-server.so.0
#8  0x00007ffff7f933a2 in wl_event_loop_dispatch () at /lib64/libwayland-server.so.0
#9  0x00007ffff7f93b05 in wl_display_run () at /lib64/libwayland-server.so.0
#10 0x0000000000405250 in hopalong_server_run (server=0x423470) at ../src/compositor/hopalong-server.c:172
#11 0x000000000040cfd9 in main (argc=1, argv=0x7fffffffdfd8, envp=0x7fffffffdfe8) at ../src/compositor/hopalong-main.c:153
@adlocode
Copy link
Contributor Author

adlocode commented Aug 2, 2022

Removing the call to wlr_seat_keyboard_notify_enter () does fix the segfault, but obviously this means the compositor no longer works properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant