rtx-remix icon indicating copy to clipboard operation
rtx-remix copied to clipboard

[Runtime Bug]: Runtime crash when frame exceeds more than 256 bones

Open sambow23 opened this issue 8 months ago • 2 comments

Describe the bug

I was testing the Gordon Freakman source engine mod on the Half-Life 2: RTX demo for a user who reported a crash issue when loading a certain map. When running said map, the user is greeted with a Remix runtime error. When opening the dump, it points to: d3d9_rtx.cpp: ln: 815

if (m_stagedBonesCount + maxBone >= m_stagedBones.size()) { throw DxvkError("Bones temp storage is too small."); }

NV_Mark on the RTX Remix Showcase discord told me to compile a runtime with:

m_stagedBones.resize(256* 256);

set to a higher number. In which i did with (1024 * 1024), which resolved the crash issue and was able to go in-game successfully.

How do you reproduce the bug?

  1. Install Half-Life 2: RTX via Steam
  2. Download the Gordon Freakman mod, extract the mod folder to the base directory of Half-Life 2: RTX
  3. Run the game the following launch parameters: -game freakman
  4. Click ok ok, lets Start This Game and select CHAPTER 1
  5. Wait for the runtime to crash after loading

What is the expected behavior?

The runtime should not crash when loading the level and render as accordingly

Version

1.0.0 Used this commit for the debug build 69868e2

Logs

bridge32.log bridge64.log remix-dxvk.log

Crash dumps

NvRemixBridge.exe_20250417_162239.dmp

Media

No response

sambow23 avatar Apr 17 '25 21:04 sambow23

Notes for future viewers:

The hardcoded limit in the bone vector seems to be implemented to get around some threading problems. Resizing that vector mid frame would likely invalidate pointers used by earlier draw calls.

Two possible solutions:

  1. Change it to an option that is only read during startup, and add an error message telling users to set that number to a higher value.

  2. Ignore draw calls that exceed the limit, but record the total number of bones needed. Then re-allocate the vector between frames.

MarkEHenderson avatar Apr 17 '25 21:04 MarkEHenderson

REMIX-2235 for internal tracking

NV-LL avatar May 08 '25 20:05 NV-LL