Testbed2d example panicked at the beginning

Error:

thread 'main' panicked at 'attempted to leave type na::ArrayStorage<bool, na::U2, na::U1> uninitialized, which is invalid', C:\Users\PC\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\mem\mod.rs:658:9

I bet it’s because rust version and nalgebra version, right?

I’m using:

[dependencies]

nalgebra   = "0.18"

ncollide2d = "0.20"

nphysics2d = "0.12"

nphysics_testbed2d = "0.6"

cargo 1.48.0

Hi!

Yes, this error existed in older version of nalgebra. It is caused by a new assertion added to recent versions of the Rust compiler. So you need to update to more recent version of nalgebra/ncollide/nphysics to make this work.

1 Like

Thanks for the reply.
I tested all possible combinations but are always some errors.

If I update nalgebra to the last version and keep the rest as it is, I have errors like:
expected struct nalgebra::base::matrix::Matrix, found struct na::Matrix`

If I update all to the last version I have the following error:
expected struct nphysics2d::world::mechanical_world::MechanicalWorld, found struct nphysics2d::world::MechanicalWorld`