You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It crashes after starting and typing few characters (probably even after first keypress)
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21
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:70
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:58
at src/libstd/panicking.rs:200
3: std::panicking::default_hook
at src/libstd/panicking.rs:215
4: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
at src/libstd/panicking.rs:478
5: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:385
6: std::panicking::try::do_call
at src/libstd/panicking.rs:312
7: core::char::methods::<impl char>::escape_debug
at src/libcore/panicking.rs:85
8: core::char::methods::<impl char>::escape_debug
at src/libcore/panicking.rs:49
9: sdl2::keyboard::Mod::from_bits
at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libcore/macros.rs:10
10: sdl2::event::WindowEventId::from_ll
at /Users/kolen/.cargo/registry/src/github.com-1ecc6299db9ec823/sdl2-0.21.0/src/sdl2/event.rs:811
11: sdl2::event::poll_event
at /Users/kolen/.cargo/registry/src/github.com-1ecc6299db9ec823/sdl2-0.21.0/src/sdl2/event.rs:1173
12: <alloc::borrow::Cow<'a, str> as alloc::string::ToString>::to_string
at /Users/kolen/.cargo/registry/src/github.com-1ecc6299db9ec823/sdl2-0.21.0/src/sdl2/event.rs:1219
13: <rustzx::app::events::events_sdl::EventsSdl as rustzx::app::events::EventDevice>::pop_event
at src/app/events/events_sdl.rs:113
14: rustzx::app::rustzx::RustzxApp::start
at src/app/rustzx.rs:109
15: rustzx::main
at src/main.rs:54
16: std::rt::lang_start::{{closure}}
at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
17: std::panicking::try::do_call
at src/libstd/rt.rs:49
at src/libstd/panicking.rs:297
18: panic_unwind::dwarf::eh::read_encoded_pointer
at src/libpanic_unwind/lib.rs:92
19: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
at src/libstd/panicking.rs:276
at src/libstd/panic.rs:388
at src/libstd/rt.rs:48
20: std::rt::lang_start
at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
21: rustzx::main
Figured out that it's unrelated to Rust-SDL2/rust-sdl2#780, "safe unwrap" was added here only for keydown, not keyup. It was fixed in some other commit in sdl2, probably related to C wrapping and struct alignment.
master
branch (dd40dc4)It crashes after starting and typing few characters (probably even after first keypress)
Unwrap occurs in
sdl2/event.rs
insdl2
crate.It does not occur in branch with latest version of sdl2. Probably fixed by this PR in sdl2: Rust-SDL2/rust-sdl2#780
The text was updated successfully, but these errors were encountered: