Skip to content

Sudden crash when rebuilding collider of static body #919

@Lineoo

Description

@Lineoo

Entities

  • two dynamic: one player and one tool
  • one joint: a distance joint between the player and tool
  • one static: terrain (compose of multiple 2d voxel colliders)

What happened

The terrain need rebuild its collider when being modified, and randomly it crashed.

Traceback

avain2d-0.4.0 with bevy 0.17.2

thread 'thread -' (-) panicked at /home/-/.cargo/registry/src/-/avian2d-0.4.0/src/dynamics/solver/constraint_graph.rs:173:9:
assertion failed: !is_static1 || !is_static2
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/b01cc1cf01ed12adb2595c4696321ee722ef545e/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/b01cc1cf01ed12adb2595c4696321ee722ef545e/library/core/src/panicking.rs:80:14
   2: core::panicking::panic
             at /rustc/b01cc1cf01ed12adb2595c4696321ee722ef545e/library/core/src/panicking.rs:150:5
   3: avian2d::dynamics::solver::constraint_graph::ConstraintGraph::push_manifold
   4: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
   5: bevy_ecs::system::system::System::run_without_applying_deferred
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in system `avian2d::collision::narrow_phase::update_narrow_phase<avian2d::collision::collider::parry::Collider, ()>`!
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`!

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