NewsCrawler.org

visionOS: closing Immersive Space — onDisappear delays up to 780 ms on simulator

【Apple Vision Pro】Immersive Spaceを閉じた後のonDisappear、シミュレーターと実機で桁違いだった件
Image: zenn.dev

A developer of an Apple Vision Pro app with a heavy Immersive Space[1] — about 200 humanoid 3D models driven by skeletal animation — hit a force termination with 0x8BADF00D[2] about 10 seconds after closing the space and immediately starting heavy work on the device. In the simulator (visionOS 26.5), the space view's onDisappear[3] came up to 780 ms after the await on dismissImmersiveSpace() returned, which first looked like the cause. On the real device (visionOS 27.2 beta) the same delay was only 2.9–6.0 ms, so the simulator numbers did not explain the crash.

With a minimal app (a RealityView with 200 boxes), the author measured the closing order on the device: the scene's willDeactivate arrives at 12–16 ms, the view's scenePhase[4] turns inactive at 19–22 ms, didEnterBackground at 420–427 ms, didDisconnect at 430–439 ms, and onDisappear at 434–445 ms, with the await returning right after it, also at 434–445 ms. No RealityKit System update ran after the await returned. For comparison, DismissWindowAction returns in 3–4 ms with onDisappear 220–226 ms later, while dismissImmersiveSpace() is asynchronous and returns only after the system finishes dismissing the space.

In the simulator, the heavy app showed onDisappear 370–780 ms after the await, but none of nine tested conditions in the minimal app — blocking the main thread, ARKit world tracking, RealityView attachments, spatial audio and others — reproduced the delay. The device crash log showed FRONTBOARD 0x8BADF00D with the reason "scene-update watchdog transgression: exhausted real (wall clock) time allowance of 10.00 seconds", and the main thread was deforming skeletal meshes while the app's CPU averaged 67% with the space open. The author suspects the mesh deformation jammed the main thread around the roughly 430 ms scene update, but this remains unverified, and the article's main lesson is that timing shifts seen in the simulator must not be taken as the cause on real hardware. The post also shows how to record the closing order with public APIs and how to read an installed app's os_log via OS_ACTIVITY_DT_MODE and devicectl.

Read the original zenn.dev

Sources

  • Zenn JA

    【Apple Vision Pro】Immersive Spaceを閉じた後のonDisappear、シミュレーターと実機で桁違いだった件

    6 likes0 bookmarks0 comments

Published: First seen: Читать по-русски

Open as a page