Skip to content
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

Broken Scene / Error Reporting #80043

Open
Tracked by #80877
power-spike opened this issue Jul 30, 2023 · 5 comments · May be fixed by #80854
Open
Tracked by #80877

Broken Scene / Error Reporting #80043

power-spike opened this issue Jul 30, 2023 · 5 comments · May be fixed by #80854

Comments

@power-spike
Copy link

Godot version

v4.1.1.stable.official [bd6af8e] (also office 4.1)

System information

Windows 10

Issue description

I had a system Error - and a forced reboot. When attempting to Load the Project I was working on, I got the following error:-
Scene file 'MainGane.tscn' appears to be invalid/corrupt.

I spent ages trying to work out what was wrong with it.

(after a lot of Googling) I loaded Godot with "--verbose -e --path" via the command line.

Then I saw the Error Message:-
Failed loading resource: res://Scenes/GuiItems/PlanetPanel.tscn. Make sure resources have been imported by opening the project in the editor at least once.

Note: This error Did not showup in the Debug Panel in the Editor - only on the Commandline.

Attempted to workout the issue - but it wasn't obvious - did a lot more googling, and then added -d to the command line.

There then was an additional error message:-
res://Scenes/GuiItems/PlanetPanel.tscn:37 - Parse Error: Can't load cached ext-resource id: 1_7k1dj.

It would be a great help if the Editor would give us some type of stack trace when something is broken. I'm still working out the issue currently, however, The UI is telling me there's an issue with MainGame when the Error appears to be with a resource that is included via another scene as a resource.

Even if there is a Details Button on the error window.
It would be great to see something like:-

Error in Loading Cached ext-resource id: 1_7_k1dj in PlanetPanel.tscn:37
called from PlanetPlanel:37
called from MainGame.tscn:51

With -d --verbose:-
image

Loading the Editor from the Shortcut:-
image

Steps to reproduce

A Broken Scene File / Resource (Scene A / Resource A)
Include it From another Scene (Scene B).
Include it from another Scene (Scene C).

Scene C reports a generic Error - while the real issue is in Scene A/Resource A

Minimal reproduction project

I am not sure how to do this.

@asafing
Copy link

asafing commented Jul 30, 2023

I encountered the same exact error, it keeps happening on a specific file. After looking at the .tscn manually everything seemed fine, I wonder if this is a 4.1 thing?

@asafing
Copy link

asafing commented Jul 30, 2023

A small fix up I did was renaming both the .tscn and .gd files, then reloading godot. Kinda annoying but at least it worked

@dalexeev
Copy link
Member

dalexeev commented Aug 3, 2023

Scene file 'MainGane.tscn' appears to be invalid/corrupt.

Perhaps the cause is cyclic resource dependencies. If you have preload() of the scene in GDScript, try replacing it with load() and restarting the editor. See #74253. However, the errors are slightly different, maybe the problem is different.

@power-spike
Copy link
Author

Greetings,

Thank you very much - that WAS what was causing it. (I think I was starting to go crazy!)

However, the Lack of details with the Error message is a problem. There is a reason it didn't load - but it wasn't supplied, which was the main reason for this bug report.

  • J

@arran-nz
Copy link

@dalexeev Thank you! The error is indeed very misleading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants