stevenarella
stevenarella copied to clipboard
Crashes joining my papermc 1.16.5 on macos: index out of bounds: the len is 0 but the index is 0', protocol/src/types/bit/map.rs:112:15
Hi,
I'm using stevenarella's latest build and joining my server on mac crashes (I can try later on windows):
$ RUST_BACKTRACE=full ./Stevenarella.app/Contents/MacOS/stevenarella -s pluto.5pi.de -u foobar
[main.rs:254][INFO] Starting steven
[main.rs:348][INFO] Shader version: #version 150
[main.rs:99][INFO] Detected server protocol version 754
[main.rs:99][INFO] Detected server protocol version 754
[main.rs:99][INFO] Detected server protocol version 754
[server/mod.rs:176][WARN] Server is running in offline mode
[server/mod.rs:1900][INFO] Received chat message: foobar joined the game
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', protocol/src/types/bit/map.rs:112:15
stack backtrace:
0: 0x1101d2c64 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha0848bb2602b5d05
1: 0x1101f2b10 - core::fmt::write::h9f3ccac2ef682b93
2: 0x1101cba26 - std::io::Write::write_fmt::h0a47673aab280496
3: 0x1101d4aa9 - std::panicking::default_hook::{{closure}}::h850c6aaf5e80c2f5
4: 0x1101d476d - std::panicking::default_hook::h037801299da6e1c6
5: 0x1101d512b - std::panicking::rust_panic_with_hook::h76436d4cf7a368ac
6: 0x1101d4c55 - std::panicking::begin_panic_handler::{{closure}}::h516c76d70abf04f6
7: 0x1101d30d8 - std::sys_common::backtrace::__rust_end_short_backtrace::h653290b4f930faed
8: 0x1101d4bba - _rust_begin_unwind
9: 0x11021298f - core::panicking::panic_fmt::hde9134dd19c9a74f
10: 0x110212956 - core::panicking::panic_bounds_check::h113b9975c3dbe523
11: 0x110017d01 - steven_protocol::types::bit::map::Map::get::hb4155ee827f4de61
12: 0x10fc34ac9 - stevenarella::world::World::load_chunk19_or_115::h152fdc6a3aa1d39f
13: 0x10fbdf306 - stevenarella::server::Server::entity_tick::hd99c0797d58c9ac4
14: 0x10fbdad44 - stevenarella::server::Server::tick::hb14a177974776e22
15: 0x10fba2ee0 - stevenarella::tick_all::h235132609ce74d37
16: 0x10fb4684e - stevenarella::main2::{{closure}}::h76dcdd2530f2d042
17: 0x10fb2c0bb - <winit::platform_impl::platform::app_state::EventLoopHandler<T> as winit::platform_impl::platform::app_state::EventHandler>::handle_nonuser_event::hf5addc1f98d13fba
18: 0x10fe0c319 - winit::platform_impl::platform::app_state::Handler::handle_nonuser_event::hb9adefcb39bda450
19: 0x10fe0dd73 - winit::platform_impl::platform::app_state::AppState::cleared::h9240a38d9103db14
20: 0x7fff20459dad - <unknown>
21: 0x7fff20459c3d - <unknown>
22: 0x7fff20459221 - <unknown>
23: 0x7fff204586ce - <unknown>
24: 0x7fff286e0630 - <unknown>
25: 0x7fff286e042c - <unknown>
26: 0x7fff286e014f - <unknown>
27: 0x7fff22c789b1 - <unknown>
28: 0x7fff22c77177 - <unknown>
29: 0x7fff22c6968a - <unknown>
30: 0x10fb7b734 - winit::platform_impl::platform::event_loop::EventLoop<T>::run::hf33ddff80146ccf9
31: 0x10fb904e1 - winit::event_loop::EventLoop<T>::run::h46f94000383188a8
32: 0x10fba6f36 - stevenarella::main::h0361e41fa3853d3b
33: 0x10fbab24a - std::sys_common::backtrace::__rust_begin_short_backtrace::h6a019544ed6d0dd2
34: 0x10fbf646c - std::rt::lang_start::{{closure}}::h6ffffad1cf670318
35: 0x1101d5584 - std::rt::lang_start_internal::h36ccce6e8a047133
36: 0x10fba7869 - _main
No experiences with rust (yet), but if you point me into the right direction, I can try debugging this further. The problem seems that the bit::map it calls get on from load_chunk19_or_115, probably here? https://github.com/iceiix/stevenarella/blob/8ca12a69cecb5935abf71ac766e752b94ea09b30/src/world/mod.rs#L1065 Maybe data is empty? Data comes from https://github.com/iceiix/stevenarella/blob/8cecbb37e3677c9d8061c4272361f31f9088a705/src/server/mod.rs#L568 but not sure about the best way to trace from which of the packet handlers.
I can send you a wireshark capture if that helps, just not sure if it contains sensitive account stuff.. But I can reliably reproduce it by connecting to my server (pluto.5pi.de) with any user.