Editor and Game window objects disapper - IndexOutOfRangeException: renderPassIndex

hi, community.
I have meet this issue recently and not sure is it a bug or sth else? I use the newest version of Unity(2019.3.14) in URP mode and try to develop an Oculus quest. After I run the Unity for more then 10 or 20 minute.When I click play to enter the PlayMode. It will suddenly come out this message:

ndexOutOfRangeException: renderPassIndex
UnityEngine.XR.XRDisplaySubsystem.GetRenderPass (System.Int32 renderPassIndex, UnityEngine.XR.XRDisplaySubsystem+XRRenderPass& renderPass) (at <91c065673d8142a7809c0b1b4d212eff>:0)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.CanXRSDKUseSinglePass (UnityEngine.Camera camera) (at Library/PackageCache/com.unity.render-pipelines.universal@7.3.1/Runtime/UniversalRenderPipeline.cs:517)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.InitializeStackedCameraData (UnityEngine.Camera baseCamera, UnityEngine.Rendering.Universal.UniversalAdditionalCameraData baseAdditionalCameraData, UnityEngine.Rendering.Universal.CameraData& cameraData) (at Library/PackageCache/com.unity.render-pipelines.universal@7.3.1/Runtime/UniversalRenderPipeline.cs:559)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.InitializeCameraData (UnityEngine.Camera camera, UnityEngine.Rendering.Universal.UniversalAdditionalCameraData additionalCameraData, UnityEngine.Rendering.Universal.CameraData& cameraData) (at Library/PackageCache/com.unity.render-pipelines.universal@7.3.1/Runtime/UniversalRenderPipeline.cs:500)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at Library/PackageCache/com.unity.render-pipelines.universal@7.3.1/Runtime/UniversalRenderPipeline.cs:396)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Camera[ ] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@7.3.1/Runtime/UniversalRenderPipeline.cs:219)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[ ] cameras) (at :0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

and then in the scene window and game window, everything disappear and just show the background color.When I select an object on Hierarchy I can show the transform arrow on the scene but without the object. No matter what I do( Exit playmode or enter playmode), this issue still exist.I have to restart this editor then everything fix.

Hope anyone can give some tips? It’s a very annoying issue

Hello
I have a similar error message :
IndexOutOfRangeException: renderPassIndex
UnityEngine.XR.XRDisplaySubsystem.GetRenderPass (System.Int32 renderPassIndex, UnityEngine.XR.XRDisplaySubsystem+XRRenderPass& renderPass) (at <8627e6379cb3427b822ee3b314b167b9>:0)
UnityEngine.Experimental.Rendering.XRSystem.CreateDefaultLayout (UnityEngine.Camera camera) (at ./Library/PackageCache/com.unity.render-pipelines.core@14.0.8/Runtime/XR/XRSystem.cs:268)
UnityEngine.Experimental.Rendering.XRLayout.AddCamera (UnityEngine.Camera camera, System.Boolean enableXR) (at ./Library/PackageCache/com.unity.render-pipelines.core@14.0.8/Runtime/XR/XRLayout.cs:31)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at Library/PackageCache/com.unity.render-pipelines.universal@14.0.8/Runtime/UniversalRenderPipeline.cs:774)
UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@14.0.8/Runtime/UniversalRenderPipeline.cs:369) UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List1[T] cameras) (at <3b24cc7fa9794ed8ab04312c53e6dedd>:0)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <3b24cc7fa9794ed8ab04312c53e6dedd>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

When I press play, the image in the VR headset is fixed and rotated in the sky direction. But in the same project, when I try in an other scene it works… I don’t understand why I have this bug and why only in one scene…
I saw that there were no response in the last message but I am a bit desperate after many days working on it…

For information I am working with Unity 2022.3.10f1, with a Pico 4 headset in URP mode.

Hello,

Can you tell us which plugin/package are you using for XR support?

Hello,
Thanks for the response.

I use the PICO Integration sdk (PXR_SDK) with the XR integration toolkit, as recommended in PICO tutorials.

Since my last message I found a temporary solution, I deactivated all the gameObjects in my scene at Start and then reactivate them, it works but if I add another camera in the scene the render of the camera in the headset stops.

It seems to be a performance problem with my scene, I am trying to work on it. In addition, I noticed that the camera render was better in a builded app than in the play mode in Unity.