Jump to content
 
LeRuf

Hand Tracking problems on Vive Focus Plus

Recommended Posts

Hi,

 

As the title implies, I would like  to use Unity 2019 (version 2019.3.8f1) for my project, an application which would use hand tracking on the Vive Focus Plus.
However, a few seconds after I start the application on the headset, it suddenly freezes and crashes.
The same code, on a 2018 version of Unity, works perfectly.

I would like to know if anyone had encountered those issues with the Vive Focus Plus and handtracking on Unity 2019, and what steps you took if you did encounter this problem.
Have a good day !

Share this post


Link to post
Share on other sites

Hi @LeRuf

Can you share the version of Vive Hand Tracking SDK and WaveVR SDK?

Please also provide the adb log about the crash, so we can help to analyze it.

Share this post


Link to post
Share on other sites

Hello @zzy !


I'm using the latest versions of both SDKs, so WaveSDK 3.1.94 and Hand Tracking 0.9.1.

Here is a pastebin of my latest try with the application. https://pastebin.com/Py1iGWap

Also, with further testing, I noticed that the application does not have this behaviour if I'm using the 3D Point rendering method.

Share this post


Link to post
Share on other sites

Hi @LeRuf

From the log your pasted, I think the problem is here:

Quote
0001/01/01 00:00:00.000 -1 -1 Info  --------- beginning of crash
2020/05/13 11:37:57.041 22605 22799 Fatal libc /buildbot/src/googleplex-android/ndk-release-r20/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type cv::Exception: OpenCV(3.4.7) D:\Project\deeplearning\aristo\3rdparty\download\opencv-3.4.7\modules\core\src\alloc.cpp:72: error: (-4:Insufficient memory) Failed to allocate 32768 bytes in function 'OutOfMemoryError'

This seems like a out of memory. Some ways to fix:

  1. Build the app for arm64 using il2cpp. It should have more memory available than armv7.
  2. Remove some objects from the scene.
  3. I think some player settings can also help this, e.g. vertex compression, reduce number of shaders, etc.

 

Share this post


Link to post
Share on other sites

So, I followed your advice for my next attempt, and I still get a crash about 10 seconds in. I built the app with IL2CPP targeting arm64.
The scene is a completely empty scene with only a FPS counter. This counter goes down as soon as the hands start showing up.

 

The crash source still seems to be a memory leak. I'm enclosing a new pastebin. https://pastebin.com/ZMHidGA2

Share this post


Link to post
Share on other sites

Hi @LeRuf

Yes, this seems like a memory leak. I'll try to see if I can reproduce it on my local side tomorrow.

Share this post


Link to post
Share on other sites

Hi @LeRuf

After a few searching with Google, I think this might be a bug of Unity.

Here are related issues and forum discussion:

https://issuetracker.unity3d.com/issues/android-crash-with-gsl-mem-error-kgsl-sharedmem-alloc-ioctl-failed-on-adreno-gpu-devices-1

https://issuetracker.unity3d.com/issues/android-crash-with-gsl-mem-error-kgsl-sharedmem-alloc-ioctl-failed-on-adreno-gpu-devices

https://forum.unity.com/threads/fixed-memory-issues-on-android-since-2018-3-0f2.599551/

Although the issues are claimed to be fixed, but people are still experiencing this bug. You can even find people taking about Focus Plus in the first link.

Recommended solution:

  1. You can try the latest 2019.3 version (which should be 2019.3.13 according to this page: https://unity3d.com/cn/get-unity/download/archive)
  2. I would recommend using 2018.4 LTS version for stability.
  3. You to create a bug report to Unity to see if this can be fixed.
  • Like 1

Share this post


Link to post
Share on other sites

Thanks a lot for your help, I switched to the 2019.1 version in the meantime, works like a charm on this one without any code adjustments.
I'll try to upgrade to 2019.3 later, and I created a bug report for Unity.

Thanks again !

  • Like 2

Share this post


Link to post
Share on other sites

Hi, I am encountering the same problem.

A scene with only the WaveVR prefab will leak memory at approximately 1MB/s. There is a problem in Unity 2019.4.0 and 2018.3.15 but not in 2019.1.14.

However, a scene with just a Camera and no wave SDK scripts will not leak. A scene using the Pico VR SDK prefab will also leak but very slowly

@LeRuf, is there a public URL for your bug report so that I can add votes ?

@zzy

Share this post


Link to post
Share on other sites

Hi @aze

I'm not sure if this is a Unity bug, but it seems using Unity 2019.1 is a workaround for now.

@Cotta Can you please also help to see if there is any workaround in WaveVR? It seems memory leak happens with WaveVR prefab in some Unity versions.

Share this post


Link to post
Share on other sites

Please sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...