amethyst / amethyst-starter-2d

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

`platform::platform::x11::util::input::PointerState` uninitialized #25

Open edu-live opened 3 years ago

edu-live commented 3 years ago

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

IlyaBizyaev commented 3 years ago

Same here, attaching more detailed logs:

[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.15.3
[INFO][amethyst::app] Platform: x86_64-unknown-linux-gnu
[INFO][amethyst::app] Amethyst git commit: UNKNOWN
[INFO][amethyst::app] Rustc version: 1.50.0 Stable
[INFO][amethyst::app] Rustc git commit: cb75ad5db02783e8b0222fee363c5f63f7e2cf5b
[INFO][winit::platform::platform::x11::window] Guessed window DPI factor: 1.25
[WARN][gfx_backend_vulkan] Unable to find layer: VK_LAYER_LUNARG_standard_validation
thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', ~/.rustup/toolchains/stable-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/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/panicking.rs:50:5
   3: core::mem::uninitialized
             at ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:659:9
   4: winit::platform::platform::x11::util::input::<impl winit::platform::platform::x11::xdisplay::XConnection>::query_pointer
             at winit-0.19.5/src/platform/linux/x11/util/input.rs:94:51
   5: winit::platform::platform::x11::EventsLoop::process_event
             at winit-0.19.5/src/platform/linux/x11/mod.rs:956:45
   6: winit::platform::platform::x11::EventsLoop::poll_events
             at winit-0.19.5/src/platform/linux/x11/mod.rs:270:13
   7: winit::platform::platform::EventsLoop::poll_events
             at winit-0.19.5/src/platform/linux/mod.rs:522:44
   8: winit::EventsLoop::poll_events
             at winit-0.19.5/src/lib.rs:277:9
   9: <amethyst_window::system::EventsLoopSystem as shred::system::RunNow>::run_now
             at amethyst_window-0.15.3/src/system.rs:116:9
  10: shred::dispatch::dispatcher::Dispatcher::dispatch_thread_local
             at shred-0.10.2/src/dispatch/dispatcher.rs:113:13
  11: shred::dispatch::dispatcher::Dispatcher::dispatch
             at shred-0.10.2/src/dispatch/dispatcher.rs:65:9
  12: amethyst::game_data::GameData::update
             at amethyst-0.15.3/src/game_data.rs:47:13
  13: <T as amethyst::state::State<amethyst::game_data::GameData,amethyst::state_event::StateEvent>>::update
             at amethyst-0.15.3/src/state.rs:345:9
  14: amethyst::state::StateMachine<T,E>::update
             at amethyst-0.15.3/src/state.rs:447:21
  15: amethyst::app::CoreApplication<T,E,R>::advance_frame
             at amethyst-0.15.3/src/app.rs:379:13
  16: amethyst::app::CoreApplication<T,E,R>::run
             at amethyst-0.15.3/src/app.rs:243:13
  17: amethyst_starter_2d::main
             at ./src/main.rs:42:5
  18: core::ops::function::FnOnce::call_once
             at ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
IlyaBizyaev commented 3 years ago

Apparently, the example crashes (with the above stack trace) as soon as hovered with the mouse pointer. window

ElHyperion commented 3 years ago

I can confirm, as soon as I hover with mouse over the example, I get these errors:

(I'm on Linux Manjaro KDE)


thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', /home/hyperion/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:660:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(524288) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(65536) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(8192) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(262144) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(4194304) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(1024) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(2097152) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(720896) is still used
[ERROR][rendy_memory::allocator::dedicated] Not all allocation from DedicatedAllocator was freed
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(2048) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(16384) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(256) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(1048576) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(131072) is still used
[ERROR][rendy_descriptor::allocator] Not all descriptor sets were deallocated
[ERROR][rendy_descriptor::allocator] Descriptor pool is still in use during allocator disposal. DescriptorPool { size: 64, free: 55, freed: 0 }
[ERROR][rendy_descriptor::allocator] Not all descriptor sets were deallocated
[ERROR][rendy_descriptor::allocator] Descriptor pool is still in use during allocator disposal. DescriptorPool { size: 64, free: 61, freed: 0 }
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
<<< last message about Escape repeated about 50 times >>>
krummja commented 3 years ago

Same issue here - running on Ubuntu.

niklasstich commented 3 years ago

Just encountered the same error, Manjaro Linux GNOME 21.0.7, R9 280x, amdgpu driver.

binao commented 3 years ago

Possible duplicate of https://github.com/amethyst/amethyst/issues/2524. Can be resolved by compiling with older Rust version (see https://github.com/amethyst/amethyst/issues/2524#issuecomment-817255546) until amethyst v0.16.0 is released.