0 votes

I was on the brink of finishing a game and then decided to take a break. Made sure everything was working and pushed my most recent changes to github. One month later I come to open up my game and it will not open. Godot seems to just freeze once I open the game I would like to open, even though it doesn't crash when I try to open a different game.

I get the following errors when I try to load the game, none of them seem like they would make Godot crash...I should still be able to get in there and edit. But Godot is stuck and won't open

ERROR: _load_data: Condition "!f" is true. Returned: ERR_CANT_OPEN
   At: scene/resources/texture.cpp:502
ERROR: Failed loading resource: res://.import/bowl.png-db6f57ab3692867dcfd5d1a34709a9e6.stex. Make sure resources have been imported by opening the project in the editor at least once.
   At: core/io/resource_loader.cpp:278
ERROR: Failed loading resource: res://Sprites/Objects/bowl.png. Make sure resources have been imported by opening the project in the editor at least once.
   At: core/io/resource_loader.cpp:278
SCRIPT ERROR: GDScript::reload: Parse Error: Can't preload resource at path: res://Sprites/Objects/bowl.png
          At: res://Scripts/Global.gd:9
ERROR: reload: Method failed. Returning: ERR_PARSE_ERROR
   At: modules/gdscript/gdscript.cpp:599
ERROR: Script does not inherit a Node: res://Scripts/Global.gd.
   At: editor/editor_autoload_settings.cpp:357
ERROR: Another resource is loaded from path 'res://Fonts/TrulyMadlyDpad-a72o.ttf' (possible cyclic resource inclusion).
   At: core/resource.cpp:82

Things i've tried: deleting my project folder and re-cloning from GitHub, deleting Godot and reinstalling, restarting my computer, reverting to a previous state in GitHub that the game worked in just fine.

Any suggestions here? I'm at a loss for what to do!! Hope someone can help!

Here's my GitHub link if that helps.. https://github.com/resquenazi/godot_game.git

Godot version 3.2.3
in Engine by (45 points)

I'm guessing you also checking out slightly older versions of game, using git log and git checkout <some_version_hash>. Did you get the same problem?

yeah I discovered the point in my previous version where godot will finally load the game....it seems to be that a .gitignore file was created and was ignoring certain files like default_env.tres. Its still not working but I might be getting close. Any suggestions?

*.stex files are just the png plus the header files pushed together. I would regenerate them. You could quickly experiment by destroying your entire .import directory and that should cause it to regenerate.

Is Globals.gd (line 9) your script?

Thanks for your help everyone. I ended up being able to find a previous version in my git log history that worked. I believe at some point, the default_env.tres file began to be ignored by a.gitignore that I don't recall ever creating. Its all a bit of a mystery but I was able to go look at each commit after the glitched one and manually make the changes on a new git branch. I think the moral of the story is to check your commits and make sure no .gitignore files are being created, otherwise git will ignore important changes being made to your game.

1 Answer

0 votes

Here are a few leads, they are independent from one another.

Forcefully reimporting everything

Warning: Make a backup first!
miss_bisque mentioned having the project under git, but if someone else finds this answer, make *at least one copy* of your project folder somewhere safe before trying this.

Delete .import/
Run the following command in the root of the project folder (containing project.godot).
    find . -path *.import -delete
Open the project inside the Editor and wait for the imports to finish.

If the Editor fails to reimport a specific file and goes into an import death-loop, you can selectively restore a .import by copy pasting it, or with git by doing a git restore <filepath>

Recreating a project.godot

Create a new project inside the project selector, close the Editor, then copy everything to the new project except the project.godot. If it works again, you can manually put in all the information back. Note that project.godots are fairly readable, meaning you can read the corrupt one to know what to enter back graphically.

Git specific

Knowing the exact version which caused the issue to start, you can look though every file that changed.
Do a git checkout <good version's hash>, check that it works, and then, for every file that changes in the following commit, do a git checkout <first bad version's hash> -- <file's path> and check it it breakes the project. (You can go faster by putting folder paths, and then restarting with entries in the incriminated folder).
You should end up with the exact file that caused the issue.

by (2,482 points)
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 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 webmaster@godotengine.org with your username.