Godot Version
4.2.1 stable
Question
When creating the level, I was creating audio lighting and all that, nothing complicated that in my opinion could cause an error, but nevertheless, after re-entering from the scene, I got this error, and it would be fine if at least something hinted at the origin of this error, but no. No information. What should I do in this situation? I would not really like to recreate most of the work. When trying to enter the desired scene by any means, he throws it to an earlier stage of th
e scene.
1 Like
Yes, I tried deleting resources through a text file, but either I did something wrong or it didn’t help me, at least it gave me this:
Yes, you may have to google that too. Maybe you deleted some delimiter.
E.g. I found this:
Open res://Nodes/Maps/Level.tscn
with a text editor (instead of the engine) - it is likely missing a opening bracket [
in the first line (for whatever reason).
So maybe using external editor to edit the text files.
I tried to find where this symbol is missing, but unsuccessfully, I tried for a very long time to find where it is missing, studied all these lines, but nothing helped. I guess I’ll have to do everything for you.
But thanks a lot for the help anyway.
did you try reloading current project?
the reddit answer also tell the same
Yes i do, but it still not working
did you have exported project/build for this project?
you might want reverse engineering it to recover that specific scene back
I also had this problem happen in my project. One of the solutions in the Reddit thread (although way down, so it’s easy to miss) that worked for me was to rename the “corrupt” scene (eg: scene → scene2), reload the project / exit Godot completely, then load the project and see if I could open the scene normally. It worked for me and, afterwards, I renamed it back to its original name (scene) and had no issues reloading the project.
However, every time that I open up my project for the first time in the day, I get the corrupt message again and have to redo the whole procedure. It might be on every PC restart, but I keep my computer running through the day so I’m not sure.
An interesting thing is that I rebuilt the scene completely, from scratch. I called it the same as the previous one, and for that session everything worked perfect. The next day though, it once again gave me a corrupt message and I had to do the whole rename / reload trick.
I did reuse the original script in the rebuilt scene, so I don’t know if it could be related to that. I also used the same name, so that could be how I replicated it. I don’t see any point in redoing the code since I would probably get the same results, but I’ll try renaming the scene and seeing if that still makes the error pop.
I also had this error and I seem to have solved it with my project.
I opened the file in a text editor and compared it with another .tscn file. In the invalid/corrupt scene file there were two ext_resource components (Texture2D and Script), but they where in reversed order compared to the working scene file.
It was:
[ext_resource type="Texture2D" uid="uid://dblgmiaquojew" path="res://Assets/Sprites/toad.png" id="2_6gejd"]
[ext_resource type="Script" path="res://Player/player.gd" id="1_dnhet"]
The working file had the Script resource first, so I did that with the invalid/corrupt file and that solved the problem and I can open my project normally again.
Weirdly enough, when I open the scene file in a text editor, the order is back to Texture2D and the Script, but I don’t get the error anymore.
1 Like
Alright, that didn’t help, because opening the project today gave me the error again.
But I found a possible solution in a YouTube comment.
The video is “Fix corrupted Godot scenes (4.1.1)” by godotsimon and the comment is by @plyczkowski, saying:
“Here’s what working for me to fix this error: close editor, search in the .editor folder for all files containing the corrupted scene’s name (they are going to be name something like your_scene_name.tscn-editstate-2e5312b3e75d2338868814f479b1feeb.cfg), delete them, restart editor.”
This seems to be working for me.
1 Like
In my case the error was due to a TileMap in bad state, containing some tiles that belonged to an atlas that was removed from the TilesSet. I thought I had removed all tiles from that atlas before removing it, and while the editor was open, there were no issues… when I closed the scene and tried to reopen it is when the error happened…
The fix in my case was to go back a couple of commits in my git history, to be able to open the scene, and then update the TileSet atlas propely for the TileMap in that scene and removed the broken tiles
I also had the same problem, in my case i didnt had any problems with the files when i check in Visual Studio, so then i edited the next script:
This script was trying to load the scene that Godot was telling me it was corrupt
After commenting the lines the scene worked every time even after opening and closing the project.
1 Like