Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching scenes not working in Unity Editor #4

Closed
DuFF14 opened this issue Dec 28, 2015 · 5 comments
Closed

Switching scenes not working in Unity Editor #4

DuFF14 opened this issue Dec 28, 2015 · 5 comments

Comments

@DuFF14
Copy link
Member

DuFF14 commented Dec 28, 2015

Get the "Display Startup failed. Check HMD connection." error, only in the editor, and only in the scenes that were converted from the VRSamples project (no issues switching scenes between OSVR demo scenes).

A few times I saw this error:
ObjectDisposedException: The object was used after being disposed.
System.Runtime.InteropServices.SafeHandle.DangerousAddRef (System.Boolean& success) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs:111)
OSVR.ClientKit.DisplayConfig.CheckDisplayStartup () (at z:/jenkins-node/workspace/Managed-OSVR/ClientKit/Display.cs:241)
OSVR.Unity.DisplayController.Update () (at Assets/OSVRUnity/src/DisplayController.cs:311)

@DuFF14
Copy link
Member Author

DuFF14 commented May 23, 2016

Switching scenes still an issue when direct mode is enabled.

@DuFF14 DuFF14 reopened this May 23, 2016
@DuFF14
Copy link
Member Author

DuFF14 commented May 23, 2016

Seems to be a race condition. It doesn't always crash when switching scenes. @russell-taylor any idea why GetRenderInfo could be causing issues during a scene switch in Unity?

Sometimes the stack trace looks like:

========== OUTPUTING STACK TRACE ==================

0x00007FF9F5FA6AC2 (osvrRenderManager) [c:\users\greg\documents\osvr\osvr-rendermanager\osvr\renderkit\rendermanager.h:383] osvr::renderkit::RenderManager::GetRenderInfo
0x00007FFA1ABF4D6D (osvrUnityRenderingPlugin) [c:\users\greg\documents\osvr\osvr-unity-rendering\osvrrenderingplugin.cpp:323] UpdateRenderInfo
0x00000001402FFE62 (Unity) GfxDevice::InsertCustomMarkerCallback
0x00000001413FDE1E (Unity) GfxDeviceWorker::RunCommand
0x000000014140198F (Unity) GfxDeviceWorker::Run
0x00000001413FA36D (Unity) GfxDeviceWorker::RunGfxDeviceWorker
0x0000000140577EF6 (Unity) Thread::RunThreadWrapper
0x00007FFA2E9113D2 (KERNEL32) BaseThreadInitThunk

========== END OF STACKTRACE ===========

and sometimes it looks like:
========== OUTPUTING STACK TRACE ==================

0x00007FFA29C3F3A4 (nvwgf2umx) NVAPI_Thunk
0x00007FFA296A6F83 (nvwgf2umx) OpenAdapter12
0x00007FFA29C3FDE0 (nvwgf2umx) NVAPI_Thunk
0x00007FFA29EAA7AE (nvwgf2umx) NVAPI_Thunk
0x00007FFA29C8312F (nvwgf2umx) NVAPI_Thunk
0x00007FFA296AB9C0 (nvwgf2umx) OpenAdapter12
0x00007FFA296B2ADD (nvwgf2umx) OpenAdapter12
0x00007FFA296B2A4B (nvwgf2umx) OpenAdapter12
0x00007FFA296B28DB (nvwgf2umx) OpenAdapter12
0x00007FFA296AB82D (nvwgf2umx) OpenAdapter12
0x00007FFA29CC034A (nvwgf2umx) NVAPI_Thunk
0x00007FFA2A05BA2F (nvwgf2umx) NVAPI_Thunk
0x00007FFA2A05BBD6 (nvwgf2umx) NVAPI_Thunk
0x00007FFA2E9113D2 (KERNEL32) BaseThreadInitThunk

========== END OF STACKTRACE ===========

@russell-taylor
Copy link

Jeremy reported occasional issues with 0 eyes being reported from GetRenderInfo. I haven't had time to look into it yet. My guess is that we're seeing a threading issue at work. Otherwise, I don't know how RenderManager would know that there was a scene switch going on. Does Unity register new render buffers during a scene switch?

@DuFF14
Copy link
Member Author

DuFF14 commented May 23, 2016

It releases the render buffers in the current scene and registers new ones in the new scene, but something might be going wrong there. Will go down that path more carefully.

@DuFF14
Copy link
Member Author

DuFF14 commented Mar 15, 2017

This was fixed upstream.

@DuFF14 DuFF14 closed this as completed Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants