Search Issue Tracker
Duplicate
Votes
0
Found in [Package]
4.1.12
4.2.2
4.2.3
4.2.6
5.0.3
Issue ID
ARFB-179
Regression
No
ARFoundation.ARPlane memory leak of boundary NativeArray when using Holographic Remoting to HoloLens 2
How to reproduce:
1. Open the attached project "Sample.zip"
2. Open Assets/ARRaycast/ARRaycast.unity
3. Enable Holographic Remoting for Play Mode (Mixed Reality>Remoting>Holographic Remoting for Play Mode)
4. Open Holographic Remoting on HoloLens 2
5. Enter Play Mode in the Editor
6. Open "AR Raycasting" Scene on HoloLens 2
7. Exit Play Mode
Expected results: No errors thrown in the Console window
Actual results: "A Native Collection has not been disposed, resulting in a memory leak." error thrown in the Console window
Reproducible with: 2020.3.33f1, 2021.3.3f1, 2022.1.1f1, 2022.2.0a11
Not reproducible with: 2022.2.0a12, 2022.2.0a13
Could not test with: 2019.4.38f1 (OpenXR not supported)
Reproducible on: Windows 10
*Additional information shared from our Partner at Microsoft via a shared Favro board:*
This crash only happens in the Unity 2020 / 2021 / 2022 Editors. The 2020 / 2021 / 2022 standalone or UWP builds outside the editor work fine as well.
+Slightly newer version of this error, 2022:+
A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeArray`1:.ctor(Int32, Allocator, NativeArrayOptions)
UnityEngine.XR.ARFoundation.ARPlane:UpdateBoundary(XRPlaneSubsystem) (at Library\PackageCache\com.unity.xr.arfoundation@4.2.3\Runtime\AR\ARPlane.cs:133)
UnityEngine.XR.ARFoundation.ARPlaneManager:OnAfterSetSessionRelativeData(ARPlane, BoundedPlane) (at Library\PackageCache\com.unity.xr.arfoundation@4.2.3\Runtime\AR\ARPlaneManager.cs:251)
UnityEngine.XR.ARFoundation.ARTrackableManager`5:CreateOrUpdateTrackable(BoundedPlane) (at Library\PackageCache\com.unity.xr.arfoundation@4.2.3\Runtime\AR\ARTrackableManager.cs:434)
UnityEngine.XR.ARFoundation.ARTrackableManager`5:Update() (at Library\PackageCache\com.unity.xr.arfoundation@4.2.3\Runtime\AR\ARTrackableManager.cs:186)
+Old version of this error, 2020 / 2021:+
A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeArray`1:.ctor(Int32, Allocator, NativeArrayOptions)
UnityEngine.XR.ARFoundation.ARPlane:UpdateBoundary(XRPlaneSubsystem) (at Library\PackageCache\com.unity.xr.arfoundation@4.2.2\Runtime\AR\ARPlane.cs:133)
UnityEngine.XR.ARFoundation.ARPlaneManager:OnAfterSetSessionRelativeData(ARPlane, BoundedPlane) (at Library\PackageCache\com.unity.xr.arfoundation@4.2.2\Runtime\AR\ARPlaneManager.cs:251)
UnityEngine.XR.ARFoundation.ARTrackableManager`5:CreateOrUpdateTrackable(BoundedPlane) (at Library\PackageCache\com.unity.xr.arfoundation@4.2.2\Runtime\AR\ARTrackableManager.cs:434)
UnityEngine.XR.ARFoundation.ARTrackableManager`5:Update() (at Library\PackageCache\com.unity.xr.arfoundation@4.2.2\Runtime\AR\ARTrackableManager.cs:177)
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
- Brush Size in the Inspector window does not update when the Brush Size in Scene View is changed
- "ArgumentOutOfRangeException" errors are thrown every time a keyboard key is pressed when renaming a component in UI Builder with a symbol and changing the name after label attribute warning
- Values in "Rect Transform" component are only partially updated when changing values in Prefab Mode
- Same Asset Type Focused Inspectors do not repaint when menus are manipulated
- Bool or Trigger Parameters can be selected via right clicking to the right of a Parameter control in the Animator Window
Resolution Note:
This issue has been fixed for a while, this is a duplicate issue.
Duplicate of another internal issue: ARFB-177: ARPlane NativeArray memory leak when running in 2021 editor