Control Scene Corrupting

Using Godot Version 4.2, on Windows 11 Pro, project located on a Linux Subsystem installation (Ubuntu 22.04.2)

Greetings, I am currently having the problem of a simple menu scene continually corrupting. From what the editor is telling me, no nodes exist in the scene (not true).

The Scene’s root node is a Control node. I have not been modifying it outside of the editor (or really at all). I have tried to isolate the problem by removing the single “preload” declaration from the scene, but that does not help (I can still open the associated script).

I am using a version control repo, so this isn’t totally dire or anything, but I find it interesting how it keeps happening to the same scene.

My game structure, up to that point looks something like this…

Game : Singleton/Autoload (called on boot, loading any save files)

splash → main menu (the problem scene) → map select → etc…

Splash & main menu are both control nodes, and the Game singleton successfully loads the game before main menu is called (there are not dependencies between them).

I’ve been keeping my project very encapsulated, so to avoid simple errors. I’ve also searched these forms are tried several suggestions (like checking the scene dependencies from the built-in explorer) but nothing has really solved the issue.

So I am now a bit perplexed as to why this keeps happening? Prior to this I was writing my save logic, but save paths are separate from res, so it really seems unlikely that, this would be the issue.

Any ideas or constructive comments are appreciated, thanks!

*EDIT: I forgot to mention, that the scene itself runs just fine, without any errors.

What does version control say has changed?

All changes that were made between now and last I could open the scene, where done on unrelated scenes. I could show you the commit history but it would be irrelevant, as no changes were made to the scene in question (and no changes to scene who are associated with it).

The only changes I saw that could have effected it were in the Game singleton file, where I changed my game’s save/load to record using ConfigFile, changed from JSON previously. Though I should mention the errors I am experience happen in the editor, not at run-time.

First things first, spin up an empty project and recreate the error context as minimally as possible and share it here so we can test locally.

If not possible, can your share your whole project?

1 Like

OK I took what you said about Version control and that it kept happening to mean you were reverting back to a previous commit and it’d work for a while, but then get corrupted again.

What are the actual errors you’re getting? If it’s just in the editor my first thought is some sort of access/ open file issue with wsl. Odd that it’s just that one file though.

1 Like

I have re-created my project up to that point, and copied over the associated scripts. You can see it here, the problem doesn’t seem to be coming up this time though. I think I may just end up deleting the file and making a new one.

1 Like

Okay, I walked away from my computer for an hour and returned, booted up Godot and now the error is gone. I can open up the scene just fine now without errors :sweat_smile:. I recreated the project to that point here. I’ll be more mindful of this in the future and try to record as many details as possible in an effort to find a possible bug!

1 Like