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

ERROR: get_child_count: Caller thread can't call this function in this node. #78002

Closed
Hanshattori opened this issue Jun 8, 2023 · 6 comments

Comments

@Hanshattori
Copy link

Godot version

Godot v4.1.beta1

System information

Ubuntu 20.04.5 LTS (Focal Fossa) - Vulkan (Forward+)

Issue description

Hello,

I just tried to migrate my project from 4.0.3 stable to 4.1 beta and I have a very similar looking problem to the issue #77780, but the solution does not work for me and there is also the thread error.

error

Solution in the linked issue was to add the reference to the skeleton, but this was there all the time in my case. This is for a project going back to 4.0 alphas and upon upgrading all characters are locked in place with just the animation playing. Characters and bonemap are from Mixamo. I am not using threads anywhere in the project. I am not calling get_child_count anywhere in the project.

Steps to reproduce

"N/A"

Minimal reproduction project

"N/A"

Complex project, unable to reproduce the issue with minimal reproduction project.

@AThousandShips
Copy link
Member

AThousandShips commented Jun 8, 2023

You need to set up thread safety for your nodes in 4.1, see here, you'll need to eliminate that the threading is the cause before we can really investigate I'd say

@Hanshattori
Copy link
Author

Everything is set at default (inherit) so as per documentation it should then be in a main thread with group order 0.

Few more information :

  • All other scenes seem to be fine, SplashScreen, Startscreen, Loading Screen, Options, GUI, simulation control, other actors, just the characters are locked in place.
  • All functions of the locked characters seem to be fine, process delta running and AnimationPlayer OK and running animations.
  • Remote scene tree seems fine.
  • Not messing with threads.
  • I tried disabling the Thread Model Avoidance in Navigation Project Setting and nothing changed. The same with other thread project and editor settings.
  • Project was updated with every 4.0 beta and I just skipped the 4.1 Dev versions - this error only happens in 4.1.beta

@AThousandShips
Copy link
Member

Then it sounds like a threading bug probably in the editor, the skeleton plugin possibly

@Hanshattori
Copy link
Author

Hanshattori commented Jun 9, 2023

So I did one more test, I removed all the locked characters scenes from the world tree and expected the errors to go away, but I got:

  • the skeleton RID errors are gone as expected.
  • ERROR: get_child_count: Caller thread can't call this function in this node: error persists and prints to the console every 2 seconds.

@AThousandShips
Copy link
Member

AThousandShips commented Jun 9, 2023

Yes this is probably due to a threading bug in the editor, unsure what or why, but it is related to recent threading changes in 4.1

@Hanshattori
Copy link
Author

I tested with 4.1 Stable and the issue seems to be solved.

There is a new problem with baking NavigationMesh3D at a runtime which is extremely slow to the point of stopping the simulation for a second, but I do not think it is related to this issue and I will open a new issue if unable to resolve with further research.

@AThousandShips AThousandShips modified the milestones: 4.2, 4.1 Jul 7, 2023
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

4 participants