Clients crash on pointer movement when XCURSOR_SIZE=0
Turns out that for some reason my desktop environment sets XCURSOR_SIZE
variable to 0
.
Since 807cd2e5, this makes Weston clients fail to properly setup the cursor theme (a message could not load theme 'THEME_NAME'
is displayed, with THEME_NAME
being the content of XCURSOR_THEME
variable) and in turn, makes them segfault when trying to display the cursor.
Example from weston-flower:
(gdb) bt
#0 0x0000555555562d9b in pointer_surface_frame_callback (data=0x555555587ee0, callback=0x0, time=0) at clients/window.c:3819
#1 0x00007ffff70a66d0 in ffi_call_unix64 () at /usr/lib/libffi.so.6
#2 0x00007ffff70a60a0 in ffi_call () at /usr/lib/libffi.so.6
#3 0x00007ffff7f3bf5f in () at /usr/lib/libwayland-client.so.0
#4 0x00007ffff7f386ca in () at /usr/lib/libwayland-client.so.0
#5 0x00007ffff7f39c0c in wl_display_dispatch_queue_pending () at /usr/lib/libwayland-client.so.0
#6 0x000055555555e040 in handle_display_data (task=0x555555581878, events=1) at clients/window.c:6129
#7 0x0000555555561fff in display_run (display=0x5555555817f0) at clients/window.c:6454
#8 0x000055555555bf25 in main (argc=<optimized out>, argv=<optimized out>) at clients/flower.c:197
(gdb) bt full
#0 0x0000555555562d9b in pointer_surface_frame_callback (data=0x555555587ee0, callback=0x0, time=0) at clients/window.c:3819
input = 0x555555587ee0
cursor = <optimized out>
i = <optimized out>
duration = 21845
force_frame = <optimized out>
__PRETTY_FUNCTION__ = "pointer_surface_frame_callback"
#1 0x00007ffff70a66d0 in ffi_call_unix64 () at /usr/lib/libffi.so.6
#2 0x00007ffff70a60a0 in ffi_call () at /usr/lib/libffi.so.6
#3 0x00007ffff7f3bf5f in () at /usr/lib/libwayland-client.so.0
#4 0x00007ffff7f386ca in () at /usr/lib/libwayland-client.so.0
#5 0x00007ffff7f39c0c in wl_display_dispatch_queue_pending () at /usr/lib/libwayland-client.so.0
#6 0x000055555555e040 in handle_display_data (task=0x555555581878, events=1) at clients/window.c:6129
display = 0x5555555817f0
ep = {events = 32767, data = {ptr = 0x7fffffffd77c, fd = -10372, u32 = 4294956924, u64 = 140737488344956}}
ret = <optimized out>
#7 0x0000555555561fff in display_run (display=0x5555555817f0) at clients/window.c:6454
task = <optimized out>
ep =
{{events = 1, data = {ptr = 0x555555581878, fd = 1431836792, u32 = 1431836792, u64 = 93824992417912}}, {events = 0, data = {ptr = 0x330000000f, fd = 15, u32 = 15, u64 = 219043332111}}, {events = 0, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 0, data = {ptr = 0x496d4b5680c7300, fd = 1745646336, u32 = 1745646336, u64 = 330685498258125568}}, {events = 0, data = {ptr = 0x7700000000, fd = 0, u32 = 0, u64 = 511101108224}}, {events = 124, data = {ptr = 0x55555556904a, fd = 1431736394, u32 = 1431736394, u64 = 93824992317514}}, {events = 7497079, data = {ptr = 0x5559994000000000, fd = 0, u32 = 0, u64 = 6150115266308079616}}, {events = 21845, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 4146521392, data = {ptr = 0x555b9e1000007fff, fd = 32767, u32 = 32767, u64 = 6150683507661242367}}, {events = 21845, data = {ptr = 0x0, fd = 0, u32 = 0, u64 = 0}}, {events = 4145224107, data = {ptr = 0x555817f000007fff, fd = 32767, u32 = 32767, u64 = 6149691610734034943}}, {events = 21845, data = {ptr = 0x555555599720, fd = 1431934752, u32 = 1431934752, u64 = 93824992515872}}, {events = 4294957200, data = {ptr = 0x700007fff, fd = 32767, u32 = 32767, u64 = 30064803839}}, {events = 0, data = {ptr = 0x55555556904a, fd = 1431736394, u32 = 1431736394, u64 = 93824992317514}}, {events = 1431682944, data = {ptr = 0xffffd9a000005555, fd = 21845, u32 = 21845, u64 = 18446701879950857557}}, {events = 32767, data = {ptr = 0x7ffff713449f <strdup+31>, fd = -149732193, u32 = 4145235103, u64 = 140737338623135}}}
i = <optimized out>
count = <optimized out>
ret = <optimized out>
#8 0x000055555555bf25 in main (argc=<optimized out>, argv=<optimized out>) at clients/flower.c:197
flower = {display = 0x5555555817f0, window = 0x555555599550, widget = 0x555555599940, width = 200, height = 200}
d = 0x5555555817f0
tv = {tv_sec = 1542567738, tv_usec = 603316}
(gdb)