Skip to content

Panic when regular body collide with multi-body #907

@newDINO

Description

@newDINO

Scenario:
A cube connected to ground using multi body joint. Another cube fall to the ground. After a while, the simulation crashed.

Backtrace:

thread 'main' (569197) panicked at ***/nalgebra-0.34.1/src/base/matrix_view.rs:290:9:
Matrix slicing out of bounds.
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: rapier3d::dynamics::solver::contact_constraint::generic_contact_constraint_element::GenericRhs::apply_impulse
   3: rapier3d::dynamics::solver::contact_constraint::generic_contact_constraint::GenericContactConstraint::warmstart
   4: rapier3d::dynamics::solver::contact_constraint::contact_constraints_set::ContactConstraintsSet::warmstart
   5: rapier3d::dynamics::solver::velocity_solver::VelocitySolver::solve_constraints
   6: rapier3d::dynamics::solver::island_solver::IslandSolver::init_and_solve
   7: rapier3d::pipeline::physics_pipeline::PhysicsPipeline::step
   8: rapier_testbed3d::harness::Harness::step_with_graphics
   9: rapier_testbed3d::testbed::update_testbed
  10: <bevy_ecs::system::function_system::FunctionSystem<Marker,F> as bevy_ecs::system::system::System>::run_unsafe

I created an example for reproduction at newDINO/rapier@bd20ccd.

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