VR Preview crash when Event Begin Play used - 4.27.1

The update for Varjo base was released last week! Let us know if it resolved your issue.

2 Likes

@VictorLerp It did solve most of it. There is still some small render artifacts and pop in and out randomly, and I have sent that info over to Varjo.

But from my end its working much better.

Now I just need the OpenXR plugin to have “Reset Orientation and position” fixed, and get the HISM issue fixed for Varjo and I think my project will have no other hicups within unreal

Thank you for the help

I tested this again with the new SteamVR 1.21.3 beta version. This time I’m getting a different error. Before crashing, the engine pops up an error window with “GPU Crashed or D3D Device Removed.”, and it no longer crashes inside the SteamVR runtime call.

I noticed that the crashing project was using DirectX 12, and the new SteamVR beta has a fix to DX12 crashes. To see if it was a DX12 specific issue, I switched the project to DirectX 11, and sure enough it does not crash anymore. This is repeatable with my other 4.27.1 projects, running OpenXR together with DirectX 12 will cause a crash.

Looking at the original 4.27 template, it seems to have by default the RHI set to DirectX12, while the new templates have it set to the “Default” value, which loads DirectX 11.

Switching the default RHI in the project settings under the Windows category and restarting the editor should make it easy to verify with other people still having this issue.

Stack trace:


Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/D3D12RHI/Private/D3D12Util.cpp] [Line: 684] pResource->Map(Subresource, pReadRange, reinterpret_cast<void**>(&pData)) failed at D:\Build\++UE4\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RHIPrivate.h:1181 with error DXGI_ERROR_DEVICE_REMOVED with Reason: DXGI_ERROR_DEVICE_REMOVED

UE4Editor_D3D12RHI!D3D12RHI::VerifyD3D12Result() [D:\Build\++UE4\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Util.cpp:684]
UE4Editor_D3D12RHI!FD3D12BufferedGPUTiming::GetTiming() [D:\Build\++UE4\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Query.cpp:1046]
UE4Editor_D3D12RHI!D3D12RHI::FD3DGPUProfiler::EndFrame() [D:\Build\++UE4\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Stats.cpp:93]
UE4Editor_D3D12RHI!FD3D12CommandContextBase::RHIEndFrame() [D:\Build\++UE4\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12CommandContext.cpp:653]
UE4Editor_RHI!FRHICommand<FRHICommandEndFrame,FRHICommandEndFrameString1863>::ExecuteAndDestruct() [D:\Build\++UE4\Sync\Engine\Source\Runtime\RHI\Public\RHICommandList.h:765]
UE4Editor_RHI!FRHICommandListExecutor::ExecuteInner_DoExecute() [D:\Build\++UE4\Sync\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp:367]
UE4Editor_RHI!FExecuteRHIThreadTask::DoTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\RHI\Private\RHICommandList.cpp:428]
UE4Editor_RHI!TGraphTask<FExecuteRHIThreadTask>::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:710]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:602]
UE4Editor_RenderCore!FRHIThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:320]
UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]

@VictorLerp Additional Update on my end!

Varjo just released a new update to their VarjoOpenXR plugin and it fixes the HISM issue!!!

So all that’s left is getting the “Reset Orientation and position” fixed within the main OpenXR plugin that is built in.

There’s no equivalent in the OpenXR specification so we may or may not see that function for OpenXR.

1 Like

@VictorLerp

I see, I didn’t realize it wasn’t part of the specification. I saw that other plugins for HMD had it so figured since the functions exists in the openXR plugin that they “should” be there.

If that’s not something that’s going to be in OpenXR, Do you have a recommended way to do that within Unreal? I tried adding a scene component as a parent to the VR cam, and tried to move it by grabbing the cam position and subtracting that from 0,0,0 and move the scene component to that location and it moves but seems to be way inconsistent, doesn’t always align to where i need it to.

I still relatively new to Unreal and HMDs so any help here also would be very appreciated.

Thank you

This is now fixed on my end with the SteamVR beta 1.21.4 update.

1 Like

Try moving the pawn instead!

1 Like

We ended up using the Varjo base software to override the position and rotation, then are using set origin to eye in Unreal. This ends up doing what we need just sucks that we have to manually do it outside of the engine, but its working.

@VictorLerp Thank you for all your help! I’m sure I’ll have more later :slight_smile:

1 Like