Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility renderer crash with Nvidia GPU and 566.36 drivers on Windows #101659

Closed
lucibefallen opened this issue Jan 16, 2025 · 30 comments · Fixed by #103245
Closed

Compatibility renderer crash with Nvidia GPU and 566.36 drivers on Windows #101659

lucibefallen opened this issue Jan 16, 2025 · 30 comments · Fixed by #103245

Comments

@lucibefallen
Copy link

lucibefallen commented Jan 16, 2025

Tested versions

Reproducible in every version of 4.4 including Dev 1

System information

Windows 11 - Godot 4.4 (any version) - OpenGL API - Nvidia 3070 or 970(happens with both) - AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz -

Issue description

Image
everytime I try to open Godot, it just closes before it even finished opening
this happens with both my 3070 and 970 gpus

Steps to reproduce

all I do is open the application

Minimal reproduction project (MRP)

N/A

@mrjustaguy
Copy link
Contributor

Try running some other OpenGL 3 apps, and see if they run, as this may be a driver issue. Likewise trying different drivers could help.

I've had an issue like this a while back with Nvidia on my 1050 ti where some drivers would break OpenGL (thus breaking games like Star Wars Jedi Outcast/Academy and other quake engine games) and Nvidia's drivers breaking Rendering APIs (even dx11 at one point got borked, though it still opened, just ran like trash) has been one of the many reasons I switched to AMD (rx 6600) for my next GPU over a year and a half ago. (some other reasons including like 50% better price-perf in my region at the time (240€ 6600 or 300€ 3050), and being by far the cheapest new 8 GB card on the market)

@AeioMuch
Copy link
Contributor

I have 3060 with the same driver version as you on Windows 10, and I don't have any issue. Maybe you have another program running that is causing that.

@fire fire changed the title can't open godot with Nvidia 566.36 with a 3070 gpu Can't open godot with Nvidia 566.36 with a 3070 gpu Jan 17, 2025
@lucibefallen
Copy link
Author

it works in 4.3 it's just any version of 4.4

@AeioMuch
Copy link
Contributor

AeioMuch commented Jan 17, 2025

Can you attach here the editor_settings-4.4.tres (or editor_settings-4.3.tres if 4.4 version is missing which is likely) that you can find in %APPDATA%\Godot\ ?

@lucibefallen
Copy link
Author

Can you attach here the editor_settings-4.4.tres (or editor_settings-4.3.tres if 4.4 version is missing which is likely) that you can find in %APPDATA%\Godot\ ?

thing is, I tried removing my appdata folder and it still wouldn't open then afterward it opened in 4.3 just fine still
my files and settings were just missing so I just deleted the folder and readded the original files

@clayjohn
Copy link
Member

Can you clarify when it is crashing? From the screenshot it seems like it is crashing when you open the project manager. Is that right? Or is it crashing when you open your project only?

@lucibefallen
Copy link
Author

when I try to open Godot
speaking of which
happened with 4.4 beta 2 which was stated in the blog "the bugs don't stand a chance"

Image

they stood a chance

@clayjohn
Copy link
Member

clayjohn commented Feb 4, 2025

when I try to open Godot

The editor or the project manager?

@Repiteo Repiteo moved this from Unassessed to Release Blocker in 4.x Release Blockers Feb 5, 2025
@Repiteo Repiteo added the crash label Feb 5, 2025
@Repiteo Repiteo marked this as a duplicate of #101827 Feb 5, 2025
@Repiteo Repiteo marked this as a duplicate of #102015 Feb 5, 2025
@Repiteo Repiteo marked this as a duplicate of #101735 Feb 5, 2025
@Repiteo
Copy link
Contributor

Repiteo commented Feb 5, 2025

Seems like quite a lot of reports are revolving around NVIDIA GPUs, so let's consolidate them here

@clayjohn
Copy link
Member

clayjohn commented Feb 6, 2025

Summoning everyone with weird NVidia crashes in the project manager in 4.4 @RedSPINE, @rogerdv, @KaBooMa and @lucibefallen Can you all confirm that 4.4 dev 1 also causes the crash for you? You can download it here https://godotengine.org/download/archive/4.4-dev1/ (lucibefallen, you confirmed already, no need to confirm again)

I am starting to suspect that #93985 might be the cause

Based on the errors in #101735, so it could be crashing in the NVidia profile creation.

Are any of you able and willing to try building Godot from source to see if we can track down the issue?

@KaBooMa
Copy link

KaBooMa commented Feb 6, 2025

@clayjohn my prior testing showed that up till 4.4-dev7, it was working fine. I retested with a few versions and pasted below.

If one of the others don't reply for testing, I don't mind helping. I'll wait for them though as due to other issues with Godot, I am not tinkering with it anymore at this time. I do appreciate y'all looking into these problems so swiftly however!

== Fresh results from testing ==
4.4-dev1: Opens fine
4.4-dev2: Opens fine
4.4-dev6: Opens fine
4.4-dev7: Fails with below
================================================================
CrashHandlerException: Program crashed with signal 11
Engine version: Godot Engine v4.4.dev7.official (46c8f8c)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
4.4-beta2: Fails with no error

@akien-mga akien-mga changed the title Can't open godot with Nvidia 566.36 with a 3070 gpu Compatibility renderer crash with Nvidia GPU and 566.36 drivers on Windows Feb 11, 2025
@akien-mga
Copy link
Member

If anyone affected can compile Godot from source locally, there are two things which might help debug this further greatly.

  1. Compile with debug_symbols=yes to get a proper backtrace when it crashes (if it doesn't print it properly, you might want to look into hooking up a debugger to the Godot process). A backtrace should already give us a good hint as to what may have caused the regression.
  2. Otherwise, the most surefire way to find it is to bisect the regression. You'd identify the two closest snapshots where one works and the next fails, get their commit hashes (e.g. by running each with --version), and bisect between those two commits.

@BlueSteelAUS
Copy link

I'm way passed that driver version on Win 11 NVidia 4080 card and every things seems to be working dine here. using latest driver from NVidia 572.16. I'd suggest anyone having problems to try updating the NVidia drivers direct from NVidia

@clayjohn
Copy link
Member

clayjohn commented Feb 12, 2025

System info: Godot v4.4.beta1 - Windows 10 (build 19045) - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce GTX 650 (NVIDIA; 30.0.14.7514) - AMD Ryzen 5 3600 6-Core Processor (12 threads)

I tested with an old GTX 650 with driver version 475.14 and it runs correctly. So this indeed appears to be an issue with newer GPUs/driver versions.

Here are the device/driver versions we know are problematic

1070: 566.03
3070: 566.36
3090: 566.35
3090: 572.16
4060: unknown
4090: 566.36

And we know the following combinations are fine:
650: 475.14
1660 Ti: 566.36
2070 super: 572.16
4080: 572.16
4080 Super: 572.16

Additionally, we have one report saying the issue started in dev 1 and two reports saying the issue started in dev 7

@Calinou
Copy link
Member

Calinou commented Feb 12, 2025

Can any affected users try to download NVIDIA Profile Inspector, run it, and export the base profile using this button?

Image

After doing that, compress the outputted .nip file in a ZIP archive and upload it here as a comment.

@BlueCube3310
Copy link
Contributor

To anyone affected: Does baking lightmaps under the Compatibility renderer in 4.3-stable also crash?

@clayjohn
Copy link
Member

Small update on this, @BlueCube3310 was able to reproduce the issue briefly and track down the root of the problem: initializing a Vulkan context when running an OpenGL context can cause a crash. That happens in the following situations:

  1. When opening the project manager (to determine whether Forward+ or Mobile projects can be created)
  2. When baking LightmapGI
  3. When importing VRAM compressed textures and "compress with GPU" is enabled.

Point 1 and 3 were added in 4.4 and contribute to why this issue has become more frequent in 4.4 dev builds.

The issue does not appear with any particular driver update or device. The risk seems to be there with any recent NVidia driver. Once you start getting hit by the issue, it doesn't go away, although it is slightly random, it reproduces frequently.

At this point the only known solution is to do a clean reinstall of your drivers.

@RedSPINE
Copy link

RedBaseProfile.zip
Hi here's my profile.
I only get hit by the issue when trying to open the project manager or open a project with "open with".
So I can't test anything in editor x)

@akien-mga
Copy link
Member

akien-mga commented Feb 24, 2025

We have a potential workaround for this issue in #103245, which moves the checks for whether a RenderingDevice (Vulkan) can be created from an OpenGL compatibility context to a separate process.

Could affected users try the build I made from #103245?

Download (old version): https://editor.godotengine.org/testing/4.4-rc1-pr103245/

Edit: I made a new build from a newer version of #103245 (-v2) which should make it possible to create Forward+ and Mobile projects from the Project Manager:

Download (new version): https://editor.godotengine.org/testing/4.4-rc1-pr103245-v2/

I built all 4 main Godot editor binaries (x86_64 and x86_32 for both standard and .NET flavors). Once we have confirmation that at least the x86_64 standard build works fine, it would be good if one person could also test the .NET and x86_32 variants so we make sure it works for all users.

@bruvzg
Copy link
Member

bruvzg commented Feb 24, 2025

We have a potential workaround for this issue in #103245, which moves the checks for whether a RenderingDevice (Vulkan) can be created from an OpenGL compatibility context to a separate process.

If you are testing it and had crash before, please also test texture compression in the Compatibility mode:

  1. Make new Compatibility project.
  2. Select icon.svg.
  3. In the Import panel, select Texture2D and change Mode to VRAM Compressed.
  4. Click Reimport.
Image

@paewie
Copy link

paewie commented Feb 24, 2025

Just throwing my hat in the ring as I was having this exact crash on two different cards (1650 and 2070) with two different driver versions (566.36 and 572.47) consistently on Godot startup, even as the first ever Godot-Installation on the offending machine.
The first workaround was to specify the forward+ renderer explicitly when starting the editor. As stated by other users, 4.3 worked fine.

Trying the above PR #103245 did fix the startup issues without any changes to the drivers and I could also create a Compatibility Project and reimport the icon as VRAM Compressed. This applies to both the default and mono versions.

Edit to add: I tested the 64-bit Versions only, all on Windows 11

@akien-mga
Copy link
Member

I made a new build from a newer version of #103245 (-v2) which should make it possible to create Forward+ and Mobile projects from the Project Manager:

Download (new version): https://editor.godotengine.org/testing/4.4-rc1-pr103245-v2/

@paewie
Copy link

paewie commented Feb 24, 2025

The Forward+ and Mobile project creation worked for me with just the initial PR already. I only specified the Compatibility one to confirm on @bruvzg 's hint/request regarding VRAM Compression. I hope I didn't cause confusion and additional work with this remark, maybe should've made that clear.

Should I test the new builds regardless?

@bruvzg
Copy link
Member

bruvzg commented Feb 24, 2025

The Forward+ and Mobile project creation worked for me with just the initial PR already.

That's likely mean this PR done nothing for you and something else fixed the crash (driver update?). V1 was expected to either disable project creation (if it detected a driver issue) or crash on VRAM compression (if it did not).

Unless VRAM Compression was not affected by the issue in the first place, it's possible the crash was only happening when OpenGL is freshly initialized (like in project manager).

@paewie
Copy link

paewie commented Feb 24, 2025

Well that's curious, as my Godot still crashes without the PR, just trying to load into the initial project selection screen (right after the splash screen). With the PR I can get into Project creation and create all three types of projects flawlessly. Have been using the PR for the last hour without an issue.

Using my earlier workaround (cmd .\Godot_v4.4-rc1_win64.exe --rendering-method forward_plus) I can start the editor, but not test the VRAM compression, as the renderer - well - is overwritten.

Maybe I actually am experiencing something else at this point, even though I do have the same output (errors) on the sytem console on Godot startup.

@clayjohn
Copy link
Member

@bruvzg the window creation in your PR is simplified compared to the actual window creation in Godot right?

Maybe it's not triggering the crash condition at all. But moving the check to a different process is somehow enough to avoid the crash.

IIRC the crash when doing lightmaps or VRAM compression wasn't very consistent. @BlueCube3310 can you confirm that the crash when baking lightmaps was inconsistent?

@bruvzg
Copy link
Member

bruvzg commented Feb 24, 2025

the window creation in your PR is simplified compared to the actual window creation in Godot right?

It is simplified, all OpenGL related init steps should be there, but it's not showing the window and rendering anything, which might be enough to not trigger the crash.

PR should at least fix the crash on startup, but it's not clear what's going on with VRM textures/lightmaps.

@clayjohn
Copy link
Member

the window creation in your PR is simplified compared to the actual window creation in Godot right?

It is simplified, all OpenGL related init steps should be there, but it's not showing the window and rendering anything, which might be enough to not trigger the crash.

PR should at least fix the crash on startup, but it's not clear what's going on with VRM textures/lightmaps.

One thing that we discarded before is the NVIdia profile stuff being partly to blame.

But indeed, it could easily require some amount of drawing. OpenGL drivers defer a lot of init until they actually need to start doing things.

@BlueCube3310
Copy link
Contributor

IIRC the crash when doing lightmaps or VRAM compression wasn't very consistent. @BlueCube3310 can you confirm that the crash when baking lightmaps was inconsistent?

I think so, most of the crashes used to happen during the check at startup, later it was random

@lucibefallen
Copy link
Author

I made a new build from a newer version of #103245 (-v2) which should make it possible to create Forward+ and Mobile projects from the Project Manager:

Download (new version): https://editor.godotengine.org/testing/4.4-rc1-pr103245-v2/

THIS FIXED IT
BY GOD IT FIXED IT
YOU ARE A SAINT AND A GENIUS

@github-project-automation github-project-automation bot moved this from For team assessment to Done in Rendering Issue Triage Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Status: Done
Development

Successfully merging a pull request may close this issue.