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

remove_from_group error when quitting game #45332

Closed
volzhs opened this issue Jan 20, 2021 · 4 comments
Closed

remove_from_group error when quitting game #45332

volzhs opened this issue Jan 20, 2021 · 4 comments

Comments

@volzhs
Copy link
Contributor

volzhs commented Jan 20, 2021

Godot version:

3.2.4 6d5daac

OS/device including version:

not related

Issue description:

Error appears when quitting game.
More precisely, this error occurred when WorldEnvironment node is being removed.

ERROR: remove_from_group: Condition "!data.grouped.has(p_identifier)" is true.
   At: scene/main/node.cpp:1698.

it's a regression from 4954a86.
before this commit, this does not happen.

Steps to reproduce:

  1. Add WorldEnvironment node in scene
  2. Run game
  3. Quit
Node::remove_from_group(Node * const this, const StringName & p_identifier) (scene/main/node.cpp:1697)
WorldEnvironment::_notification(WorldEnvironment * const this, int p_what) (scene/3d/world_environment.cpp:50)
WorldEnvironment::_notificationv(WorldEnvironment * const this, int p_notification, bool p_reversed) (scene/3d/world_environment.h:38)
Object::notification(Object * const this, int p_notification, bool p_reversed) (core/object.cpp:929)
Node::_propagate_exit_tree(Node * const this) (scene/main/node.cpp:305)
Node::_propagate_exit_tree(Node * const this) (scene/main/node.cpp:294)
Node::_propagate_exit_tree(Node * const this) (scene/main/node.cpp:294)
Node::_propagate_exit_tree(Node * const this) (scene/main/node.cpp:294)
Node::_propagate_exit_tree(Node * const this) (scene/main/node.cpp:294)
Node::_propagate_exit_tree(Node * const this) (scene/main/node.cpp:294)
Node::_set_tree(Node * const this, SceneTree * p_tree) (scene/main/node.cpp:2546)
SceneTree::finish(SceneTree * const this) (scene/main/scene_tree.cpp:619)
OS_X11::run(OS_X11 * const this) (platform/x11/os_x11.cpp:3611)
main(int argc, char ** argv) (platform/x11/godot_x11.cpp:56)

Minimal reproduction project:

fxaa_transparent_bg.zip

@volzhs
Copy link
Contributor Author

volzhs commented Jan 20, 2021

cc @lawnjelly

@lawnjelly
Copy link
Member

lawnjelly commented Jan 20, 2021

Is probably an order of update thing, as the collision pairing is now being updated from draw, so it's possible some things are never getting unpaired during shutdown. Will take a look. 👍

It actually occurs with a single world_environment node as the only thing in the scene, which is making debugging easier!

It turns out to be to do with accessing the scenarios in the new update that was put in specifically. It doesn't need to call the BVH to trigger the bug, all it has to do is loop through the scenario_owner scenarios and call get to get a pointer from the RID. So it could be that these are best not updated at this particular point or I need a guard. I'll see if I can fix but if not I'll ask reduz as this is something he will know more about.

@lawnjelly
Copy link
Member

lawnjelly commented Jan 20, 2021

So it turns out the function I was calling to loop through the scenarios in visual_server seems to be debug only. So I've made a PR to revert the problematic bit temporarily, until I've consulted with reduz on the proper way to get access to the scenarios. Am too tired to address this fully tonight.

In the meantime you can turn the BVH off in rendering->quality->spatial_partitioning->use_bvh and it should work as normal.

Function that causes the problem is RID_Owner::get_owned_list. It could be it is not thread safe as well as being debug only.

@akien-mga
Copy link
Member

Fixed by #45335.

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