![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Eric De Sedas |
Hello, I’m trying to create a bullet hell battle mechanic in my game, and I’m creating both Areas and Shapes directly inside the Physics2DServer, which I think relates to the issue at hand. Now, for the issue:
For some reason, my game is randomly crashing while executing with the following message:
E 0:00:51.259 is_shape_set_as_disabled: FATAL: Index p_idx = 0 is out of bounds (shapes.size() = 0). <C++ Source> servers/physics_2d/collision_object_2d_sw.h:153 @ is_shape_set_as_disabled()
Which tells me that the crash comes from a bug with a collision object querying something, but I’m not sure where to go from there. Also, each time this crash happens, the game AND the editor freeze for several seconds, like what happens when the editor itself is about to crash.
I tried to run the game from the terminal as well to try to get more info on the error, and I got the following output:
handle_crash: Program crashed with signal 11 Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues [1] 1 libsystem_platform.dylib 0x00007fff6acc242d _sigtramp + 29 [2] 2 ??? 0x0000000000000000 0x0 + 0 [3] BroadPhase2DHashGrid::move(unsigned int, Rect2 const&) (in Godot) + 342 [4] CollisionObject2DSW::_update_shapes() (in Godot) + 170 [5] CollisionObject2DSW::_shape_changed() (in Godot) + 14 [6] Physics2DServerSW::free(RID) (in Godot) + 74 [7] CommandQueueMT::flush_one(bool) (in Godot) + 134 [8] Physics2DServerWrapMT::thread_loop() (in Godot) + 142 [9] ThreadPosix::thread_callback(void*) (in Godot) + 85 [10] 10 libsystem_pthread.dylib 0x00007fff6accde65 _pthread_start + 148 [11] 11 libsystem_pthread.dylib 0x00007fff6acc983b thread_start + 15
And finally: this is the core logic I’m using to create the bullets:
I’m not sure what’s exactly happening or how to properly debug issues with the Physics server directly, so any help would be greatly appreciated.