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

fix: cmd_sticky crash sway with empty container #2821

Merged
merged 2 commits into from
Oct 11, 2018
Merged

Conversation

mek-yt
Copy link

@mek-yt mek-yt commented Oct 11, 2018

When I used my sticky shortcut on an empty workspace (mouse pointer over wallpaper), sway crash with stack trace:

Stack trace of thread 11312:
#0  0x000055e2f1e07b20 container_is_floating (sway)
#1  0x000055e2f1dfd67d cmd_sticky (sway)
#2  0x000055e2f1dcd63a execute_command (sway)
#3  0x000055e2f1df255d seat_execute_command (sway)
#4  0x000055e2f1dedab7 handle_keyboard_key (sway)
#5  0x00007feee8f021c5 wlr_signal_emit_safe (libwlroots.so.0)
#6  0x00007feee8eec544 wlr_keyboard_notify_key (libwlroots.so.0)
#7  0x00007feee8ec131c handle_keyboard_key (libwlroots.so.0)
#8  0x00007feee8ec0f56 handle_libinput_event (libwlroots.so.0)
#9  0x00007feee8ebfe88 handle_libinput_readable (libwlroots.so.0)
#10 0x00007feee8f40702 wl_event_loop_dispatch (libwayland-server.so.0)
#11 0x00007feee8f3f2ac wl_display_run (libwayland-server.so.0)
#12 0x000055e2f1dd97c5 server_run (sway)
#13 0x000055e2f1dd8eda main (sway)
#14 0x00007feee8a70223 __libc_start_main (libc.so.6)
#15 0x000055e2f1dccb2e _start (sway)

Stack trace of thread 11314:
#0  0x00007feee8a38afc pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
#1  0x00007feee4d5d17c n/a (i965_dri.so)
#2  0x00007feee4d5ceb8 n/a (i965_dri.so)
#3  0x00007feee8a32a9d start_thread (libpthread.so.0)
#4  0x00007feee8b47a43 __clone (libc.so.6)

Checking if the container is null solve this.
But this fix will mislead the cmd_sticky to think that the container is a tiled container.

If this is a bug, do you prefer testing if the container is null in cmd_sticky function ?

@ddevault ddevault requested a review from RyanDwyer October 11, 2018 15:34
@ianyfan
Copy link
Contributor

ianyfan commented Oct 11, 2018

This isn't the right check. The right check is that the container isn't NULL in cmd_sticky, like in #2794

@RyanDwyer RyanDwyer merged commit f52af18 into swaywm:master Oct 11, 2018
@RyanDwyer
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants