sensics / OSVR-RenderManager

Apache License 2.0
64 stars 46 forks source link

Video driver crash when using clear color API #96

Closed JeroMiya closed 6 years ago

JeroMiya commented 8 years ago

This bug may or may not be in RenderManager or OSVR-Unreal. Putting it here for now until I can track it down more precisely. This crash occurs in OSVR-Unreal when exiting VR Preview mode image

Here is the log:

D3D11: Removing Device.
[2016.06.03-16.17.25:736][460]LogBlueprintUserMessages: Late EndPlayMap Detection: Level '/Game/Maps/basic.basic:PersistentLevel' has LevelScriptBlueprint '/Game/Maps/basic.basic:PersistentLevel.basic' with GeneratedClass '/Game/Maps/basic.basic_C' with ClassGeneratedBy '/Game/Maps/basic.basic:PersistentLevel.basic'
Exception thrown at 0x00007FFB8C9D1F28 in UE4Editor.exe: Microsoft C++ exception: _com_error at memory location 0x000000A1DBD0C098.
Exception thrown at 0x00007FFB8C9D1F28 in UE4Editor.exe: Microsoft C++ exception: _com_error at memory location 0x000000A1DBD0DB00.
Exception thrown at 0x00007FFB8C9D1F28 in UE4Editor.exe: Microsoft C++ exception: _com_error at memory location 0x000000A1DBD0DE30.
[2016.06.03-16.17.25:774][460]LogD3D11RHI:Error: Direct3DDevice->CreateBuffer(&Desc, NULL, UniformBufferResource.GetInitReference()) failed 
 at D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11UniformBuffer.cpp:159 
 with error DXGI_ERROR_DEVICE_REMOVED

I call the new clear color API when the game exits VR Preview mode to clear out the HMD. Without that call, everything works ok. With the call, the above crash occurs. This might be a bug in OSVR-Unreal instead of RenderManager, but I'll put it here for now.

russell-taylor commented 8 years ago

Does this call cause a crash if you do it after registering the renderbuffers but before presenting your first frame? I'm trying to figure out whether the call is completely busted in the C API or in Unreal, or whether we could be seeing a multi-threading issue.

JeroMiya commented 8 years ago

I was calling it only after presenting the first frame. More specifically, playing in vr preview mode for at least a few seconds (the length of time doesn't make a difference) which draws many frames.

russell-taylor commented 8 years ago

Right, I'm just wondering if you can call it in the main render thread in place of a PresentRenderBuffers loop and have it work. If that works, it isn't the call itself but rather something about the use of the RenderManager in whatever interrupt is asking to change scenes.

russell-taylor commented 8 years ago

Is this still happening with the current code base? Sorry for taking so long to look into it.

russell-taylor commented 7 years ago

Is this still happening?

russell-taylor commented 6 years ago

Closed due to no response.