#Corrupt scene after Godot crashes

1 messages · Page 1 of 1 (latest)

warm hawk
#

I'm not sure what to do next, that's a lot of progress lost if I cant recover it.

#

Solved. I clicked on Reload Project on the editor.

mossy herald
#

For future reference, this is most often caused by a file's imported variant differing from what's on disk. The word "corrupt" is a lot scarier than what has actually happened, and a reboot will fix this 9/10 times.

warm hawk
#

Actually it seems to be coming back every time i reboot godot or I have to kill it when it freezes.

#

Now its happing on a different scene.

mossy herald
#

This might be a deeper problem. Are any other programs on the same hard disk having any weird issues? Games not loading savefiles, inability to validate logins, etc?

warm hawk
#

Nope everything seems fine. Just godot. I've been coping with Godot freezing when I save scenes, happens 10% of the time when I save. I've got used to it but maybe its related to the problem idk.

#

I have to open the task manager and kill it everytime. This might mess with the files if not closed correctly I'm asssuming.

mossy herald
#

Which version of Godot are you using?

warm hawk
#

4.2.2.stable flathub

mossy herald
#

Hmm.
If you have another hard drive, I'd try moving Godot and your projects to it for the time being. See if these issues still persist. Also, not a bad idea to run a malware scan.

warm hawk
#

I'm on linux so malware scans is not on my list. I am using the flathub version of Godot though, maybe i could try switching to the steam version.

#

is it talking about line 19?

warm hawk
#

Ok. I went and edited the scene file on a text editor and detached the script manually. It seems like the script ID was wrong. I re-attached the script in godot and now it has a new ID.

#

I can now work on my game. But I still have the issue of Godot freezing when loading at times. That is a way deeper problem and I should make a separate post about that instead.

warm hawk
#

Its back. I cant do shit.

#

Its only happening with this script.

mossy herald
#

Are you using an external IDE, by chance?

#

Git integration, too?

warm hawk
#

nope

#

Tried the steam version. Cant even open projects on it.

gentle bolt
#

Does the .gd file exist?

warm hawk
#

Is there any way I can clean the godot cache?

warm hawk
gentle bolt
#

You could delete/move .godot. Probably better to move than delete.

#

Strongly recommend using git or some other source control. It's never to late to start.

warm hawk
#

Yeah i was going to upload it after I finished this scene

gentle bolt
#

What I would do from here is open the scene file in a text editor and see if there is obvious corruption in it: the error message might be telling the truth.

warm hawk
#

Done that. If I detatch/delete the script from the root node it will open fine

#

#1258922288720515244 message

gentle bolt
#

Ah and then you can re-attach it, but whatever "it" is happened again.

warm hawk
#

Then I open godot and attach it again, and when I reopen godot it says its corrupt again

gentle bolt
#

Perhaps there is something about the .gd file it doesn't like, but which isn't immediately visible. Maybe a bad text encoding. I would try replacing the script with a blank one and then, assuming that works, manually move the code back in until it breaks or, hopefully, doesn't.

warm hawk
#

yeah let me try that

#

ok that seemed to work. Let me see what is "corrupting" the scene

#

aaaaand it froze...

#

ok so the problem is this line

gentle bolt
#

Is it possible that's causing a preload cycle? i.e. does loading title.tscn cause gameplay.tscn to be preloaded? I'm not sure if that would cause a problem, but it's what sprung to mind.

warm hawk
#

Im preloading scenes in every menu before the transition. maybe there is a cyclic reference if I do this on compile time?

#

There is no gameplay loading on the title script

#

do you think they're chained and reference indirectly?!

gentle bolt
#

It's possible. It could be one of the other scenes you're preloading eventually hits a preload cycle. But I don't actually know if preload cycles are expected to not work. I think you'd just get a clear error message about it if that were the case.

#

I would try changing the preload that triggers the failure to a load, though, to see if it helps.

warm hawk
#

Maybe godot doesnt register indirect preload cycle references, only direct between 2 scripts

gentle bolt
#

Could easily be.

warm hawk
#

I'll use change_scene_to_file instead of change_scene_to_packed

outer fiber
#

I think it's at least supposed to bail out if a resource attempts to preload itself

#

Because preloading is just a stack of nested calls