Steps to reproduce:
1. Open the attached user's project "XrCrash.zip"
2. Make sure the Graphics API is set to DX12
3. Connect Meta Link to Quest 2/3/3S
4. Make sure XR Plugin is selected as OpenXR
5. Enter Play Mode
Actual Result: Editor crashes when entering Play Mode with Meta Link connected and DX12 is set as the graphics API
Expected Result: no crash
Reproducible with: 6000.5.0b10, 6000.6.0a4 (77e2e2eea1be)
Not reproducible with: 6000.0.73f1, 6000.3.14f1, 6000.4.4f1, 6000.5.0b9, 6000.6.0a3 (93858bc74878)
Testing Environment: Windows 11
Not reproducible on: no other environment tested
Notes:
-Crash is reproducible with SteamVR, Pico Connect runtimes and other HMDs, however the main cause of the crash is DX12
-Crash is not reproducible with DX11, Vulkan
-Crash does not reproduce with Mock HMD
-Editor log output just before the crash:
XRTextureManager::RequestCreateTexture
XRTextureManager::SetupRenderTextureFromXRRequest (id: 1 col: 00000209BA1ED060 d: 0000000000000000 sr: 0000000000000000)
RenderTexture::Create (id: 1)
IVRDeviceCallback_CreateEyeTextureResources 00000209BA1ED060
Assertion failed on expression: 'HasFlag(Flags::kIsResource)'
d3d12 validation error (category: 9, id: 1042): ID3D12CommandList::OMSetRenderTargets: Descriptor (at CPU Handle 0x00000208DF339A60) which has an underlying stale or released resource is invalid for use.
Assertion failed on expression: 'HasFlag(Flags::kIsResource)'
d3d12 validation error (category: 9, id: 1042): ID3D12CommandList::ClearRenderTargetView: Descriptor (at CPU Handle 0x00000208DF339A60) which has an underlying stale or released resource is invalid for use.
-Stacktrace:
0x00007FFFDFE473FA (KERNELBASE) RaiseException
0x00007FFF0D55BA1D (D3D12SDKLayers) SetD3DDebugLayerStartupOptions
0x00007FFF1D6BA3B1 (Unity) udnSetPath
0x00007FFF1D6D5185 (Unity) udnSetPath
0x00007FFF1D68F41F (Unity) udnSetPath
0x00007FFF1D224396 (Unity) udnSetPath