LeRuf Posted May 13, 2020 Posted May 13, 2020 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 !
zzy Posted May 13, 2020 Posted May 13, 2020 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.
LeRuf Posted May 13, 2020 Author Posted May 13, 2020 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.
zzy Posted May 13, 2020 Posted May 13, 2020 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: Build the app for arm64 using il2cpp. It should have more memory available than armv7. Remove some objects from the scene. I think some player settings can also help this, e.g. vertex compression, reduce number of shaders, etc.
LeRuf Posted May 13, 2020 Author Posted May 13, 2020 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
zzy Posted May 13, 2020 Posted May 13, 2020 Hi @LeRuf Yes, this seems like a memory leak. I'll try to see if I can reproduce it on my local side tomorrow.
zzy Posted May 14, 2020 Posted May 14, 2020 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: 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) I would recommend using 2018.4 LTS version for stability. You to create a bug report to Unity to see if this can be fixed. 1
LeRuf Posted May 15, 2020 Author Posted May 15, 2020 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 ! 2
aze Posted June 10, 2020 Posted June 10, 2020 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
zzy Posted June 24, 2020 Posted June 24, 2020 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now