godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.57k stars 20.43k forks source link

Unable to switch main screen after leaving the editor idle #97107

Open snakeworks opened 1 week ago

snakeworks commented 1 week ago

Tested versions

Godot v4.3.stable.mono

System information

Godot v4.3.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 970 (NVIDIA; 32.0.15.6070) - Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz (4 Threads)

Issue description

After leaving the Godot window unfocused for about 10 minutes, whilst I did other things on the PC, I was no longer able to switch main screens (2D, 3D, Script, AssetLib buttons at the top). Restarting the editor obviously fixes this issue. The video below shows the bug in action, focus on the top of the screen where the main screen buttons are.

https://github.com/user-attachments/assets/0f5d5005-0469-422e-b2e2-dae61bb620bd

Before experiencing the bug for the first time I saved the current scene, pushed all my changes to git, and then had the Godot window unfocused in the background.

I only have one addon in the project and some custom editor scripts and both of them do not change the editor GUI in any way. I've only tested this bug on my current project, and not on an empty one.

Steps to reproduce

The steps below produce the bug only 50%-60% of the time.

Minimal reproduction project (MRP)

N/A

Zireael07 commented 1 week ago

Sounds like a known GPU bug where the screen doesn't redraw upon wakeup?

WhalesState commented 1 week ago

void EditorNode::editor_select(int p_which) is not running the code.

I suspect that changing_scene is true for some reason.

    if (selecting || changing_scene) {
        return;
    }

Maybe it's caused by void EditorNode::_set_current_scene_nocheck(int p_idx) which is the only function that sets changing_scene to true.

image

KoBeWi commented 1 week ago

Does it work when you resize the window? I encountered a similar bug where after some idle time, the editor's top buttons will appear out of window, making them impossible to click. Changing the window size to smaller and back will fix it.