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

Pin Joints throw errors when freed. #38434

Closed
Tracked by #45334
ghost opened this issue May 3, 2020 · 2 comments
Closed
Tracked by #45334

Pin Joints throw errors when freed. #38434

ghost opened this issue May 3, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented May 3, 2020

Godot version:
8426ed2

OS/device including version:
Win10 64-bit

Issue description:
When freeing joints with attachments that are freed after the bodies they connect, they will throw errors. It seems that it doesn't check if their collision exceptions are freed or not, before removing them.

I don't know the history of this prior issue, but it may mean this is a regression: #2383

Also, it may mean anything else that cleans up collision exceptions may do this also if freed in a particular order.

godot windows tools 64_2020-05-03_15-26-44

The trace.

godot.windows.tools.64.exe!RID_Owner<Body2DSW>::get(const RID & p_rid) Line 150	C++
godot.windows.tools.64.exe!Physics2DServerSW::body_remove_collision_exception(RID p_body, RID p_body_b) Line 965	C++
godot.windows.tools.64.exe!Physics2DServerSW::joint_disable_collisions_between_bodies(RID p_joint, const bool p_disable) Line 1131	C++
godot.windows.tools.64.exe!Physics2DServerWrapMT::joint_disable_collisions_between_bodies(RID p1, const bool p2) Line 282	C++
godot.windows.tools.64.exe!Joint2D::_update_joint(bool p_only_free) Line 43	C++
godot.windows.tools.64.exe!Joint2D::_notification(int p_what) Line 116	C++
godot.windows.tools.64.exe!Joint2D::_notificationv(int p_notification, bool p_reversed) Line 40	C++
godot.windows.tools.64.exe!PinJoint2D::_notificationv(int p_notification, bool p_reversed) Line 78	C++
godot.windows.tools.64.exe!Object::notification(int p_notification, bool p_reversed) Line 934	C++
godot.windows.tools.64.exe!Node::_propagate_exit_tree() Line 306	C++
godot.windows.tools.64.exe!Node::_set_tree(SceneTree * p_tree) Line 2553	C++
godot.windows.tools.64.exe!Node::remove_child(Node * p_child) Line 1264	C++
godot.windows.tools.64.exe!Node::_notification(int p_notification) Line 171	C++
godot.windows.tools.64.exe!Node::_notificationv(int p_notification, bool p_reversed) Line 46	C++
godot.windows.tools.64.exe!CanvasItem::_notificationv(int p_notification, bool p_reversed) Line 166	C++
godot.windows.tools.64.exe!Node2D::_notificationv(int p_notification, bool p_reversed) Line 38	C++
godot.windows.tools.64.exe!Joint2D::_notificationv(int p_notification, bool p_reversed) Line 40	C++
godot.windows.tools.64.exe!PinJoint2D::_notificationv(int p_notification, bool p_reversed) Line 78	C++
godot.windows.tools.64.exe!Object::notification(int p_notification, bool p_reversed) Line 934	C++
godot.windows.tools.64.exe!Object::_predelete() Line 388	C++
godot.windows.tools.64.exe!predelete_handler(Object * p_object) Line 2054	C++
godot.windows.tools.64.exe!memdelete<Object>(Object * p_class) Line 114	C++
godot.windows.tools.64.exe!SceneTree::_flush_delete_queue() Line 1112	C++
godot.windows.tools.64.exe!SceneTree::iteration(float p_time) Line 489	C++
godot.windows.tools.64.exe!Main::iteration() Line 2015	C++
godot.windows.tools.64.exe!OS_Windows::run() Line 3159	C++
godot.windows.tools.64.exe!widechar_main(int argc, wchar_t * * argv) Line 162	C++
godot.windows.tools.64.exe!_main() Line 184	C++
godot.windows.tools.64.exe!main(int _argc, char * * _argv) Line 196	C++
[External Code]

Steps to reproduce:
Have a pin joint where it's connections are freed just before it is freed. Minimal project demonstrates this with a button press.

Minimal reproduction project:
Pin Joint Errors.zip

@ghost
Copy link
Author

ghost commented Dec 23, 2020

@pouleyKetchoupp Probably a super minor thing, I recall it just being and ordering issue in the source code.

@rburing
Copy link
Member

rburing commented Feb 28, 2022

This issue was fixed somewhere between 3.2.4-beta5 and 3.2.4-beta6, and it is still fixed in both 3.x and master, so this issue can be closed.

@Calinou Calinou closed this as completed Feb 28, 2022
@Calinou Calinou added this to the 3.3 milestone Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants