angered-ghandi / OpenAOE

An open source reimplementation of Age of Empires (1997)
Other
66 stars 6 forks source link

Pressing some keys will attempt to unwrap an Option::None #70

Open phrohdoh opened 7 years ago

phrohdoh commented 7 years ago

Keys I've noticed so far (macOS fwiw):

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libcore/option.rs:323
stack backtrace:
   1:        0x101a60d2a - std::sys::imp::backtrace::tracing::imp::write::hd8952e96bd20f4b7
   2:        0x101a62f8f - std::panicking::default_hook::{{closure}}::hfd6ba86ea4dd6ba9
   3:        0x101a62c37 - std::panicking::default_hook::h44ade8c78c995294
   4:        0x101a63456 - std::panicking::rust_panic_with_hook::h3e771863e3ed8403
   5:        0x101a632a4 - std::panicking::begin_panic::h0af46715c5e7593e
   6:        0x101a63212 - std::panicking::begin_panic_fmt::h9509a584fa230ae8
   7:        0x101a63177 - rust_begin_unwind
   8:        0x101a8b070 - core::panicking::panic_fmt::h5c28b8150c75bd71
   9:        0x101a8af74 - core::panicking::panic::h5a5908307feab3a0
  10:        0x1019f75d6 - sdl2::event::Event::from_ll::he12c6c24071abb84
  11:        0x1019f85b9 - <sdl2::event::EventPollIterator<'a> as core::iter::iterator::Iterator>::next::hf7e0a920b41f4ec9
  12:        0x1019ee04f - <open_aoe_media::media::SdlMedia as open_aoe_media::media::Media>::update::h67cd70e1a30201ee
  13:        0x1019becf6 - open_aoe::main::h6e476f01caa294f3
  14:        0x101a642aa - __rust_maybe_catch_panic
15: 0x101a637f6 - std::rt::lang_start::hefd96b70277e8a4a
phrohdoh commented 7 years ago

I cannot reproduce this anymore.

phrohdoh commented 7 years ago

Suddenly I am running into this issue again.

phrohdoh commented 7 years ago

I believe I fixed this by updating to a not-yet-released rust-sdl2.

If that is the case I'll close this again after rust-sdl2 sees an update.