Skip to content
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

Crash being registered with some bound checks missing #76

Open
raffaeleragni opened this issue Oct 3, 2024 · 0 comments
Open

Crash being registered with some bound checks missing #76

raffaeleragni opened this issue Oct 3, 2024 · 0 comments

Comments

@raffaeleragni
Copy link

raffaeleragni commented Oct 3, 2024

log config:

let log_plugin = LogPlugin {
    level: log::Level::INFO,
    filter: "info,capture_bevy_logs=info".into(),
    custom_layer: bevy_console::make_layer,
};

command used:

use bevy::prelude::*;
use bevy_console::{AddConsoleCommand, ConsoleCommand};
use clap::Parser;

pub fn init(app: &mut App) {
    app.add_console_command::<Test, _>(test_command);
}

#[derive(Parser, ConsoleCommand)]
#[command(name = "test")]
struct Test {}

fn test_command(mut log: ConsoleCommand<Test>) {
    let Some(Ok(Test {})) = log.take() else {
        return;
    };
    error!("test");
}

thread 'Compute Task Pool (22)' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_console-0.12.1/src/console.rs:363:37:
byte index 1516 is out of bounds of 2024-10-03T11:50:57.921184Z ERROR test
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::str::slice_error_fail_rt
3: core::str::slice_error_fail
4: core::ops::function::FnOnce::call_once{{vtable.shim}}
5: egui::ui::Ui::with_layout_dyn
6: core::ops::function::FnOnce::call_once{{vtable.shim}}
7: egui::containers::scroll_area::ScrollArea::show_viewport_dyn
8: core::ops::function::FnOnce::call_once{{vtable.shim}}
9: egui::ui::Ui::with_layout_dyn
10: core::ops::function::FnOnce::call_once{{vtable.shim}}
11: egui::containers::resize::Resize::show
12: core::ops::function::FnOnce::call_once{{vtable.shim}}
13: egui::ui::Ui::scope_dyn
14: egui::containers::collapsing_header::CollapsingState::show_body_unindented
15: egui::containers::window::Window::show_dyn
16: core::ops::function::impls::<impl core::ops::function::FnMut for &mut F>::call_mut
17: <bevy_ecs::system::function_system::FunctionSystem<Marker,F> as bevy_ecs::system::system::System>::run_unsafe
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant