Search Issue Tracker
Fixed in 4.0.8
Votes
0
Found in [Package]
1.5.0-preview.7
Issue ID
1270518
Regression
No
ARSession.CheckAvailability() throws NullReferenceException when the object containing ARSession component is disabled
Reproduction steps:
1. Open attached project ("New Unity Project.zip")
2. Open "SampleScene" scene
3. Enter Play Mode
4. Open Console window
Expected result: ARSession.state is printed
Actual result: NullReferenceException is thrown:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.XR.ARFoundation.ARSession+<CheckAvailability>d__32.MoveNext () (at Library/PackageCache/com.unity.xr.arfoundation@4.0.2/Runtime/AR/ARSession.cs:223)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <948d12a2e4d74d94ba20d3daa73a718e>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
ARControllerr:OnEnable() (at Assets/ARControllerr.cs:12
Reproducible with: AR Foundation (1.5.0-preview.7, 4.0.2, 4.1.0-preview.6) 2018.4.26f1, 2019.4.8f1, 2020.1.3f1, 2020.2.0a20
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
Resolution Note (fix version 4.0.8):
A fix for this has been released in AR Foundation 4.0.8 and 4.1.0-preview.7 packages.