Skip to content

Crash, when body collides with just despawned entity #946

@sphinxc0re

Description

@sphinxc0re

Related to version 0.6.0-rc.1

With the following reproduction:

https://github.com/sphinxc0re/avian_06_bug_repro

Just run cargo run.

The game crashes and the following error is thrown:

thread 'Compute Task Pool (7)' (32593) panicked at /[REDACTED]/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/avian2d-0.6.0-rc.1/src/collision/broad_phase/bvh_broad_phase.rs:229:52:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `avian2d::collision::broad_phase::bvh_broad_phase::collect_collision_pairs<()>`!
Encountered a panic in system `avian2d::schedule::run_physics_schedule`!
Encountered a panic in system `bevy_app::main_schedule::FixedMain::run_fixed_main`!
Encountered a panic in system `bevy_time::fixed::run_fixed_main_schedule`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!

EDIT: Enabled debug mode for bevy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions