That made the trace more interesting than 28 couldn’t map PC to fn name’s…
USER ERROR: FATAL: Index p_index = 4294967295 is out of bounds (count = 184).
at: LocalVector<struct BVH_Tree<class GodotCollisionObject3D,2,2,128,class GodotBroadPhase3DBVH::UserPairTestFunction<class GodotCollisionObject3D>,class GodotBroadPhase3DBVH::UserCullTestFunction<class GodotCollisionObject3D>,1,struct AABB,struct Vector3>::TNode,unsigned int,1,0>::operator [] (E:\godotBuild\godot-master\core/templates/local_vector.h:177)
================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.beta.custom_build
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] LocalVector<BVH_Tree<GodotCollisionObject3D,2,2,128,GodotBroadPhase3DBVH::UserPairTestFunction<GodotCollisionObject3D>,GodotBroadPhase3DBVH::UserCullTestFunction<GodotCollisionObject3D>,1,AABB,Vector3>::TNode,unsigned int,1,0>::operator[] (E:\godotBuild\godot-master\core\templates\local_vector.h:177)
[1] PooledList<BVH_Tree<GodotCollisionObject3D,2,2,128,GodotBroadPhase3DBVH::UserPairTestFunction<GodotCollisionObject3D>,GodotBroadPhase3DBVH::UserCullTestFunction<GodotCollisionObject3D>,1,AABB,Vector3>::TNode,unsigned int,1,0>::operator[] (E:\godotBuild\godot-master\core\templates\pooled_list.h:90)
[2] BVH_Tree<GodotCollisionObject3D,2,2,128,GodotBroadPhase3DBVH::UserPairTestFunction<GodotCollisionObject3D>,GodotBroadPhase3DBVH::UserCullTestFunction<GodotCollisionObject3D>,1,AABB,Vector3>::item_move (E:\godotBuild\godot-master\core\math\bvh_public.inc:123)
[3] BVH_Manager<GodotCollisionObject3D,2,1,128,GodotBroadPhase3DBVH::UserPairTestFunction<GodotCollisionObject3D>,GodotBroadPhase3DBVH::UserCullTestFunction<GodotCollisionObject3D>,AABB,Vector3,1>::move (E:\godotBuild\godot-master\core\math\bvh.h:201)
[4] BVH_Manager<GodotCollisionObject3D,2,1,128,GodotBroadPhase3DBVH::UserPairTestFunction<GodotCollisionObject3D>,GodotBroadPhase3DBVH::UserCullTestFunction<GodotCollisionObject3D>,AABB,Vector3,1>::move (E:\godotBuild\godot-master\core\math\bvh.h:141)
[5] GodotBroadPhase3DBVH::move (E:\godotBuild\godot-master\servers\physics_3d\godot_broad_phase_3d_bvh.cpp:45)
[6] GodotCollisionObject3D::_update_shapes (E:\godotBuild\godot-master\servers\physics_3d\godot_collision_object_3d.cpp:182)
[7] GodotCollisionObject3D::_shape_changed (E:\godotBuild\godot-master\servers\physics_3d\godot_collision_object_3d.cpp:236)
[8] GodotPhysicsServer3D::_update_shapes (E:\godotBuild\godot-master\servers\physics_3d\godot_physics_server_3d.cpp:1736)
[9] GodotPhysicsServer3D::body_test_motion (E:\godotBuild\godot-master\servers\physics_3d\godot_physics_server_3d.cpp:920)
[10] PhysicsServer3DWrapMT::body_test_motion (E:\godotBuild\godot-master\servers\physics_server_3d_wrap_mt.h:261)
[11] PhysicsBody3D::move_and_collide (E:\godotBuild\godot-master\scene\3d\physics\physics_body_3d.cpp:109)
[12] CharacterBody3D::_move_and_slide_grounded (E:\godotBuild\godot-master\scene\3d\physics\character_body_3d.cpp:159)
[13] CharacterBody3D::move_and_slide (E:\godotBuild\godot-master\scene\3d\physics\character_body_3d.cpp:108)
[14] call_with_validated_variant_args_ret_helper<CharacterBody3D,bool> (E:\godotBuild\godot-master\core\variant\binder_common.h:375)
[15] call_with_validated_object_instance_args_ret<CharacterBody3D,bool> (E:\godotBuild\godot-master\core\variant\binder_common.h:663)
[16] MethodBindTR<CharacterBody3D,bool>::validated_call (E:\godotBuild\godot-master\core\object\method_bind.h:538)
[17] GDScriptFunction::call (E:\godotBuild\godot-master\modules\gdscript\gdscript_vm.cpp:2094)
[18] GDScriptInstance::callp (E:\godotBuild\godot-master\modules\gdscript\gdscript.cpp:2050)
[19] Node::_gdvirtual__physics_process_call<0> (E:\godotBuild\godot-master\scene\main\node.h:352)
[20] Node::_notification (E:\godotBuild\godot-master\scene\main\node.cpp:60)
[21] Node::_notificationv (E:\godotBuild\godot-master\scene\main\node.h:50)
[22] Node3D::_notificationv (E:\godotBuild\godot-master\scene\3d\node_3d.h:52)
[23] CollisionObject3D::_notificationv (E:\godotBuild\godot-master\scene\3d\physics\collision_object_3d.h:38)
[24] PhysicsBody3D::_notificationv (E:\godotBuild\godot-master\scene\3d\physics\physics_body_3d.h:41)
[25] CharacterBody3D::_notificationv (E:\godotBuild\godot-master\scene\3d\physics\character_body_3d.h:38)
[26] Object::notification (E:\godotBuild\godot-master\core\object\object.cpp:906)
[27] SceneTree::_process_group (E:\godotBuild\godot-master\scene\main\scene_tree.cpp:957)
[28] SceneTree::_process (E:\godotBuild\godot-master\scene\main\scene_tree.cpp:1042)
[29] SceneTree::physics_process (E:\godotBuild\godot-master\scene\main\scene_tree.cpp:491)
[30] Main::iteration (E:\godotBuild\godot-master\main\main.cpp:4014)
[31] OS_Windows::run (E:\godotBuild\godot-master\platform\windows\os_windows.cpp:1686)
[32] widechar_main (E:\godotBuild\godot-master\platform\windows\godot_windows.cpp:181)
[33] _main (E:\godotBuild\godot-master\platform\windows\godot_windows.cpp:206)
[34] main (E:\godotBuild\godot-master\platform\windows\godot_windows.cpp:220)
[35] WinMain (E:\godotBuild\godot-master\platform\windows\godot_windows.cpp:234)
[36] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[37] <couldn't map PC to fn name>
-- END OF BACKTRACE --
================================================================
Do you know if the line numbers get a bit… sketchy?
For instance in godot_physics_server3d.cpp line 1735 contains “_shape_changed()” where as the trace states 1736.
To me, my problem appears to do with changes to collision shapes and then having an indexing issue. Therefore I’m now presuming it’s to do with me enabling and disabling collision shapes on my character so that they can crouch/crawl etc, rather than what I was thinking before about it being to do with the mechanism by which I was determining if they should crouch/crawl etc.
(I did it by enabling and disabling collision shapes as I’d read somewhere that you shouldn’t try to change the collision shapes size, I don’t know how valid that statement was.)
Potentially I could be causing some sort of cross thread timing issue?
I’ve had a quick test with using set_deferred to enable/disable the collision shapes and although it causes some other issues (e.g. it’s now doing it a frame late and my code is probably messing up due to that as it’s testing things at the wrong time/when they are now in the wrong state), but so far it hasn’t crashed - but as I said, it was a quick test…
EDIT: tried fixing the testing of the state of the variables, using set_deferred really messed things up - it’s like gravity is all wrong at times now… One step forward…