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
- Selector gets stuck in UI if scroll is used while dragging
- Created asset is placed in a new folder when creating a new folder and instantly creating an asset by clicking somewhere else
- Selecting and deleting transition in Animator does not add to Undo History when animation is previewed in Inspector
- GameObjects remain static when updating constraints of PhysicsJoint with "Enable Sleeping" selected in Havok Physics Configuration
- [iOS] Touch input is not clocked and UI is unresponsive when the application is paused mid-drag without lifting the finger
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.