I’m getting this
error at random times, I can’t find a pattern and the error does not say where it comes from, does anyone know what it could be?
E 0:14:29:0989 get_shape_transform: FATAL: Index p_index = 0 is out of bounds (shapes.size() = 0).
<C++ Source> servers/physics_2d/godot_collision_object_2d.h:121 @ get_shape_transform()```
It happens at random times. At search it seems this appears when there is no collision shape, but I have all shapes set and I don't remove any shapes ever...
Just wanted to add, have the same issue with v4.3. I’d hoped to give more information but I’ve checked all my collision objects to have shapes. I don’t manipulate any of the shapes by code.
It’s really hard for me to debug since somebody else is having these issues without being able to reproduce them consistently in any shape or form. Crashes like this within a few minutes.
if you have “Run on Separate Trhead” enabled physics/2d/run/_on_separate_trhead. Make sure you don’t use “await get_tree().process_frame” inside the _physics_process(delta).Also do not manipulate node instances and the like in this process
That’s all I can offer
@cristh Many thanks for your response. Tracked down all instances of me doing node manipulation in the physics_process, none existed. So ended up disabling the run_on_seperate_thread flag and that seemed to have fixed things. So that’s a workaround for anyone reading.
Multithreads work at different times. And that time can vary depending on the processor’s disposition. In my case I solved that error by not instantiating things in _physics_process(delta: float) since it works as a separate thread. Sometimes it asks if there is something that has not been instantiated yet. Or it is instantiated without the parent existing. Various situations can happen and unfortunately the engine does not inform you of the error promptly.