I just got finished with my text based game in Godot 3.1.1 however I've run into an issue that causes the game to crash when exported. I am very new to game development so I really have no clue how to fix it.

Here's the problem. I have many yield coroutines within functions to act as a timer node without having to create a timer node. Basically a way to wait for (x) seconds before continuing to run through the program. I looks like this:

yield(get_tree().create_timer(0.2), "timeout")

I honestly don't know exactly how it works cause I just found it with a google search. It does exactly what I need it to do except it generates errors that read Resumed after yield, but class instance is gone. When expanded, it reads modules/gdscript/gdscript_function.cpp:1771 @ _signal_callback(). It seems this error comes up between 2-5 times when my scene is loaded and not when the yield is actually being executed. Also, another one of my scenes uses the exact same line of code but doesn't have this error.

Any help would be greatly appreciated and I've attached the zip file for anyone to look through. (P.S. I am aware that the code is atrocious and could be done way better. I'm new to programming so this was the way I thought of doing it and I had a deadline so syntax wasn't my highest priority.)

Thanks in advance!!! :)

@Deaton64 Thanks so much for the suggestion. The link you sent actually helped me a lot. I found out that the errors were occurring in a different scene that I thought and when it switched scenes, this error came up. I was able to swap out the yield for a Timer node since the programming for that scene wasn't too complicated. I still used the yield command in my other scene but for some reason the error doesn't pop up. I don't know why but I'm just glad the issue's gone :)

However, when I export my game, it crashes as soon as I try to open it. I thought that getting rid of all the errors would fix this but it didn't and now I have no idea what to do next :(

Not sure it's something in your project as I've downloaded the version above and it exports and runs on my Windows 10 PC using version 3.1 beta 4.

@Deaton64 Hmmmm. That's really strange. I think I'm going to make another post on this issue now that this one has been resolved. Thanks for the help and for testing it on your PC.

3 years later