amethyst / amethyst-starter-2d

Seed project for 2D games
Other
201 stars 42 forks source link

fails to run on linux #22

Closed f64u closed 3 years ago

f64u commented 3 years ago

Os: manjaro linux

Error with RUST_BACKTRACE=1:

thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', /home/fadya/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:483
   1: core::panicking::panic_fmt
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:85
   2: core::panicking::panic
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:50
   3: core::mem::uninitialized
             at /home/fadya/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658
   4: winit::platform::platform::x11::util::input::<impl winit::platform::platform::x11::xdisplay::XConnection>::query_pointer
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/util/input.rs:94
   5: winit::platform::platform::x11::window::UnownedWindow::new::{{closure}}
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/window.rs:91
   6: core::option::Option<T>::unwrap_or_else
             at /home/fadya/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:424
   7: winit::platform::platform::x11::window::UnownedWindow::new
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/window.rs:90
   8: winit::platform::platform::x11::Window::new
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/x11/mod.rs:1368
   9: winit::platform::platform::Window::new
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/platform/linux/mod.rs:148
  10: winit::window::<impl winit::WindowBuilder>::build
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.19.5/src/window.rs:157
  11: amethyst_window::system::WindowSystem::from_config
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_window-0.15.3/src/system.rs:32
  12: <amethyst_window::bundle::WindowBundle as amethyst_core::bundle::SystemBundle>::build
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_window-0.15.3/src/bundle.rs:60
  13: <amethyst_rendy::plugins::window::RenderToWindow as amethyst_rendy::bundle::RenderPlugin<B>>::on_build
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_rendy-0.15.3/src/plugins.rs:98
  14: <amethyst_rendy::bundle::RenderingBundle<B> as amethyst_core::bundle::SystemBundle>::build
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_rendy-0.15.3/src/bundle.rs:92
  15: <amethyst_core::deferred_dispatcher_operation::AddBundle<B> as amethyst_core::deferred_dispatcher_operation::DispatcherOperation>::exec
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst_core-0.15.3/src/deferred_dispatcher_operation.rs:175
  16: amethyst::game_data::GameDataBuilder::build_dispatcher::{{closure}}
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.15.3/src/game_data.rs:473
  17: core::iter::traits::iterator::Iterator::try_for_each::call::{{closure}}
             at /home/fadya/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1930
  18: core::iter::traits::iterator::Iterator::try_fold
             at /home/fadya/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1888
  19: core::iter::traits::iterator::Iterator::try_for_each
             at /home/fadya/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:1933
  20: amethyst::game_data::GameDataBuilder::build_dispatcher
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.15.3/src/game_data.rs:470
  21: <amethyst::game_data::GameDataBuilder as amethyst::game_data::DataInit<amethyst::game_data::GameData>>::build
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.15.3/src/game_data.rs:489
  22: amethyst::app::ApplicationBuilder<S,T,E,X>::build
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.15.3/src/app.rs:895
  23: amethyst::app::CoreApplication<T,E,R>::new
             at /home/fadya/.cargo/registry/src/github.com-1ecc6299db9ec823/amethyst-0.15.3/src/app.rs:202
  24: amethyst_starter_2d::main
             at ./src/main.rs:41
  25: core::ops::function::FnOnce::call_once
             at /home/fadya/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
awarebayes commented 3 years ago

Same

simg commented 3 years ago

same on Ubuntu 20.04. error happens as soon as the mouse cursor enters the window.

actually, it seems I get the same error on the all the example apps in the main amethyst (0.15.3) repo

simg commented 3 years ago

seems like it's this issue https://github.com/amethyst/amethyst/issues/2524

fixed by downgrading to rust 1.47.0

rustup default 1.47.0

git2013vb commented 2 years ago

It not work for me.

After rustup I have this error:


error[E0391]: cycle detected when computing the supertraits of `into_mint::IntoMint`
  --> /home/vale/.cargo/registry/src/github.com-1ecc6299db9ec823/mint-0.5.8/src/into_mint.rs:10:1
   |
10 | pub trait IntoMint: Into<Self::MintType> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: ...which again requires computing the supertraits of `into_mint::IntoMint`, completing the cycle
note: cycle used when collecting item types in module `into_mint`
  --> /home/vale/.cargo/registry/src/github.com-1ecc6299db9ec823/mint-0.5.8/src/into_mint.rs:10:1
   |
10 | pub trait IntoMint: Into<Self::MintType> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0391`.
error: could not compile `mint`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed```