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
- Tooltip messages should be presented in human language not in code strings
- [Linux] Editor doesn’t auto reload when an Asset is imported or a Script is changed
- MouseDownEvent is triggered when changing from Scene view to Game view
- "GlobalObjectIdentifierToObjectSlow" returns Null when retrieving "GlobalObjectId" from GameObject inside a Prefab
- Shader is invisible in the Build when using BiRP on Meta Quest 2
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.