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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are 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.