Skip to content

Conversation

@blueskythlikesclouds
Copy link
Member

@blueskythlikesclouds blueskythlikesclouds commented Mar 27, 2025

Closes #938.

How it works:

  • Device creation is wrapped in __try/__except, which is a MSVC extension that can catch hardware level exceptions.
  • When a crash occurs, we silently reboot the game, and pass a command line argument that indicates the graphics API attempt order should be swapped.
  • If that also crashes, then we early quit the function, which'll end up showing the generic "failed to create graphics API" message box.
  • If the second retry succeeds, we remember the picked graphics API in the Config class, so subsequent boots don't attempt this sequence again.

@blueskythlikesclouds blueskythlikesclouds marked this pull request as ready for review March 27, 2025 12:40
@blueskythlikesclouds blueskythlikesclouds merged commit 49d3b67 into main Mar 30, 2025
9 checks passed
@blueskythlikesclouds blueskythlikesclouds deleted the crash-check branch March 30, 2025 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intercept driver crash during device creation to combat nvwgf2umx.dll module failures

3 participants