cBournhonesque / lightyear

A networking library to make multiplayer games for the Bevy game engine
https://cbournhonesque.github.io/lightyear/book
Apache License 2.0
492 stars 50 forks source link

Rare panic #582

Open simbleau opened 3 months ago

simbleau commented 3 months ago

Just got a rare panic, happened as a client disconnected.

2024-08-11T18:53:05.317603Z  INFO lightyear::transport::webtransport::server: Spawning new task to create connection with client: 127.0.0.1:57085
2024-08-11T18:53:05.464442Z  INFO lightyear::server::connection: New connection from id: Netcode(11142225529793762537)
2024-08-11T18:53:05.642142Z  INFO server::auth::online::systems: Netcode(11142225529793762537) joined as a guest named Guest 6
thread 'main' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytes-1.7.1/src/bytes.rs:287:9:
range end out of bounds: 4311115823277539380 <= 1156
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `lightyear::server::networking::receive`!
thread 'Compute Task Pool (2)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.1/src/system/system_param.rs:629:17:
Resource requested by lightyear::shared::events::systems::push_component_events<lightyear::shared::replication::components::PrePredicted, lightyear::server::connection::ConnectionManager> does not exist: lightyear::server::connection::ConnectionManager
Encountered a panic in system `lightyear::shared::events::systems::push_component_events<lightyear::shared::replication::components::PrePredicted, lightyear::server::connection::ConnectionManager>`!
thread 'Compute Task Pool (3)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.1/src/system/system_param.rs:629:17:
Resource requested by lightyear::shared::events::systems::push_component_events<leafwing_input_manager::action_state::ActionState<nova::protocol::inputs::PlayerAction>, lightyear::server::connection::ConnectionManager> does not exist: lightyear::server::connection::ConnectionManager
Encountered a panic in system `lightyear::shared::events::systems::push_component_events<leafwing_input_manager::action_state::ActionState<nova::protocol::inputs::PlayerAction>, lightyear::server::connection::ConnectionManager>`!
thread 'Compute Task Pool (3)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.1/src/system/system_param.rs:629:17:
Resource requested by lightyear::shared::events::systems::push_component_events<lightyear::client::prediction::prespawn::PreSpawnedPlayerObject, lightyear::server::connection::ConnectionManager> does not exist: lightyear::server::connection::ConnectionManager
Encountered a panic in system `lightyear::shared::events::systems::push_component_events<lightyear::client::prediction::prespawn::PreSpawnedPlayerObject, lightyear::server::connection::ConnectionManager>`!
thread 'Compute Task Pool (3)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.1/src/system/system_param.rs:534:17:
Resource requested by lightyear::shared::replication::plugin::send::ReplicationSendPlugin<lightyear::server::connection::ConnectionManager>::tick_send_interval_timer does not exist: lightyear::shared::time_manager::TimeManagerthread '
Compute Task Pool (0)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.1/src/system/system_param.rs:629:17:
Resource requested by lightyear::shared::events::systems::push_component_events<lightyear::shared::replication::hierarchy::ParentSync, lightyear::server::connection::ConnectionManager> does not exist: lightyear::server::connection::ConnectionManager
Encountered a panic in system `lightyear::shared::events::systems::push_component_events<lightyear::shared::replication::hierarchy::ParentSync, lightyear::server::connection::ConnectionManager>`!
Encountered a panic in system `lightyear::shared::replication::plugin::send::ReplicationSendPlugin<lightyear::server::connection::ConnectionManager>::tick_send_interval_timer`!
thread 'Compute Task Pool (3)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.1/src/system/system_param.rs:629:17:
Resource requested by lightyear::server::input::leafwing::receive_input_message<nova::protocol::inputs::PlayerAction> does not exist: lightyear::server::connection::ConnectionManager
Encountered a panic in system `lightyear::server::input::leafwing::receive_input_message<nova::protocol::inputs::PlayerAction>`!
thread 'Compute Task Pool (3)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.1/src/system/system_param.rs:629:17:
Resource requested by lightyear::shared::events::systems::push_entity_events<lightyear::server::connection::ConnectionManager> does not exist: lightyear::server::connection::ConnectionManager
Encountered a panic in system `lightyear::shared::events::systems::push_entity_events<lightyear::server::connection::ConnectionManager>`!
thread 'Compute Task Pool (3)' panicked at /Users/simbleau/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.1/src/system/system_param.rs:629:17:
Resource requested by lightyear::shared::events::systems::clear_events<lightyear::server::connection::ConnectionManager> does not exist: lightyear::server::connection::ConnectionManager
Encountered a panic in system `lightyear::shared::events::systems::clear_events<lightyear::server::connection::ConnectionManager>`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
cBournhonesque commented 3 months ago

This might just have been fixed recently: https://github.com/cBournhonesque/lightyear/pull/581 not 100% sure though, but those kinds of panics remind me of this