dimforge / parry

2D and 3D collision-detection library for Rust.
https://parry.rs
Apache License 2.0
556 stars 96 forks source link

Crash in epa3.rs #246

Open ethereumdegen opened 1 month ago

ethereumdegen commented 1 month ago

Getting a crash on this linein epa3 around line 313 i believe:

let mut best_face_id = *self.heap.peek().unwrap();

I dont know what is causing it in my instance yet but why is this an unwrap? seems unsafe.

 thread 'Compute Task Pool (2)' panicked at /home/andy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parry3d-0.15.1/src/query/epa/epa3.rs:313:50:
called `Option::unwrap()` on a `None` value
ethereumdegen commented 1 month ago

I have narrowed it down more.. Spawning a Collider with a Sensor but without a RigidBody or Dynamicbody reliably causes this crash for me in my app

Adding a DynamicBody or RigidBody component makes it NOT crash anymore