Closed bnolan closed 2 days ago
If I put on the rift it says 'playground loading' but never finishes loading.
This is the logs from the SingleFileExample OpenXR app:
'SingleFileExample.exe' (Win32): Loaded 'C:\Users\bnola\Documents\GitHub\OpenXRSamples\SingleFileExample\x64\Debug\SingleFileExample.exe'. Symbols loaded.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\D3DCompiler_47.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'.
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\msvcrt.dll'
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\cryptsp.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\DXCore.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Users\bnola\Documents\GitHub\OpenXRSamples\SingleFileExample\x64\Debug\openxr_loader.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'D:\Oculus\Support\oculus-runtime\LibOVRRT64_1.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'.
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'.
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\dbghelp.dll'
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'.
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\SHCore.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\profapi.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\umpdc.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\powrprof.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\windows.storage.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\shell32.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\shlwapi.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\winmm.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\opengl32.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\glu32.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\msasn1.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\crypt32.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\wintrust.dll'
'SingleFileExample.exe' (Win32): Unloaded 'D:\Oculus\Support\oculus-runtime\LibOVRRT64_1.dll'
'SingleFileExample.exe' (Win32): Loaded 'D:\Oculus\Support\oculus-runtime\LibOVRRT64_1.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'.
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\SHCore.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\profapi.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\umpdc.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\powrprof.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\windows.storage.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\shell32.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\shlwapi.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\winmm.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\opengl32.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\glu32.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\msasn1.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\crypt32.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\wintrust.dll'
'SingleFileExample.exe' (Win32): Unloaded 'D:\Oculus\Support\oculus-runtime\LibOVRRT64_1.dll'
'SingleFileExample.exe' (Win32): Loaded 'D:\Oculus\Support\oculus-runtime\LibOVRRT64_1.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'.
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'.
25/08 11:20:11.447 {INFO} [CAPI] OVRInterface plugin library location: D:\Oculus\Support\oculus-runtime\client-plugins\x64
25/08 11:20:11.447 {INFO} [CAPI] OVRInterface plugin libraries:
<none>
25/08 11:20:11.447 {INFO} [CAPI] OVRInterface classes and interfaces:
Class Id: 0xb00b00067332ab1, class Name: OVRExtensionAddition
Interface Id: 0xb00b00053345520
Class Id: 0xb00b000538d08ac1, class Name: OpenXRExtensionAddition
Interface Id: 0xb00b000538d08ac0
25/08 11:20:11.447 {INFO} [CAPI] LibOVR module is located at D:\Oculus\Support\oculus-runtime\LibOVRRT64_1.dll
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'.
25/08 11:20:11.452 {INFO} [Client] Connected to the server running version (prod = 1).1.52.0(build = 0) feature version = 0. Client runs version (prod = 1).1.52.0(build = 0) feature version = 0
xrCreateDebugUtilsMessengerEXT: Completed loader terminatorxrCreateDebugUtilsMessengerEXT: Completed loader trampoline25/08 11:20:11.455 {DEBUG} [HMDState] Using default profile default
25/08 11:20:11.456 {INFO} [HMDState] IAD changed to %.1fmm63.8902
25/08 11:20:11.456 {DEBUG} [HMDRenderState] UpdateGeneratedState: IPD = 0.0638902, IAD = 0.0638902, screen_sep = 0.0695602
25/08 11:20:11.456 {DEBUG} [SharedMemory] Creating factory
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'.
'SingleFileExample.exe' (Win32): Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_db678424d2641c3d\nvldumdx.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\imagehlp.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\rsaenh.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_db678424d2641c3d\nvwgf2umx.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Program Files\NVIDIA Corporation\Ansel\Tools\NvCameraWhitelisting64.dll'.
'SingleFileExample.exe' (Win32): Unloaded 'C:\Program Files\NVIDIA Corporation\Ansel\Tools\NvCameraWhitelisting64.dll'
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\nvspcap64.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'.
'SingleFileExample.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'.
The thread 0x2758 has exited with code 0 (0x0).
25/08 11:20:11.540 {DEBUG} [HMDState] Using default profile default
25/08 11:20:11.541 {INFO} [HMDState] IAD changed to %.1fmm63.8902
25/08 11:20:11.541 {DEBUG} [HMDRenderState] UpdateGeneratedState: IPD = 0.0638902, IAD = 0.0638902, screen_sep = 0.0695602
25/08 11:20:11.554 {DEBUG} [D3D11_CliCompositorClient] CliD3D11CompositorClient::initialize 1
25/08 11:20:11.554 {DEBUG} [KMTSyncObject] Creating KMTHandle 0x27db4410
25/08 11:20:11.578 {DEBUG} [KMTSyncObject] Creating KMTHandle 0x27db4d70
25/08 11:20:11.578 {DEBUG} [KMTSyncObject] KMTHandle::Create hDevice=0x40000080
25/08 11:20:11.578 {DEBUG} [KMTSyncObject] KMTHandle::Create hContexts[0] = 1073742976
25/08 11:20:11.578 {DEBUG} [KMTSyncObject] KMTHandle::Create hContexts[1] = 1073743296
25/08 11:20:11.579 {INFO} [D3D11_CliCompositorClient] CliD3D11CompositorClient initialized
25/08 11:20:11.581 {DEBUG} [OXR] SetSessionState from XR_SESSION_STATE_UNKNOWN to XR_SESSION_STATE_IDLE
25/08 11:20:11.581 {INFO} [OXR] xrCreateSession 0x10059d800000001
25/08 11:20:11.581 {DEBUG} [D3D11_CliCompositorClient] CliD3D11CompositorClient::addD3DRef 2
25/08 11:20:11.583 {DEBUG} [D3D11_CliCompositorClient] CliD3D11CompositorClient::addD3DRef 3
25/08 11:20:11.585 {WARNING} [OXR] OXRSessionData::AttachSessionActionSets using shallow copy for bound action sets (fixme!)
It seems to run fine.
I've done some debugging and the runtime error is here:
It seems to trigger on all the files, and I cannot see what the javascript error message is - but I'm guessing it's something do with the OpenXR support, since it always crashed once the timeout to create the xr experience fires.
I haven't personally tested out oculus openxr support but we have definitely seen some weird behaviors when running openxr support on hololens.
It might be worth changing your visual studio exception settings to break when this is occurring: Exception thrown at 0x00007FFFACFBA719 in Playground.exe: Microsoft C++ exception: std::runtime_error at memory location 0x0000001C1D2FDEA0. https://docs.microsoft.com/en-us/visualstudio/debugger/managing-exceptions-with-the-debugger?view=vs-2019#tell-the-debugger-to-break-when-an-exception-is-thrown
Seeing what call stack is causing this runtime error may help us better understand what portion of babylon native's OpenXR code is causing this exception.
On another note, it looks like your xr session may be transitioning to an idle state (XR_SESSION_STATE_IDLE). I know I have seen some HoloLens issues where poor frame rates/a lot of scene content can cause the application to transition to an idle state. When in an idle state, i have seen exceptions thrown based on submitting frames even though the xr session has been torn down: https://github.com/BabylonJS/BabylonNative/issues/375
Do you know what commit you are trying for the BabylonNative repo? Recently we moved this repo to a reference newer OpenXR-SDK commit to pick up more content. Itd be interesting to see whether this issue repros with more up to do date versions of the openxr sdk. Do you know what version of openxr is being used in the openxr samples project?
@bnolan The runtime error you're seeing here is probably (not guaranteed, but likely) misleading. N-API's handling of errors is a little strange -- many times they're stored, then thrown the next time you use N-API, not the time they actually occurred. Depending on the circumstances, though, it may be possible to catch whatever the real error was in the debugger.
If the error was in JavaScript, we may be in luck because (I'm guessing) your build is using the Chakra JavaScript engine, and Chakra debugging is relatively easy on Windows at the moment. In your Visual Studio solution explorer, right-click the Playground app and open Properties. In the left-most panel of the project properties, select Debugging, then from the options change Debugger Type to "Script." Now if you run again and JavaScript throws an error, the debugger should automatically break on the error and let you see where it came from. You can also set breakpoints and inspect values in JavaScript, as with normal Visual Studio debugging.
If the error was in C++, it might be a little trickier to find, but it shouldn't be too bad. If your debugger didn't break on it before, you may need to enable more kinds of C++ exceptions. In your solution's Exception Settings, enable all C++ exceptions, then run again. Unfortunately this will be a little tricky (at least when using Chakra) because the first few exceptions you'll encounter are all expected behaviors and don't represent real problems. Thankfully, it should be pretty easy to tell with the Playground XR experience when you've gotten through the expected errors because they'll all happen before the ordinary 2D window starts rendering. Just F5 through the errors until the cube pops up, then wait for the XR experience to launch. If the debugger catches an error then, it's almost certainly related to whatever the problem is.
At some point, we need to make error handling better. This is captured by #224 and is something we should address to make it less painful.
Closing in favor of #231
Ok, so still getting
XR_FAILED
. This time however, I'm running on a desktop PC, windows 10 with a a gtx 970 and oculus rift. The rift runs fine with openxr with this sample:https://github.com/maluoi/OpenXRSamples
I can compile and run the BabylonNative playground, but when it tries to enter vr mode (
let vr = true
), it starts rendering in 2d mode for ~5 seconds, but then crashes on trying to enter VR mode.Here are my logs: