Skip to content

Conversation

@Ehbw
Copy link
Contributor

@Ehbw Ehbw commented Dec 31, 2025

Goal of this PR

Remove ~200 instances of ERR_GFX_STATE errors that users hit, instead replacing them with more meaningful and verbose error messages that can help with troubleshooting the issue. This also improves crash metrics for server owners, allowing better monitoring of graphical crashes potentially in relation to new/changed contents.

How is this PR achieving the goal

Backport from some of my own work on updating cef and redm game-view.

Replacing three calls that act as D3D12 Failed macro, Vulkan VK_ERROR_DEVICE_LOST check and Vulkan swapchain creation error checking that when receiving an non success code, will throw the ERR_GFX_STATE error. These are then replaced with more in-depth errors based on the dxerr library return results and VkResult information.

This PR applies to the following area(s)

RedM

Successfully tested on

Game builds: 1491

Platforms: Windows, Linux

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

Currently in RedM users encountering ERR_GFX_STATE aren't provided any meaningful details to help troubleshoot this crash. This crash can occur for hundreds of reasons across both graphics drivers.

This patch aims to resolve that by removing hundreds of instances of ERR_GFX_STATE and replacing them with proper information from the Graphics driver being actively used. There is one function left in the vulkan graphics driver that can call ERR_GFX_STATE this is because there isn't enough information in what calls this and why at this moment in time.
@github-actions github-actions bot added RedM Issues/PRs related to RedM invalid Requires changes before it's considered valid and can be (re)triaged labels Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged RedM Issues/PRs related to RedM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant