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

Linux X11 crash when mouse enters window or is moved #212

Closed
enaut opened this issue Oct 18, 2020 · 2 comments
Closed

Linux X11 crash when mouse enters window or is moved #212

enaut opened this issue Oct 18, 2020 · 2 comments

Comments

@enaut
Copy link
Contributor

enaut commented Oct 18, 2020

Dear all,
with all the examples I have tried the window closes and the program panics as soon as the mouse is moved inside the window.

the error:

thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', /home/dietrich/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:659:9

Somehow it seems that the mouse pointer is not initialized correctly.

the stack is:

thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', /home/dietrich/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:659:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/98edd1fbf8a68977a2a7c1312eb1ebff80515a92/library/std/src/panicking.rs:483
   1: core::panicking::panic_fmt
             at /rustc/98edd1fbf8a68977a2a7c1312eb1ebff80515a92/library/core/src/panicking.rs:85
   2: core::panicking::panic
             at /rustc/98edd1fbf8a68977a2a7c1312eb1ebff80515a92/library/core/src/panicking.rs:50
   3: core::mem::uninitialized
             at /home/dietrich/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:659
   4: winit::platform::platform::x11::util::input::<impl winit::platform::platform::x11::xdisplay::XConnection>::query_pointer
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/util/input.rs:94
   5: winit::platform::platform::x11::EventsLoop::process_event
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/mod.rs:956
   6: winit::platform::platform::x11::EventsLoop::poll_events
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/mod.rs:270
   7: winit::platform::platform::EventsLoop::poll_events
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/mod.rs:522
   8: winit::EventsLoop::poll_events
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/winit-0.19.5/src/lib.rs:277
   9: glutin_window::GlutinWindow::poll_event
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/pistoncore-glutin_window-0.63.0/src/lib.rs:204
  10: <glutin_window::GlutinWindow as window::Window>::poll_event
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/pistoncore-glutin_window-0.63.0/src/lib.rs:449
  11: event_loop::Events::next
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/pistoncore-event_loop-0.49.0/src/lib.rs:318
  12: piston_window::PistonWindow<W>::next
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/piston_window-0.105.0/src/lib.rs:310
  13: turtle::renderer::Renderer::run
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/turtle-1.0.0-rc.3/src/renderer.rs:90
  14: turtle::server::main
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/turtle-1.0.0-rc.3/src/server.rs:90
  15: turtle::server::start
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/turtle-1.0.0-rc.3/src/server.rs:66
  16: turtle::turtle_window::TurtleWindow::new
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/turtle-1.0.0-rc.3/src/turtle_window.rs:23
  17: turtle::turtle::Turtle::new
             at /home/dietrich/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/turtle-1.0.0-rc.3/src/turtle.rs:86
  18: rust_turtle::main
             at ./src/main.rs:4
  19: core::ops::function::FnOnce::call_once
             at /home/dietrich/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@enaut
Copy link
Contributor Author

enaut commented Oct 18, 2020

Actually this seems to be fixed in git.

@enaut enaut closed this as completed Oct 18, 2020
@sunjay
Copy link
Owner

sunjay commented Oct 18, 2020

Hi @enaut. Thanks for reporting this issue. See this comment for more details: #202 (comment)

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

2 participants