cancel
Showing results for 
Search instead for 
Did you mean: 

Metahuman crashes Unreal Engine in VR Preview for Quest 3

pawciut
Explorer

Hello,

Maybe someone had this problem with metahuman and have found a solution?

1. I have a scene that is working on Quest3 build and also in VR Preview mode.
2. I've downloaded and added metahuman I've created.
3. I've enabled all the necessary plugins and compiled shaders.
4. I've dragged downloaded metahuman blueprint into the scene.
5. I'm running VR Preview and then Unreal Engine crashes*

*When i package game for Quest3 and run from device it works.
EDIT: I'm using UE 5.3.2 and MetaXR v60

Last log entries

[2023.12.29-10.11.28:819][277]LogOnline: OSS: Created online subsystem instance for: :Context_2

[2023.12.29-10.11.28:859][277]LogSlate: New Slate User Created. Platform User Id 8, User Index 8, Is Virtual User: 1

[2023.12.29-10.11.28:862][277]LogSlate: Slate User Registered.  User Index 8, Is Virtual User: 1

[2023.12.29-10.11.28:889][277]vr.PixelDensity = "1"

[2023.12.29-10.11.28:894][277]PIE: Server logged in

[2023.12.29-10.11.28:896][277]PIE: Play in editor total start time 0,422 seconds.

[2023.12.29-10.11.28:899][277]LogWindows: WindowsPlatformFeatures enabled

[2023.12.29-10.11.28:948][277]LogRenderer: Warning: Resizing VR buffer to 4128 by 2240

[2023.12.29-10.11.28:960][277]LogHMD: Allocating Oculus 4128 x 2240 depth rendertarget swapchain

[2023.12.29-10.11.29:011][277]LogWindows: Error: appError called: Assertion failed: !EnumHasAnyFlags(TextureDesc.Flags, ETextureCreateFlags::RenderTargetable | ETextureCreateFlags::ResolveTargetable) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Texture.cpp] [Line: 529] 

[2023.12.29-10.11.29:011][277]LogWindows: Windows GetLastError: The operation completed successfully. (0)


callstack from crash:

UnrealEditor_D3D12RHI
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
kernel32
ntdll

 
I'll try to install debugging symbols for engine and test again

3 REPLIES 3

pawciut
Explorer

Ok, it looks like it's the problem with meta human's hair (Groom).
When I cloned metahuman blueprint and removed all hair related components it nows works.
I've also tried this https://twitter.com/iBrews/status/1427481910218043400 
(I've checked "Always use Hair Cards" in Lod configuration in Metahuman Creator but I'm not sure it works because on another edit it was unchecked) and it didn't help.

pawciut_1-1703866168078.png

 



When debugging it crashes on engine check.
UE_5.3\Engine\Source\Runtime\D3D12RHI\Private\D3D12Texture.cpp

pawciut_0-1703863950542.png

from digging through callstack  i found that the render pass that has the problem is related to hair textures
Texture->Name = 0x00007ff8f0664ea0 L"Hair.HairOnlyDepthTexture"

Variables from callstack:

PassState->
- TextureStates Num=3, Max=13 TArray<FRDGPass::FTextureState,TRDGArrayAllocator<0>>
+ [0] {Texture=0x0000095f1b36fbc0 0x00007ff8f06628b0 L"Hair.CoverageTexture" State=Num=1, Max=1 MergeState=...} TArray<FRDGPass::FTextureState,TRDGArrayAllocator<0>>::ElementType
+ [1] {Texture=0x0000095f1b36fa40 0x00007ff8f0656230 L"Hair.VisibilityCompactNodeIndex" State=Num=1, Max=1 ...} TArray<FRDGPass::FTextureState,TRDGArrayAllocator<0>>::ElementType
+ [2] {Texture=0x0000095f1b36abf0 0x00007ff8f0664ea0 L"Hair.HairOnlyDepthTexture" State=Num=2, Max=2 MergeState=...} TArray<FRDGPass::FTextureState,TRDGArrayAllocator<0>>::ElementType
+ [Raw View] {AllocatorInstance={Data=0x0000095ea5a5db20 {Texture=0x0000095f1b36fbc0 {...} State={...} MergeState=...} } ...} TArray<FRDGPass::FTextureState,TRDGArrayAllocator<0>>

Callstack:

> UnrealEditor-D3D12RHI.dll!FD3D12DynamicRHI::GetResourceDesc(const FRHITextureDesc & TextureDesc) Line 529 C++
  UnrealEditor-D3D12RHI.dll!FD3D12TransientResourceHeapAllocator::CreateTexture(const FRHITextureDesc & InCreateInfo, const wchar_t * InDebugName, unsigned int InPassIndex) Line 156 C++
  UnrealEditor-RenderCore.dll!FRDGBuilder::BeginResourceRHI(TRDGHandle<FRDGPass,unsigned short> PassHandle, FRDGTexture * Texture) Line 3579 C++
  UnrealEditor-RenderCore.dll!FRDGBuilder::BeginResourcesRHI(FRDGPass * ResourcePass, TRDGHandle<FRDGPass,unsigned short> ExecutePassHandle) Line 2948 C++
  UnrealEditor-RenderCore.dll!FRDGBuilder::Execute() Line 1817 C++
  UnrealEditor-Renderer.dll!RenderViewFamilies_RenderThread(FRHICommandListImmediate & RHICmdList, const TArray<FSceneRenderer *,TSizedDefaultAllocator<32>> & SceneRenderers) Line 4578 C++
  UnrealEditor-Renderer.dll!FRendererModule::BeginRenderingViewFamilies::__l87::<lambda_3>::operator()(FRHICommandListImmediate & RHICmdList) Line 4848 C++
  UnrealEditor-Renderer.dll!TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamilies'::`87'::FDrawSceneCommandName,`FRendererModule::BeginRenderingViewFamilies'::`87'::<lambda_3>>::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 209 C++
  UnrealEditor-Renderer.dll!TGraphTask<TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamilies'::`87'::FDrawSceneCommandName,`FRendererModule::BeginRenderingViewFamilies'::`87'::<lambda_3>>>::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & NewTasks, ENamedThreads::Type CurrentThread, bool bDeleteOnCompletion) Line 1265 C++
  [Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> & CurrentThread, ENamedThreads::Type) Line 866 C++
  UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 758 C++
  UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 649 C++
  UnrealEditor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 411 C++
  UnrealEditor-RenderCore.dll!FRenderingThread::Run() Line 564 C++
  UnrealEditor-Core.dll!FRunnableThreadWin::Run() Line 149 C++
  UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() Line 71 C++
  [External Code]

 

wang_hailong1977
Honored Guest

Same Issue 

UE5.3.2 & UE5.2    Meta XR plugin 57~63     Metahuman Hair (Groom, Strands)   

VR Preview Mode  & Preview Platform  PC  D3D(11,12) SM6(5)

Source code : TexCreate_RenderTargetable   not  included int TextureDesc.Flags 

check(!EnumHasAnyFlags(TextureDesc.Flags, TexCreate_RenderTargetable | TexCreate_ResolveTargetable))

 

My temp Solution(Metahuman looks very ugly but no crash):

Preview Platform  Android Vulkan Mobile + "Android Icon" Must be checked!(Green, it's beside the "Preview Button when you changed Platform Preview to Android Vulkan Mobile")

Some Hair maybe lost and Metahuman creator online, when you choose always use hair card

If you're using Cesium Plugin for Unreal,  the "Cesium Sky Component" may cause VR Preview crash too!!

Use UE VR template sample project  "sky"

Meta XR 63 Version:   Disable  openXR  plugin and all it's related eye, hand plugins, offical site saied they are not compatable

F*king  crashing problem tortured me for many days! F*k it!

 

sentinelav
Honored Guest

I had this issue too and just managed to solve it. I had the MetaHumans folder placed within a subfolder, and not inside the /Content directory. After moving all MetaHuman assets back to the default directory, it started working again. Something about the referencing must be absolute.