Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when adding, moving and removing 3D physics nodes with collision shapes in Godot physics #47438

Closed
Tracked by #45333
qarmin opened this issue Mar 28, 2021 · 0 comments · Fixed by #47668
Closed
Tracked by #45333

Comments

@qarmin
Copy link
Contributor

qarmin commented Mar 28, 2021

Godot version:
3.3.rc.custom_build. ed1f5c2

OS
Ubuntu 20.04 - Ubuntu 3.36 X11

Issue description:
When I add in one frame 3d nodes(KinematicBody, StaticBody etc.) with collision shapes and Godot physics, then in next frame Godot crashes

Address sanitizer log with backtrace:

servers/physics/shape_sw.cpp:1019:30: runtime error: reference binding to null pointer of type 'const struct Vector3'
servers/physics/shape_sw.cpp:1019:16: runtime error: load of null pointer of type 'const struct Vector3'
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] godots() [0x1736270] (/mnt/Miecz/godot3.2/platform/x11/crash_handler_x11.cpp:54)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7fc116d11210] (??:0)
[3] ConvexPolygonShapeSW::get_supports(Vector3 const&, int, Vector3*, int&, ShapeSW::FeatureType&) const (/mnt/Miecz/godot3.2/servers/physics/shape_sw.cpp:1019)
[4] SeparatorAxisTest<BoxShapeSW, ConvexPolygonShapeSW, true>::generate_contacts() (/mnt/Miecz/godot3.2/servers/physics/collision_solver_sat.cpp:746 (discriminator 2))
[5] godots() [0x10d2d699] (/mnt/Miecz/godot3.2/servers/physics/collision_solver_sat.cpp:1466)
[6] sat_calculate_penetration(ShapeSW const*, Transform const&, ShapeSW const*, Transform const&, void (*)(Vector3 const&, Vector3 const&, void*), void*, bool, Vector3*, float, float) (/mnt/Miecz/godot3.2/servers/physics/collision_solver_sat.cpp:2313)
[7] CollisionSolverSW::solve_static(ShapeSW const*, Transform const&, ShapeSW const*, Transform const&, void (*)(Vector3 const&, Vector3 const&, void*), void*, Vector3*, float, float) (/mnt/Miecz/godot3.2/servers/physics/collision_solver_sw.cpp:251)
[8] SpaceSW::test_body_motion(BodySW*, Transform const&, Vector3 const&, bool, float, PhysicsServer::MotionResult*, bool) (/mnt/Miecz/godot3.2/servers/physics/space_sw.cpp:786 (discriminator 3))
[9] PhysicsServerSW::body_test_motion(RID, Transform const&, Vector3 const&, bool, PhysicsServer::MotionResult*, bool) (/mnt/Miecz/godot3.2/servers/physics/physics_server_sw.cpp:965)
[10] KinematicBody::move_and_collide(Vector3 const&, bool, KinematicBody::Collision&, bool, bool) (/mnt/Miecz/godot3.2/scene/3d/physics_body.cpp:1119 (discriminator 1))
[11] KinematicBody::move_and_slide(Vector3 const&, Vector3 const&, bool, int, float, bool) (/mnt/Miecz/godot3.2/scene/3d/physics_body.cpp:1182)
[12] MethodBind6R<Vector3, Vector3 const&, Vector3 const&, bool, int, float, bool>::call(Object*, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/./core/method_bind_ext.gen.inc:309 (discriminator 28))
[13] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/core/object.cpp:919 (discriminator 1))
[14] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/mnt/Miecz/godot3.2/core/variant_call.cpp:1149 (discriminator 1))
[15] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript_function.cpp:1089)
[16] GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript.cpp:1208)
[17] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/core/object.cpp:898 (discriminator 1))
[18] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/mnt/Miecz/godot3.2/core/variant_call.cpp:1149 (discriminator 1))
[19] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript_function.cpp:1089)
[20] GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript.cpp:1208)
[21] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/core/object.cpp:898 (discriminator 1))
[22] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/mnt/Miecz/godot3.2/core/variant_call.cpp:1149 (discriminator 1))
[23] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript_function.cpp:1089)
[24] GDScriptInstance::call_multilevel(StringName const&, Variant const**, int) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript.cpp:1224)
[25] Node::_notification(int) (/mnt/Miecz/godot3.2/scene/main/node.cpp:67)
[26] Node::_notificationv(int, bool) (/mnt/Miecz/godot3.2/./scene/main/node.h:46 (discriminator 14))
[27] Object::notification(int, bool) (/mnt/Miecz/godot3.2/core/object.cpp:931)
[28] SceneTree::_notify_group_pause(StringName const&, int) (/mnt/Miecz/godot3.2/scene/main/scene_tree.cpp:993)
[29] SceneTree::iteration(float) (/mnt/Miecz/godot3.2/scene/main/scene_tree.cpp:486 (discriminator 2))
[30] Main::iteration() (/mnt/Miecz/godot3.2/main/main.cpp:2100)
[31] OS_X11::run() (/mnt/Miecz/godot3.2/platform/x11/os_x11.cpp:3641)
[32] godots(main+0x326) [0x172cefc] (/mnt/Miecz/godot3.2/platform/x11/godot_x11.cpp:57)
[33] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fc116cf20b3] (??:0)
[34] godots(_start+0x2e) [0x172cb1e] (??:?)

Steps to reproduce:

  1. Run minimal project

Minimal reproduction project:
T3.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants