Steps to reproduce:
1. Create a new 3D template project
2. Install OpenXR (latest recommended version) and enable it in XR Plugin Management
3. Connect Meta Link to Quest 2/3/3S
4. Convert the Camera GameObject to XRRig via the right-click context menu in the Hierarchy and save the Scene
5. Enter Play Mode and confirm OpenXR Loader is initialized
6. Open Package Manager and update OpenXR to 1.17.0-pre.1 (Do not restart the Editor)
7. Enter Play Mode, observe that Console Output specifies that OpenXR Loader is loaded but Meta Link has not actually initialized the runtime
8. Update OpenXR to 1.17.0-pre.2
9. Enter Play Mode
Actual result: editor crashes
Expected results: editor does not crash
Reproducible with: OpenXR 1.17.0-pre.2, 1.17.0, 1.18.0-pre.1 (6000.0.76f1, 6000.3.16f1, 6000.4.8f1, 6000.5.0b9, 6000.6.0a6)
Not reproducible with: OpenXR 1.16.1, 1.17.0-pre.1 (6000.0.76f1, 6000.3.16f1, 6000.4.8f1, 6000.5.0b9, 6000.6.0a6)
Testing Environment: Windows 11
Not reproducible on: no other environment tested
Workaround:
Restart the Editor if updating/downgrading the OpenXR Package
Notes:
-Crash only reproduces IF the Editor is not restarted as per Project Validation exception
-Upgrading from 1.16.1 to 1.17.0-pre.1 doesn't produce a crash
-1.16.1 does have an exception in Console Window and the loader is not initialized
-1.17.0-pre.1 does NOT have an exception in console and the loader is initialized (when it shouldn't be)
-Upgrading to 1.17.0-pre.2 and entering Play Mode crashes the editor
-Upgrading from 1.16.1 to 1.17.0 does not crash the Editor and vice versa
-First 5 lines of stack-trace:
0x00007FFFC78FBC4A (UnityOpenXR) unity_ext_RequestEnableExtensionString
0x00007FFF16C23669 (Unity) udnSetPath
0x0000021A65BE6C4A (UnityEngine.XRModule) (wrapper managed-to-native) UnityEngine.XR.XRInputSubsystem:GetTrackingOriginMode_Injected (intptr)
0x0000021A65BE6B93 (UnityEngine.XRModule) UnityEngine.XR.XRInputSubsystem:GetTrackingOriginMode ()
0x0000021A65BE68CB (UnityEngine.XR.LegacyInputHelpers) [.\Library\PackageCache\com.unity.xr.legacyinputhelpers@3f62d634f63b\Runtime\CameraOffset.cs:139] UnityEditor.XR.LegacyInputHelpers.CameraOffset:SetupCamera (UnityEngine.XR.XRInputSubsystem)