"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Memory leak on HoloLens 2 when tracking is lost

This issue happened in my main project using Vuforia 10.4.4, but I reproduced it in the HoloLens 2 example application on Vuforia 10.8.4. Tested in a release build deployed over USB. I'm using Unity 2020.3.30f1.

When the Hololens loses tracking, the System Used Memory (as visible in the Profiler after clicking the Memory panel) starts going up, roughly 50MB a second. If it remains in this state long enough, the application hard-crashes. 

However, if it recovers tracking before the crash, then the memory will quickly return to what it was before it lost tracking. 

I recorded a video of all this here. Exact reproduction steps: 

1. Start a new Unity project (I used 2020.3.30f1)

2. Import the Vuforia Hololens 2 example project

3. Follow the instructions on the Working with the HoloLens Sample in Unity page (using the "Add Vuforia through the HoloLens Sample" path). Additionally, in the Publishing Settings under Capabilities, also add InternetClientServer and PrivateNetworkClientServer (so that you can attach the profiler).

4. Build a release build, targeting USB deployment on HoloLens.

5. Open the solution that the build process created, setting it to Release/ARM64/Device.

6. Deploy the solution via USB.

7. Run the app on the HoloLens 2. Press Yes when prompted to allow permissions for microphone and webcam access.

8. Attach the Unity profiler via your HoloLens' IP. Note that System Used Memory holds solid around 0.78MB. 

10. Cover all of the front-facing sensors and wait. (Covering the center RGB camera is not enough). The System Used Memory will creep up until it eventually crashes after a few minutes. 

 

We are demoing a surgical application, and this caused several crashes during a recent demo. The doctor would take off the HoloLens to talk to us and sometimes hold it or set it down in a position where it could not recognize features, such as dangling it facing the floor or setting it down with something big right in front of it. It would be suspicious to try and stop a potential client from doing this.

We would strongly prefer not to upgrade the Unity version, as we are using an internal toolkit that is built for 2020.3 specifically. Upgrading Vuforia to future versions is not an issue, though.  Are there any known fixes for this?  Thanks! 

Hello,

Thank you for the detailed report and steps to reproduce. I've reached back to our development team for review.

Will revert back to this thread with any new information or guidance.

Kind regards,

Dave Downing

Hey there,

 

First of all, thanks again for the detailed report! We've taken it to the team and will make sure this gets fixed in our next release v10.9.

 

Kind regards,

Patrick Scheper

Vuforia Engine Product Manager