Cant launch project due to ammo error

hey everyone,

I get this error when trying to launch and I have no clue why. I tried deleting ammo library and re-importing it - didnt work.

any clues?

You are rapidly creating an Ammo object with var object = new Ammo, but not destroying it with Ammo.destroy(object) afterwards. As a result, the Ammo runs out of allocated memory.

i didnt change anything in the code, it just suddenly did this ?

Hard to say without knowing the code. Check your code and see if you create new Ammo objects in a large loop or in the .update(dt) method. If you do, destroy the object before the function/loop ends.

If you need the object after the function/loop ends, create the object outside the loop and use it inside the loop. Destroy when no longer needed.

The OOM error you see is caused when Ammo runs out of memory. If you create a tiny object, like a vector, many times, then the error will not happen immediately - it will take time to fill the allocated memory with that object. If you create a large object, perhaps a custom mesh, then the memory will run out pretty fast and you’ll get an error.