-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bevy 0.10.1, crash when changing the exit condition #121
Comments
I cannot reproduce your error message, but I also get panics when changing the |
I made following mini bevy project, when I try to run it I get the same crash as mentioned before. Do you here also not get the error? And thanks a lot for this project btw, helps a lot :) Cargo.toml: [package]
name = "reproduce_exit_condition_crash"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bevy = { version = "0.10.1" }
bevy_asset_loader = "0.16.0"
# Enable a small amount of optimization in debug mode
[profile.dev]
opt-level = 1
# Enable a lot of optimization in release mode
[profile.release]
codegen-units = 1
# Enable high optimizations for dependencies (incl. Bevy), but not for our code:
[profile.dev.package."*"]
opt-level = 3
main.rs: use bevy::DefaultPlugins;
use bevy::prelude::*;
use bevy::window::ExitCondition;
use bevy_asset_loader::prelude::*;
#[derive(Debug, Clone, Copy, Default, Eq, PartialEq, Hash, States)]
enum AppState {
#[default]
LoadMainMenu,
MainMenu,
}
fn main() {
let mut app = App::new();
app.add_state::<AppState>()
.add_loading_state(
LoadingState::new(AppState::LoadMainMenu)
.continue_to_state(AppState::MainMenu),
);
app.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
title: format!("Reproduce Crash"),
..default()
}),
exit_condition: ExitCondition::DontExit, // Crash
..default()
}));
app.run();
} |
I investigated this a bit more last weekend. The underlying problem seems to be in Bevy I will fix it for |
In the newest bevy release, they fixed that the game crashes when changing the
exit_condition
in theWindowPlugin
7950. When trying to run my game withexit_condition
being anything else thanOnAllClosed
, it crashes.Interstingly, it first says 4 times that the loading state is done:
2023-04-01T11:07:27.685445Z INFO bevy_asset_loader::loading_state::systems: Loading state 'MainMenu' is done 2023-04-01T11:07:27.685494Z INFO bevy_asset_loader::loading_state::systems: Loading state 'MainMenu' is done 2023-04-01T11:07:27.685531Z INFO bevy_asset_loader::loading_state::systems: Loading state 'MainMenu' is done 2023-04-01T11:07:27.685561Z INFO bevy_asset_loader::loading_state::systems: Loading state 'MainMenu' is done
The error:
2023-04-01T11:07:27.686809Z WARN bevy_ecs::schedule::schedule: schedule with label LoadingStateSchedule(DoneLoadingMainMenu) not found thread 'main' panicked at 'The schedule with the label LoadingStateSchedule(DoneLoadingMainMenu) was not found.', C:\Users\zwaze\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\bevy_ecs-0.10.1\src\world\mod.rs:1743:32
The text was updated successfully, but these errors were encountered: