alacritty icon indicating copy to clipboard operation
alacritty copied to clipboard

Crashes on Walyand with scaling: `Buffer size (...) is not divisible by scale (2)`

Open alebastr opened this issue 1 year ago • 4 comments

System

OS: Linux Version: master (starting from 659550e) Linux/BSD: Wayland (Sway 1.8.1)

Logs

wl_surface@32: error 2: Buffer size (836x439) is not divisible by scale (2)
Protocol error 2 on object wl_surface@32: 
Protocol error 2 on object wl_surface@32: 
Protocol error 2 on object wl_surface@32: 
<...>
Protocol error 2 on object wl_surface@32: 
Error: ExitFailure(1)

WAYLAND_DEBUG=client alacritty --print-events

This seems to be introduced with update to winit 0.29.8, https://github.com/rust-windowing/winit/commit/63d52aae32feb5448cbed95aae0384663910d13a is the likeliest suspect.

alebastr avatar Jan 03 '24 15:01 alebastr

Could you post WAYLAND_DEBUG=1 alacritty --print-events log?

kchibisov avatar Jan 03 '24 16:01 kchibisov

Could you post WAYLAND_DEBUG=1 alacritty --print-events log?

Already included in the report.

alebastr avatar Jan 03 '24 16:01 alebastr

Ah, sorry, haven't noticed that it was attached.

This should fix it

diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml
index d0d6ab35..40c678fd 100644
--- a/alacritty/Cargo.toml
+++ b/alacritty/Cargo.toml
@@ -39,7 +39,7 @@ serde_json = "1"
 serde_yaml = "0.9.25"
 toml = "0.8.2"
 unicode-width = "0.1"
-winit = { version = "0.29.8", default-features = false, features = ["rwh_05", "serde"] }
+winit = { git = "https://github.com/kchibisov/winit", rev = "ff70ff3906926b05106894e95c7c3b67d514c4de", default-features = false, features = ["rwh_05", "serde"] }

 [build-dependencies]
 gl_generator = "0.14.0"

kchibisov avatar Jan 03 '24 17:01 kchibisov

This should fix it

:+1:, can confirm that it works with the winit patch.

alebastr avatar Jan 03 '24 17:01 alebastr