coeuvre / rust-2048

A 2048 clone with Piston game engine
MIT License
236 stars 40 forks source link

Update piston dependencies #40

Closed tormol closed 1 year ago

tormol commented 1 year ago

To fix panic from mem::uninitialized() when compiled with Rust >= 1.48.

tormol commented 1 year ago

Panic message:

thread 'main' panicked at 'attempted to leave type `&back_end::PositionFormat` uninitialized, which is invalid', library/core/src/panicking.rs:123:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_nounwind_fmt
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:93:14
   2: core::panicking::panic_nounwind
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:123:5
   3: <gfx_graphics::back_end::PositionFormat as gfx::pso::buffer::Structure<gfx_core::format::Format>>::query
   4: <gfx_graphics::back_end::pipe_colored::Init as gfx::pso::PipelineInit>::link_to
   5: gfx_graphics::back_end::Gfx2d<R>::new
   6: <piston_window::PistonWindow<W> as window::BuildFromWindowSettings>::build_from_window_settings
   7: rust_2048::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread caused non-unwinding panic. aborting.
Aborted
tormol commented 1 year ago

I've merged this together with #32 and #39 on the master branch of my fork.

coeuvre commented 1 year ago

Thanks!