NVIDIAGameWorks / NVIDIAGameWorks/rtx-remix

[Runtime Bug]: Taking a capture when a mesh is being drawn by the remixAPI will result in a crash

Open
#671 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug jira runtime
Dominant language
No language data
Stars
1.7k
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Taking a game capture when a mesh is being drawn by the remixApi will result in a crash in GameCapturer::captureMaterial.

It seems like the material of the api mesh is being interpreted as a LegacyMaterial and does not contain a valid
colorTexture pointer. Thus, materialData.getColorTexture().getImageView()->image() will access a nullptr and throw an assert:

https://github.com/NVIDIAGameWorks/dxvk-remix/blob/86269785f17a8151aea058bfbdb480d27bf2eaa9/src/dxvk/rtx_render/rtx_game_capturer.cpp#L493C31-L493C43

Screenshot 2024-10-30 143505

The meshes I've tried this with had no albedo texture assigned (simple emissive prims and rayportal's)

Note:

I've created a PR with a band-aid fix preventing api meshes from being captured:
https://github.com/NVIDIAGameWorks/dxvk-remix/pull/82


How do you reproduce the bug?
  1. Create a material, a mesh and then draw it via the remixApi (only tested on x86 through the bridge)
  2. Take a game capture
What is the expected behavior?

Turning off replacements should also turn off meshes drawn via the api OR they should not be interpreted as legacy meshes

Version

latest

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/dxvk/rtx_render/rtx_game_capturer.cpp at the referenced captureMaterial line and review PR #82, then reproduce the crash with an API-drawn mesh that has no albedo texture. Done means taking a game capture no longer crashes and the expected replacement behavior for API meshes is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, computer-graphics, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.