Search Unity

Bug [IN-35912] AR Simulation error on ArSession.Reset - SimulationProvider.CreateVoxelGrids

Discussion in 'AR' started by ROBYER1, Mar 17, 2023.

  1. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    In Unity Editor 2022.2.10 with AR Foundation 5.0.5 using XR Simulation, when calling ARSession.Reset, I get the following error:

    NullReferenceException: Object reference not set to an instance of an object
    UnityEngine.XR.Simulation.SimulationPlaneSubsystem+SimulationProvider.CreateVoxelGrids () (at ./Library/PackageCache/com.unity.xr.arfoundation@5.0.5/Runtime/Simulation/Subsystems/Plane/SimulationPlaneSubsystem.cs:366)


    Full error:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEngine.XR.Simulation.SimulationPlaneSubsystem+SimulationProvider.CreateVoxelGrids () (at ./Library/PackageCache/com.unity.xr.arfoundation@5.0.5/Runtime/Simulation/Subsystems/Plane/SimulationPlaneSubsystem.cs:366)
    3. UnityEngine.XR.Simulation.SimulationPlaneSubsystem+SimulationProvider.OnSimulationSessionReset () (at ./Library/PackageCache/com.unity.xr.arfoundation@5.0.5/Runtime/Simulation/Subsystems/Plane/SimulationPlaneSubsystem.cs:162)
    4. UnityEngine.XR.Simulation.SimulationSessionSubsystem+SimulationProvider.Reset () (at ./Library/PackageCache/com.unity.xr.arfoundation@5.0.5/Runtime/Simulation/Subsystems/SimulationSessionSubsystem.cs:123)
    5. UnityEngine.XR.ARSubsystems.XRSessionSubsystem.Reset () (at ./Library/PackageCache/com.unity.xr.arfoundation@5.0.5/Runtime/ARSubsystems/SessionSubsystem/XRSessionSubsystem.cs:66)
    6. UnityEngine.XR.ARFoundation.ARSession.Reset () (at ./Library/PackageCache/com.unity.xr.arfoundation@5.0.5/Runtime/ARFoundation/ARSession.cs:160)
    7. Controller.StartAR (System.String message) (at Assets/Scripts/Controller.cs:140)
    8. Controller.ToggleAR (System.Boolean ARMode) (at Assets/Scripts/Controller.cs:119)
    9. UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at /Users/bokken/build/output/unity/unity/Runtime/Export/UnityEvent/UnityEvent.cs:219)
    10. UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at /Users/bokken/build/output/unity/unity/artifacts/generated/UnityEvent/UnityEvent_1.cs:57)
    11. UnityEngine.UI.Toggle.Set (System.Boolean value, System.Boolean sendCallback) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Toggle.cs:284)
    12. UnityEngine.UI.Toggle.set_isOn (System.Boolean value) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Toggle.cs:247)
    13. UnityEngine.UI.Toggle.InternalToggle () (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Toggle.cs:317)
    14. UnityEngine.UI.Toggle.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Toggle.cs:328)
    15. UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57)
    16. UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
    17. UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:530)
    18.  
    Reported at:
    IN-35912 - [XR Sim] AR Simulation error on ArSession.Reset - SimulationProvider.CreateVoxelGrids
     
    Last edited: Mar 21, 2023
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Thanks for the detailed bug report @ROBYER1. We'll take a look at this for our next patch release (a few weeks out). 5.0.5 was otherwise a pretty small release and you should be able to work from 5.0.4 in the meantime. Apologies for the inconvenience.
     
    ROBYER1 likes this.