0 votes

Hello everyone!

So I am experiencing an issue where several instances of a scene are being created within gdscript and my game will lock up at some point during this process. When it locks up the profiler does not show any issues occuring with frame time, physics processing, or anything for that matter. The game does not crash or stop responding, it just locks up. Up until the moment that the game locks up the FPS is always above 2000. I have disabled every part of my code except for the part that is calling .instance() on a scene resource that I have preloaded and then adding the new scene instance as a child of my level. Does anyone have any idea what could cause this? I saw a few topics online that seem to be vaguely related and the solution for those was something to do with calldeferred but attempting to replace all of my calls to .instance() and addchild() with deferred calls yielded the same result. There are no errors logged to the console at any point.

There are also a fair number of calls to .free() on Area nodes. I read online that this could potentially cause problems so people generally recommend using .queue_free() but my game produces the same freezing issue regardless of which one I use.

Also as a more general question, what types of problems could the user create which cause the engine to behave this way? Specifically instances where the game essentially breaks like this without logging any errors.

Thanks,
Tyler

Godot version 3.5.stable
in Engine by (12 points)

most common cause of game stopping in normal frame rate is yield()
Do You have any ?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.