According to the licensee, this problem is caused by a variable inconsistency in Cvar.
The cause seems to be the difference between the CVar reference when generating RayTracingSceneRHI and the CVar reference when drawing shadows.
RayTracingSceneRHI generation is done with the DispatchRayTracingWorldUpdates function in DeferredShadingRenderer.cpp.
At this time, the AnyRayTracingPassEnabled function is used to check whether the Ray Tracing technique is effective.
Among them, CVar of "r.RayTracing.Shadows" is acquired, but this is FConsoleVariableRef of RenderThreadSafe. When you get a value from this class with GetInt, you get the MainValue.
However, what you check when drawing shadows is the ShouldRenderRayTracingShadows function in LightRendering.cpp.
Here we are checking the GRayTracingShadows variable, which will be RefValue. Since it is a RenderThreadSafe CVar, there may be situations where MainValue and RefValue are different values depending on the timing.
We haven't seen a crash, but it's likely to happen with a similar implementation, Ray Tracing Stochastic Rect Light.
The following Ray Tracing function is disabled in the attached project.
There's no existing public thread on this issue, so head over toAnswerHub just mention UE-99707 in the post.