thebracket / rustyroguelike

Following along with the /r/roguelikedev tutorial session, in Rust and implementing my own library as well!
MIT License
131 stars 2 forks source link

Panic on latest version #1

Open Steampunkery opened 5 years ago

Steampunkery commented 5 years ago

Hello, When running the newest version with cargo run --release using a fresh clone and the latest version of rust, I get this panic message:

thread 'main' panicked at 'index out of bounds: the len is 4000 but the index is 4294962055', /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libcore/slice/mod.rs:2701:14
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   6: rust_begin_unwind
             at src/libstd/panicking.rs:308
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::panicking::panic_bounds_check
             at src/libcore/panicking.rs:61
   9: <rltk::simple_console::SimpleConsole as rltk::console::Console>::set_bg
  10: <rltk::rltk::Rltk as rltk::console::Console>::set_bg
  11: rusty_roguelike::game::gui::render
  12: <rusty_roguelike::game::gamestate::State as rltk::GameState>::tick
  13: rltk::rltk::tock
  14: winit::platform_impl::platform::sticky_exit_callback
  15: winit::platform_impl::platform::x11::EventLoop<T>::run
  16: winit::platform_impl::platform::EventLoop<T>::run
  17: winit::event_loop::EventLoop<T>::run
  18: rltk::rltk::main_loop
  19: rusty_roguelike::main
  20: std::rt::lang_start::{{closure}}
  21: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:293
  22: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:85
  23: std::rt::lang_start_internal
             at src/libstd/panicking.rs:272
             at src/libstd/panic.rs:394
             at src/libstd/rt.rs:48
  24: main
  25: __libc_start_main
  26: _start

Please let me know if you need any additional information.

thebracket commented 5 years ago

Yikes - sorry about the slow response, only just saw this. I'll see what I can come up with over the weekend! Thanks for letting me know.