godotengine / godot

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

Freeze Of Editor When Debugger is Attached With Nvidia GPU usage #83884

Open kala7a opened 11 months ago

kala7a commented 11 months ago

Godot version

4.1.2 Mono

System information

Windows 10, Nvidia RTX A2000 8GB Laptop GPU, Godot 4.1.2, Compatilbity Mode, Nvidia driver: 537.58, Visual Studio Professional 2019

Issue description

I've noticed that if I try to attach debugger to the editor (working on some plugins so need to debug the editor). If I click somewhere the editor to create new popup window: for example on right click on any file on the filesystem. Editor freezes.

If I run with Intel GPU by uninstalling nvidia drivers or choose Internal GPU from Windows Graphics Settings for Godot editor: issue is not present. Issue is only present in Compatibility Mode On another HW with M1000M GPU with older versions of Nvidia driver excluding Nvidia Ansel seems to be working fine. But on this specific HW with RTX A2000 8GB couldn't find driver that is not having this issue.

Steps to reproduce

1) Open Godot 4.1.2 Mono editor (console mode). 2) Create new project 3) Add C# script inside the project. 4) Build (in order to generate sln files) 5) Close Godot.

6) Open Godot again 7) Open the project that was just created. (can even skip steps 1-5 and use attached project) 8) Open sln file with Visual Studio. 9) Visual Studio: Debug -> Attach to Project -> Choose godot process (managed type) - Attach 10) Godot: Right click on any file in FileSystem.

Editor freezes with black window where popup should be shown.

Minimal reproduction project

NewGodotTestProject2.zip

h0lley commented 10 months ago

this may be happening for me on Ubuntu with Nvidia GPU - just from normal usage though, no debugger attached to editor.

there seems to be a chance for the editor to freeze any time some sort of popup window or context menu opens. it also frequently happens on saving.

there's nothing logged to output and the only way I've found to proceed is to terminate the process via task manager.

even when starting the editor from command line, ctrl+c has no effect once it is frozen.

I experience these freezes with two entirely different projects (one developed on 4.1.2, the other on 4.2.x).

Calinou commented 10 months ago

@kala7a @h0lley If you run Godot from a terminal, do you see a Vulkan device lost error? If so, this is a duplicate of https://github.com/godotengine/godot/issues/71929.

kala7a commented 10 months ago

@kala7a @h0lley If you run Godot from a terminal, do you see a Vulkan device lost error? If so, this is a duplicate of #71929.

@Calinou For me the issue happens only in compatibility mode. Which means Godot running with OpenGL. In the console I don't have any error:

Godot Engine v4.2.stable.mono.official.46dc27791 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 537.58 - Compatibility - Using Device: NVIDIA - NVIDIA RTX A2000 8GB Laptop GPU

Editing project: <...>
Godot Engine v4.2.stable.mono.official.46dc27791 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 537.58 - Compatibility - Using Device: NVIDIA - NVIDIA RTX A2000 8GB Laptop GPU

WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:63)

Also just have double checked with Godot 4.2 and issue is still present and seems the same in compatiblity mode. In forward+ mode where Vulkan is used: issue doesn't happen as before.

h0lley commented 10 months ago

I also do not get anything logged to the terminal.

The editor just stops rendering. When minimizing and maximizing the editor window again, then only the window decoration is shown - anything inside shows whatever has been displayed already (e.g. other applications or the desktop).

Still experiencing the issue in 4.2.stable btw.

h0lley commented 6 months ago

as per SimantoR's suggestion here, I haven't had any freezes with Single Window Mode. if this would also be the case for kala7a then I'd reckon that this issue is indeed duplicate of at least related to https://github.com/godotengine/godot/issues/71929.

kala7a commented 6 months ago

Hello @h0lley Thanks for this feedback. This workaround/setting seems to work for me as well. I will be using it.

Don't know if it is a duplicate of #71929 because everyone there talks about vulkan errors. And in my case it is opengl compatiblity mode that causes the issues. Vulkan Forward+ works fine.