ViveSoftware / ViveInputUtility-Unity

A toolkit that helps developing/prototyping VR apps.
http://u3d.as/uF7
Other
352 stars 82 forks source link

Console errors when starting WaveVR Simulator #125

Open irian-codes opened 5 years ago

irian-codes commented 5 years ago

Hi, with Vive Focus updated, VIU in 1.10.4 and WaveVR SDK in 3.0.2 when in Unity 2017.4.26 I click "Start Simulator" via WaveVR top menu (with the apk already installed and running) the following errors appear:

get_isEditor can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
UnityEngine.Application:get_isEditor()
WaveVR:.ctor() (at Assets/WaveVR/Scripts/WaveVR.cs:175)
WaveVR:get_Instance() (at Assets/WaveVR/Scripts/WaveVR.cs:53)
WaveVR:EndSimulator() (at Assets/WaveVR/Scripts/WaveVR.cs:270)
WaveVR:Dispose() (at Assets/WaveVR/Scripts/WaveVR.cs:281)
WaveVR:Finalize() (at Assets/WaveVR/Scripts/WaveVR.cs:241)

WVR_WaveVR WaveVR() initialize simulator failed, WVR_Quit_S()
UnityEngine.Debug:LogError(Object)
WaveVR_Log.Log:e(String, String, Boolean) (at Assets/WaveVR/Scripts/WaveVR_Log.cs:66)
WaveVR:PrintErrorLog(String) (at Assets/WaveVR/Scripts/WaveVR.cs:44)
WaveVR:.ctor() (at Assets/WaveVR/Scripts/WaveVR.cs:192)
WaveVR:get_Instance() (at Assets/WaveVR/Scripts/WaveVR.cs:53)
WaveVR_Render:Awake() (at Assets/WaveVR/Scripts/WaveVR_Render.cs:361)
UnityEngine.GameObject:AddComponent()
HTC.UnityPlugin.VRModuleManagement.CameraCreator:CreateCamera(VRCameraHook) (at Assets/HTC.UnityPlugin/VRModule/Modules/WaveVRModule.cs:38)
HTC.UnityPlugin.Vive.VRCameraHook:OnModuleActivated(VRModuleActiveEnum) (at Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Misc/VRCameraHook.cs:83)
HTC.UnityPlugin.VRModuleManagement.VRModule:InvokeActiveModuleChangedEvent(VRModuleActiveEnum) (at Assets/HTC.UnityPlugin/VRModule/VRModuleEvent.cs:77)
HTC.UnityPlugin.VRModuleManagement.VRModule:ActivateModule(VRModuleActiveEnum) (at Assets/HTC.UnityPlugin/VRModule/VRModuleManager.cs:282)
HTC.UnityPlugin.VRModuleManagement.VRModule:Update() (at Assets/HTC.UnityPlugin/VRModule/VRModuleManager.cs:186)

WVR_WaveVR WaveVR() initialize simulator failed, WVR_Quit_S()
UnityEngine.Debug:LogError(Object)
WaveVR_Log.Log:e(String, String, Boolean) (at Assets/WaveVR/Scripts/WaveVR_Log.cs:66)
WaveVR:PrintErrorLog(String) (at Assets/WaveVR/Scripts/WaveVR.cs:44)
WaveVR:.ctor() (at Assets/WaveVR/Scripts/WaveVR.cs:192)
WaveVR:get_Instance() (at Assets/WaveVR/Scripts/WaveVR.cs:53)
WaveVR_Init:Start() (at Assets/WaveVR/Scripts/WaveVR_Init.cs:46)

WVR_WaveVR WaveVR() initialize simulator failed, WVR_Quit_S()
UnityEngine.Debug:LogError(Object)
WaveVR_Log.Log:e(String, String, Boolean) (at Assets/WaveVR/Scripts/WaveVR_Log.cs:66)
WaveVR:PrintErrorLog(String) (at Assets/WaveVR/Scripts/WaveVR.cs:44)
WaveVR:.ctor() (at Assets/WaveVR/Scripts/WaveVR.cs:192)
WaveVR:get_Instance() (at Assets/WaveVR/Scripts/WaveVR.cs:53)
<RenderLoop>c__Iterator0:MoveNext() (at Assets/WaveVR/Scripts/WaveVR_Render.cs:725)

NullReferenceException: Object reference not set to an instance of an object
WaveVR_Render+<RenderLoop>c__Iterator0.MoveNext () (at Assets/WaveVR/Scripts/WaveVR_Render.cs:725)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

WVR_WaveVR WaveVR() initialize simulator failed, WVR_Quit_S()
UnityEngine.Debug:LogError(Object)
WaveVR_Log.Log:e(String, String, Boolean) (at Assets/WaveVR/Scripts/WaveVR_Log.cs:66)
WaveVR:PrintErrorLog(String) (at Assets/WaveVR/Scripts/WaveVR.cs:44)
WaveVR:.ctor() (at Assets/WaveVR/Scripts/WaveVR.cs:192)
WaveVR:get_Instance() (at Assets/WaveVR/Scripts/WaveVR.cs:53)
WaveVR:EndSimulator() (at Assets/WaveVR/Scripts/WaveVR.cs:270)
WaveVR_Render:OnApplicationQuit() (at Assets/WaveVR/Scripts/WaveVR_Render.cs:586)

I hope you can look into it, thank you for your great work!

chengnay commented 5 years ago

@Snorchy Could you provide your Vive Focus's rom version and Wave SDK version? Did you install simulator apk using the current project?

irian-codes commented 5 years ago

Focus details:

wave sdk version: 3.02 build number: 1.95.1400.209.0_g CL1074725

Regarding the installation of the simulator. I tried first installing it via the Unity menu but that gave me error code 1 (unsuccessful installation). I saw the code and I copy pasted the adb command to the command prompt but it said "Invalid APK file" or something like that.

Eventually I could install it manually by transferring the .apk file via USB and installing it without ADB.

And then when I tried to execute the simulator thorough Unity it gave me those errors.


From: ChengNan Yang notifications@github.com Sent: Friday, May 17, 2019 9:09:46 AM To: ViveSoftware/ViveInputUtility-Unity Cc: Snorchy; Mention Subject: Re: [ViveSoftware/ViveInputUtility-Unity] Console errors when starting WaveVR Simulator (#125)

@Snorchyhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSnorchy&data=02%7C01%7C%7C993b8d43a439455fef1c08d6da96a532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636936737879937167&sdata=74wF5SHwgIugkRGjS7lkmL%2Bwej8bk5ZeQ%2B6KJb%2F3Sb0%3D&reserved=0 Could you provide your Vive Focus's rom version and Wave SDK version? Did you install simulator apk using the current project?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FViveSoftware%2FViveInputUtility-Unity%2Fissues%2F125%3Femail_source%3Dnotifications%26email_token%3DAHBM2GXTBCDPVX2H3UL6DPTPVZK3VA5CNFSM4HNOF36KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVT6B6Q%23issuecomment-493347066&data=02%7C01%7C%7C993b8d43a439455fef1c08d6da96a532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636936737879957177&sdata=hd9o07QVLfP7dGzsnFepyhpsIB%2F%2FOLIhGm9QA4iJ%2FPU%3D&reserved=0, or mute the threadhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHBM2GRAZH2QCMVVWEWYE6DPVZK3VANCNFSM4HNOF36A&data=02%7C01%7C%7C993b8d43a439455fef1c08d6da96a532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636936737879967188&sdata=6HPndhAqgDJXCYeWhX7CRdLOyY6cUN2GZClxEJeI1sg%3D&reserved=0.

chengnay commented 5 years ago

@Snorchy It is weird that I don't find your build number from our database. And, there might be issue when you don't install apk by official method. Can you share the apk in Assets\Plugins\wvr_plugins_simulator_server.apk? I would like to check whether this apk is broken. I couldn't reproduce your issue by using VIU 1.10.4, Unity 2017.4.26 and WaveVR SDK 3.0.2 with my own Focus device.

irian-codes commented 5 years ago

Sure, here it is: https://1drv.ms/f/s!At9UtWURDSwlhfBVKah_ZecBGxraQA

chengnay commented 5 years ago

@Snorchy I got the response from our Wave SDK team, and they replied with a patch for your issue. Could you apply the fix and try again? patches.zip

irian-codes commented 5 years ago

I don't have access to that device anymore, my company was renting it for some days and I don't know when we'll have it again. If I can try it with my Android phone (since the Focus work with Android) then I'll do it.

chengnay commented 5 years ago

@Snorchy Android phone cannot run apk that is build for Vive Focus. Just try the patch when you got the device back, thanks!

irian-codes commented 5 years ago

Ok, I did everything I could at the moment. I'm sorry. If I have it again I'll tell you. And you have the build number, in case you come accross one Focus with that version.

0x4b404ec commented 4 years ago

I had the same problem...

chengnay commented 4 years ago

I had the same problem...

@ZqWong Could you provide more information on your problem? Could you provide any sample project for debugging?