godot: Godot fails to open a scene, claiming a script is missing, but the script is there!
Godot version
v4.1.1.stable.official [bd6af8e0e]
System information
Godot v4.1.1.stable - Arch Linux #1 SMP PREEMPT_DYNAMIC Thu, 06 Jul 2023 18:35:54 +0000 - Vulkan (Forward+) - dedicated AMD Radeon RX 6800 XT (RADV NAVI21) () - AMD Ryzen 9 3900X 12-Core Processor (24 Threads)
Issue description
When I was working on my game, changing stuff in scripts, at some point the game started crashing during normal play, I’ve found that it throws an error… that makes absolutely no sense. It says a property doesn’t exist on a scene that uses a script that has that property.
Then opening a scene that uses this script fails claiming the script is missing. It’s not missing though - it’s there, and other scenes using it open fine. What’s even weirder is that all of these problems aren’t there if I go back one commit in my game’s git repository, even though the faulty commit didn’t affect the feral script or the troublesome scene.
Here’s a thorough video demonstration of the issue. I tried a few versions of Godot and had the same results. I’ve recorded the video using an Arch-Linux provided binary for 4.1.1 stable, but I tested again on an official build from Godotengine.org and had the exact same problem.
I tried clearing .godot to force a full project reimport, I tired running the editor with _sc_ (self-contained mode) and renaming existing editor_data folder to have a clean slate - no change.
Please watch the video for a deeper context and more detail: https://youtu.be/gmFhS-m0AUM
Steps to reproduce
The only reproduction steps I can provide is to open my game’s project and try it on your system:
- Follow the guide here: https://codeberg.org/Liblast/Liblast#_how_to_edit_the_game TL;DR: clone the repository with git-LFS, or it won’t work.
- Test the
mainbranch and see if the game works (it should as it does in my video). - Then checkout this commit and see if it fails like it does in my video: https://codeberg.org/Liblast/Liblast/commit/915cbc735f2a416bc2985e02ea0c2bc838c8e012
Minimal reproduction project
N/A
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 19 (9 by maintainers)
Oh… Hmm. I wonder why Godot arrived at such an error message. Do you think something like this could be made explicitly recognized by Godot, so users can get an error that’d let them fix the problem?
This works! I can carry on with my project - however, I have no idea how you’ve found that this is the problem. Are preload a mindefield still? They used to cause some horrible problems, so I got rid of all preloads like a year+ ago, but I’ve seen that problem was fixed so I started using them again - looks like they are still dangerous…
In my case I had to fix the broken scripts. I didn’t try clearing the cache, but they were new files, so it likely wouldn’t help.