XeSSUnrealPlugin icon indicating copy to clipboard operation
XeSSUnrealPlugin copied to clipboard

Plugin crashes during startup when `-RHIValidation` is enabled

Open TBBle opened this issue 7 months ago • 3 comments

Observed in Unreal Engine 5.4 and 5.5; I haven't tested older versions to see how they differ.

When -RHIValidation is passed to the engine, the GDynamicRHI global variable points at a proxy RHI implementation.

However, the XeSS Unreal Plugin in several places tries to static_cast<...>(GDynamicRHI), which produces an invalid result and crashes when -RHIValidation is in-use.

Instead, I believe it is safe all the way back to 4.27 to use static_cast<...>(GDynamicRHI->GetNonValidationRHI()).

TBBle avatar May 09 '25 01:05 TBBle

Thank you for reporting, we'll investigate the issue, and fix it in the next release.

xessgamedev avatar May 09 '25 03:05 xessgamedev

GDynamicRHI->GetNonValidationRHI() should be introduced in Unreal 5.0, but we still need to support Unreal 4.26 and 4.27.

To make it simple, we can disable XeSS when -RHIValidation is used, another reason is that we don't do plugin tests with -RHIValidation. does it work for you? @TBBle

xessgamedev avatar May 09 '25 04:05 xessgamedev

The issue has been fixed, and will be available in the next release, thank you for reporting!

xessgamedev avatar Sep 06 '25 02:09 xessgamedev

Fixed in https://github.com/GameTechDev/XeSSUnrealPlugin/releases/tag/v2.2.0

xessgamedev avatar Nov 13 '25 01:11 xessgamedev