-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Godot fails to open a scene, claiming a script is missing, but the script is there! #79840
Comments
Can you provide a minimal way to reproduce this? The commit diff is pretty sizeable and it could be a change someone forgot to stage for all I know. |
I have stashed all changes and switched to a different branch and it did work there - wouldn't that mean that any unstaged changes were rolled back at this point? I then went back to the faulty commit without popping the stash and the problem occured again.That seems to indicate only the committed changes have had impact here, no? |
I can try the repro steps later today, but changes that big can make it harder to figure out the exact cause. Sorry if that came out as being aggressive. |
This might happen if the script has error or it preloads anything with an error. I just had a similar problem when upgrading an addon from Godot 3. |
No problem. I'll try to narrow it down a bit, but I'm not sure when and how successful it'll be. |
Wouldn't that be fixed after restarting Godot and/or clearing the import cache? |
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. |
Yeah, I've done a |
Usually there should be some error in the external console, pointing to some filenames. |
Hmm. I didn't check there. I assumed the debugger would tell me what's up |
Can you post the full output you see when trying to load the scene? (from the console) |
@KoBeWi Here you go:
|
I'd suspect |
Ok I managed to open the scene. In |
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. |
Preloads are fine, but in global classes they can cause problems apparently. |
I can confirm this issue ! There is a problem with "class_name" and preload. After removing the class_name in another class with preloads (which was not causing the issue) fixed the issue. |
Can confirm I too had this issue ( specifically #80324 ) and removing class_name definitions from all my scripts that were using preloads "fixed" the issue:
|
Godot version
v4.1.1.stable.official [bd6af8e]
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 existingeditor_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:
main
branch and see if the game works (it should as it does in my video).Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: