indianakernick / The-Fat-Controller

A library for simulating mouse and keyboard events
Apache License 2.0
38 stars 13 forks source link

Crash during initialization #13

Open positiveway opened 1 month ago

positiveway commented 1 month ago

In x11 mode immediate crash during device initialization Context::new(). In Wayland mode it works as expected.

Error: The application panicked (crashed). Message: unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceedisize::MAX

OS: Lubuntu 24.04

Libraries were installed sudo apt install libx11-dev libxtst-dev libxkbcommon-dev

Cargo.toml: tfc = { version = "0.7", features = ["x11"], optional = true }

indianakernick commented 1 month ago

Hi @positiveway, I tried to reproduce the problem by running the examples on Ubuntu 22.04 but it seems to be working fine for me. Could you do some more investigation on your side? Which call to slice::from_raw_parts is that error message referring to?