AVP Crash after suspend with fully immersive app

Our Vision Pro app is fully immersive (using Metal) and is crashing after the headset is taken off and put back on. Does this log indicate the problem and solution to anyone?

<<< TAKE HEADSET OFF >>>

[XR] VisionOS Display Provider Destroying Textures
RequestDestroyTexture
RequestDestroyTexture
RequestDestroyTexture
[XR] VisionOS Display Provider Stop
[XR] VisionOS Display Provider Destroying Textures
[XR] Display Start
[XRInputSubsystem] A device connection with the id 1 has been reported twice without being disconnected.
ar_hand_tracking_provider_get_latest_anchors <0x30235a040>: Cannot get latest hand anchors, the provider is not running.

<<< PUT HEADSET BACK ON >>>

Resuming AR session after pause.
UnityEngine.XR.VisionOS.VisionOSSessionProvider:OnApplicationResume()

RequestCreateTexture
SetupRenderTextureFromXRRequest (id: 4 col: 0x12202ac60 d: 0x12204d6b0 sr: 0x0)
RenderTexture::Create (id: 4)
IVRDeviceCallback_CreateEyeTextureResources 0x12202ac60
IVRDeviceCallback_CreateEyeTextureResources 0x12204d6b0
ar_hand_tracking_provider_get_latest_anchors <0x30235a040>: Cannot get latest hand anchors, the provider is not running.
ar_hand_tracking_provider_get_latest_anchors <0x30235a040>: Cannot get latest hand anchors, the provider is not running.
Presenting a drawable without a device anchor. This drawable won't be presented.

<<< THIS IS IN RED >>>
Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)
CompositorServices Command Buffer (null) failed: Error Domain=MTLCommandBufferErrorDomain Code=7 "Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)" UserInfo={NSLocalizedDescription=Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted), NSUnderlyingError=0x301bd5710 {Error Domain=IOGPUCommandQueueErrorDomain Code=6 "(null)"}}
Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

RequestCreateTexture
SetupRenderTextureFromXRRequest (id: 5 col: 0x1220f3530 d: 0x1220cd240 sr: 0x0)
RenderTexture::Create (id: 5)
IVRDeviceCallback_CreateEyeTextureResources 0x1220f3530
IVRDeviceCallback_CreateEyeTextureResources 0x1220cd240
ar_hand_tracking_provider_get_latest_anchors <0x30235a040>: Cannot get latest hand anchors, the provider is not running.

Did you work out how to get around the issue? I think I have the same issue

Hey there! Sorry to hear that you’re having trouble

Is this a Hybrid app? I’ve been investigating an issue reported by @Conor_Envision that seems similar. I don’t see anything in the section of the log you posted above that indicates an actual crash, but maybe the app is running but it’s not rendering anything?

I’ll need some more info to diagnose the problem. Can you please report a bug (Help > Report a bug...) with your project attached?

Hey there! Just checking back in after the holidays to see if you’re still having trouble with this issue.

Having given your post another read, I should mention that the highlighted red text is usually benign. It’s saying that we aren’t allowed to do certain GPU work, which can be true temporarily while the app is in a transitionary state, but as long as you aren’t seeing that message constantly spammed to the log (and even sometimes if you do), you can safely ignore that warning. I’ll admit, it’s not a great state of affairs to be ignoring red text, but we’re doing our best to get rid of all of that stuff.

Anyway, if you’re still having trouble please do report a bug and we’ll try to figure out what’s going wrong here.

Hope you’re having a great 2025 so far. Happy new year! :tada: