ChannexDK Posted January 24 Share Posted January 24 Unity 2020.3.8 OpenVR 1.1.4 VIVE Hands Tracking SDK 1.0.0 When exiting playmode, the GestureInterface.StopGestureDetection(); crashes. I noticed the comment in the WindowsPlayModeMonitor, saying that it needed to shutdown the detection engine, because the UnityXR system stops before OnApplicationExit is called. This is very true, but judging from the log, the XR system is also being shut down before the playModeStateChanged callback is executed. I'm not entirely sure how to work around this, since there is no earlier callback in Unity that I know of, so the best resolution would be for the aristo_interface to not assume that any XR pointers are valid when StopGestureDetection is called. It seems like it's trying to access something in a SetCameraTransform() function - and I have made absolutely sure that it is not because SetCameraTransform is being called from the Unity side (added logs around the call and checked). Note: The log entry "ViveHandTrackingEngine.StopDetection() called" is from a Debug.Log statement I added to make sure exactly where the crash came from. My StopDetection method in ViveHandTrackingEngine.cs looks like this: public override void StopDetection() { Debug.Log("ViveHandTrackingEngine.StopDetection() called"); this.isRunning = false; GestureInterface.StopGestureDetection(); lastIndex = -1; Debug.Log("ViveHandTrackingEngine.StopDetection() Complete"); } The StopDetection() log statement is never logged (therefore I can be fairly certain that the crash is occuring in StopGestureDetection(). No other changes were made to the package and the crash also happens in the examples. Every time. Except from the log: [XR] [OpenVR] Device disconnected (stopping provider). Handle: 653853456. DeviceID: 0 [XR] [OpenVR] Device disconnected (stopping provider). Handle: 653853456. DeviceID: 1 [XR] [OpenVR] Device disconnected (stopping provider). Handle: 653853456. DeviceID: 2 [XR] [OpenVR] Device disconnected (stopping provider). Handle: 653853456. DeviceID: 3 [XR] [OpenVR] XR OpenVR Display Stop [XR] [OpenVR] XR OpenVR Display Shutdown XRTextureManager::RequestDestroyTexture XRTextureManager::RequestDestroyTexture XRTextureManager::RequestDestroyTexture XRTextureManager::RequestDestroyTexture [XR] [OpenVR] Shutdown XRTextureManager::RequestDestroyTexture XRTextureManager::RequestDestroyTexture XRTextureManager::RequestDestroyTexture XRTextureManager::RequestDestroyTexture ViveHandTrackingEngine.StopDetection() called UnityEngine.StackTraceUtility:ExtractStackTrace () UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) UnityEngine.Logger:Log (UnityEngine.LogType,object) UnityEngine.Debug:Log (object) ViveHandTracking.ViveHandTrackingEngine:StopDetection () (at Packages/com.htc.upm.vivehandtracking@1.0.0/Runtime/Scripts/Engine/ViveHandTrackingEngine.cs:220) ViveHandTracking.GestureProvider:StopGestureDetection () (at Packages/com.htc.upm.vivehandtracking@1.0.0/Runtime/Scripts/GestureProvider.cs:181) ViveHandTracking.GestureProvider:OnDisable () (at Packages/com.htc.upm.vivehandtracking@1.0.0/Runtime/Scripts/GestureProvider.cs:189) ViveHandTracking.WindowsPlayModeMonitor:LogPlayModeState (UnityEditor.PlayModeStateChange) (at Packages/com.htc.upm.vivehandtracking@1.0.0/Editor/WindowsPlayModeMonitor.cs:16) UnityEditor.EditorApplication:Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange) **Content CUT for clarity** ========== OUTPUTTING STACK TRACE ================== 0x00007FFA3F2762C2 (aristo_interface) SetCameraTransform 0x00007FFA3F270268 (aristo_interface) SetCameraTransform 0x00007FFA3F26CB6F (aristo_interface) GetGestureResult ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFA3F257A54) 0x00007FFA3F257A54 (aristo_interface) (function-name not available) ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFA3F25AC9F) 0x00007FFA3F25AC9F (aristo_interface) (function-name not available) ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFA3F25E655) 0x00007FFA3F25E655 (aristo_interface) (function-name not available) ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFA3F259B28) 0x00007FFA3F259B28 (aristo_interface) (function-name not available) 0x00007FFAB7BE1BB2 (ucrtbase) configthreadlocale 0x00007FFAB8BC7034 (KERNEL32) BaseThreadInitThunk 0x00007FFABA362651 (ntdll) RtlUserThreadStart ========== END OF STACKTRACE =========== 1 Link to comment Share on other sites More sharing options...
TMosier Posted January 27 Share Posted January 27 Having the exact same issue. Sample projects are crashing on playmode exit but also, the HMD doesn't seem to track when I enter playmode. The scene loads and I can see the default hand positions but the movement of the camera does not track at all. Exiting playmode crashes and my log file looks basically identical. Link to comment Share on other sites More sharing options...
cri_eva Posted March 2 Share Posted March 2 Any updates on this issue? I have the same problem using Unity 2021.1.27f1 Link to comment Share on other sites More sharing options...
david123es Posted March 3 Share Posted March 3 Having the exact same issue using Unity 2021.1.27f1.working on various projects and the website related to downloads. The scene loads and I can see the default hand positions but the movement of the camera does not track at all. Exiting playmode crashes and my log file looks basically identical. Link to comment Share on other sites More sharing options...
Ryan Logan Posted Friday at 04:54 PM Share Posted Friday at 04:54 PM (edited) Same here in 2020.3.20f1 with a Cosmos. Tracking works fine (well as good as it's going to work), but crashes every time I exit play mode. Edited Friday at 04:55 PM by Ryan Logan Link to comment Share on other sites More sharing options...
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