Search Issue Tracker

Fixed in 3.0.1

Votes

0

Found in [Package]

preview.3 - 2.1.0

Issue ID

1181789

Regression

No

[iOS] It is unable to dynamically instantiate ARSession when instantiating it a second time

Package: ARKit

-

A Customer wants to create the ARFoundation system dynamically (because in his App he can use another kind of AR systems. A Customer is instantiating a Prefab with all the ARSession scripts configured. Then he enables the instantiated object to start the ARSession. Then to disable the session he disables the instantiated gameObject, call reset and even delete the instantiated object. If he re-instantiate the ARFoundation system again, a customer runs on an Exception linked to XRReferenceObjectLibrary (his project need XRReferenceObject library)

To reproduce:

1. Download attached "ARFoundationDisconnectRace.zip" project and open in Unity
2. Build for iOS
3. Deploy the Xcode project to the iOS device
4. When the App is launched press the "Start" button and allow access to the Camera
5. Press the "Stop" button
6. Press the "Recreate" button
7. Press the "Start" button
8. Observe that an Exception is thrown in Xcode Console:

"InvalidOperationException: Failed to set requested image library 'ReferenceObjectLibrary' on ARKit - this feature only works on versions of ARKit 12.0 and newer.
at UnityEngine.XR.ARKit.ARKitXRObjectTrackingSubsystem+Provider.set_library (UnityEngine.XR.ARSubsystems.XRReferenceObjectLibrary value) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.XR.ARSubsystems.XRObjectTrackingSubsystem.Start ()"

Notes:
- This issue happens only on iOS
- This issue does not reproduce on Android (Mono and IL2CPP)
- Could not check for Regression on lower Package versions than preview.3 - 2.1.0 because the Project becomes corrupted
- Could not check on Unity 2018.4 because the Project becomes corrupted

Tested with:
- iPhone 7, iOS: 12.3.1 - Reproduced
- iPhone 8 Plus, iOS: 12.0 - Reproduced
- iPhone X, iOS: 11.3.1 - Not Reproduced
- iPhone XR, iOS: 12.0 - Reproduced
- iPad Pro 3rd Gen, iOS: 13.0 - Reproduced
- VLNQA00277, Asus ROG Phone (ASUS_Z01QD), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630 - Not Reproduced
- VLNQA00272, Samsung Galaxy S10+ (SM-G975U), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640 - Not Reproduced

Reproduced on Package preview.3 - 2.1.0 and preview.2 - 3.0.0

Reproduced on Unity 2019.2.5f1, 2019.3.0b3 and 2020.1.0a4

  1. Resolution Note (fix version 3.0.1):

    Fixed in ARFoundation 3.0.1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.