Godot Version
4.4.1
Question
Randomly, about 20 seconds after booting up the game, the screen starts violently flashing gray. I don’t know why, or what the cause is. The weird thing is, it persists on all of the scenes except for the Tutorial scene. Please help me figure out what this even means. Thanks.
That gray looks to me like the default clear color. It seems like for some reason it’s not rendering some frames. You could verify this by changing the clear color.
Are you getting any warnings or errors in the console while the game is running? Which renderer are you using? If I had to guess, this would be something going wrong with the swap chain.
Yes, it is the clear color. It also says “Parameter: hicon is null” where I have my script that determines if the window is fullscreen:
if StatHandler.fullscreen:
get_tree().root.mode = Window.MODE_FULLSCREEN
else:
get_tree().root.mode = Window.MODE_MAXIMIZED
That’s (I think?) trying to access the underlying OS window, presumably for the draw context or something, and getting weird results. It sounds to me like either a bug in Godot or an underlying problem (bad RAM, a corrupted file…).
Do you get this with other projects, or just this one?
Just this one. Hopefully if it is a problem with Godot, it gets patched in 4.5.
Do you have your project in revision control? Could you isolate the change you made that triggered it?
I don’t think I have my project in revision control. I have an Anchorpoint/GitHub connection.
Ah. This is one of a variety of reasons why it’s a good idea to have your project in git or some other revision control. It would have given you the ability to wind back through changes to see when the bug first happened, at which point you could be reasonably sure you knew what triggered it.
I did that a while ago (before this post, with Anchorpoint) and the bug started happening right before I added this mechanic that slows the game down when you parry a bullet. However, all I did was change the Engine.time_scale, nothing else.
If you disable that mechanic does it fix the problem?
I’d be inclined to post a bug on the Godot issue tracker.
I’d also be inclined to try a fresh install of Godot in a different directory along with a copy of your project and see if it still shows the problem.
At the worst, I’d suggest stripping stuff out until the problem goes away and then adding stuff back in slowly to see if it comes back. I do think this is probably an engine bug, but presumably you want to be able to keep working on your game while you wait for it to be fixed.
1 Like
Thank you for helping me.