-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Packed scene files sometimes get "corrupted" when moving files within editor #77289
Comments
Can you reproduce this on 3.5.2? |
I also got a corrupt scene today after moving files in the editor (4.0.3 RC1), likely same issue but not sure. I believe I had one of the relevant scenes open while doing the move, and I got a glitched popup with some pinkish background but no visible text. Next time I opened that scene it was corrupt. Fixed it with version control because I couldn't tell what was wrong with the file. |
I got a corrupted tscn file yesterday as well, using 4.0.3. It was regarding an inherited scene, but I can't recall if it was the base or the derived scene that lost the type attribute. Happened after moving some files too. I quickly found the problem since I'm using git and could just do a diff to spot the corruption, so I fixed it and went on with what I was doing and forgot about it 😅 I'll take better note if it happens again. |
this happended to me today, moved a scene and all its materials to another folder in the editor and now the scene is corrupted. v4.0.3.stable.mono.official [5222a99] |
This just bit me as well using 4.1.1.stable.mono. In my experience it only happens when you move an inherited scene. |
Steps to reproduce in 4.1.1:
a_inherited.tscn before move
a_inherited.tscn after move
When you move both files at the same time, Godot will crash (#79850) |
It seems to be due to the timing of saving the scene. Therefore, to reproduce this issue, it is necessary to ensure that the inherited scene is opened. godot/editor/filesystem_dock.cpp Lines 1877 to 1897 in c495eb5
There are two I'm not sure about the purpose of the second call (L1897). If it is necessary, then godot/editor/filesystem_dock.cpp Line 1534 in c495eb5
godot/editor/filesystem_dock.cpp Line 1625 in c495eb5
|
Moving the directory may result in the path not being updated. Peek.2023-09-16.07-22.mp4 |
Thank you so much. I've been looking around for answers and this was by far the most useful. Saved me a tonne of pain of remaking the scene(s) |
I just encountered this in 4.2.1. And the second half of this line: When I updated the original with the above it mostly fixed it. I had to redo the sprite to get it to show up when used in a tilemap. |
Godot version
4.0.3
System information
Windows 11
Issue description
I reorganised a project by dragging some files (various types including .tscn, .tres, .gd, images) into subdirectories within the project's filetree. This was all done within the editor.
After doing this I found two scene files would not open, giving the alarming popup message "scene file is invalid/corrupt".
After panicked googling and deleting the .godot directory (which did not fix the problem), I found that the problem was that scene A (the scene named in the message) contained an instance of scene B, and in scene B's .tscn file, the root node had been saved with a name but no type, i.e. instead of the line in the .tscn file saying:
[node name="PlayerScene" type="ActorScene" groups=["players"]]
It said:
[node name="PlayerScene"]
So Godot seems to have "lost" the root node's type when moving the scene file. Manually typing in the missing info enabled the file to load. The other "corrupt" scene depended on this scene, so it now loaded as well.
This seems like a really serious bug, as it means Godot's management of the project filetree is untrustworthy. It's worsened by the fact that the message produced by the editor is so opaque and unhelpful. It doesn't even identify the file causing the problem (scene B).
Steps to reproduce
Not sure but I think it would involve having a scene that contains child nodes which are instances of other scenes, then moving the .tscn files to other directories.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: