MetaHuman crashing when bringing into project

Everytime I try to bring a MetaHuman from the content browser to the level I get a crash with the error:

Assertion failed: WriteDescriptors[DescriptorIndex].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER || WriteDescriptors[DescriptorIndex].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC [File:Runtime/VulkanRHI/Private/VulkanDescriptorSets.h] [Line: 1014] DescriptorType mismatch at index 8: called WriteBuffer<VK_DESCRIPTOR_TYPE_STORAGE_BUFFER> and was expecting VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.

libUnrealEditor-VulkanRHI.so!bool FVulkanDescriptorSetWriter::WriteBuffer<(VkDescriptorType)7>(unsigned int, VulkanRHI::FVulkanAllocation const&, unsigned long, unsigned long, unsigned int) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/VulkanRHI/Private/VulkanDescriptorSets.h:1012]
libUnrealEditor-VulkanRHI.so!FVulkanCommonPipelineDescriptorState::SetStorageBuffer(unsigned char, unsigned int, FVulkanResourceMultiBuffer const*) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/VulkanRHI/Private/VulkanPipelineState.h:67]
libUnrealEditor-VulkanRHI.so!FVulkanCommandListContext::RHISetUAVParameter(FRHIComputeShader*, unsigned int, FRHIUnorderedAccessView*) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/VulkanRHI/Private/VulkanCommands.cpp:187]
libUnrealEditor-VulkanRHI.so!void UE::RHICore::RHISetShaderParametersShared<FVulkanCommandListContext, FRHIComputeShader>(FVulkanCommandListContext&, FRHIComputeShader*, TArrayView<unsigned char const, int>, TArrayView<FRHIShaderParameter const, int>, TArrayView<FRHIShaderParameterResource const, int>, TArrayView<FRHIShaderParameterResource const, int>, bool) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/RHICore/Internal/RHIShaderParametersShared.h:84]
libUnrealEditor-VulkanRHI.so!FVulkanCommandListContext::RHISetShaderParameters(FRHIComputeShader*, TArrayView<unsigned char const, int>, TArrayView<FRHIShaderParameter const, int>, TArrayView<FRHIShaderParameterResource const, int>, TArrayView<FRHIShaderParameterResource const, int>) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/VulkanRHI/Private/VulkanCommands.cpp:317]
libUnrealEditor-RHI.so!FRHICommandSetShaderParameters::Execute(FRHICommandListBase&) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/RHI/Public/RHICommandListCommandExecutes.inl:110]
libUnrealEditor-Engine.so!FRHICommand<FRHICommandSetShaderParameters, FRHICommandSetShaderParametersString1234>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/RHI/Public/RHICommandList.h:1105]
libUnrealEditor-RHI.so!FRHICommandListBase::Execute(TRHIPipelineArray<IRHIComputeContext*>&, FRHICommandListBase::FPersistentState::FGPUStats*) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/RHI/Private/RHICommandList.cpp:592]
libUnrealEditor-RHI.so!TRHILambdaCommand<FRHICommandListImmediate, FRHICommandListImmediate::QueueAsyncCommandListSubmit(TArrayView<FRHICommandListImmediate::FQueuedCommandList, int>, FRHICommandListImmediate::ETranslatePriority, int)::$_124>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/RHI/Public/RHICommandList.h:457]
libUnrealEditor-RHI.so!FRHICommandListBase::Execute(TRHIPipelineArray<IRHIComputeContext*>&, FRHICommandListBase::FPersistentState::FGPUStats*) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/RHI/Private/RHICommandList.cpp:592]
libUnrealEditor-RHI.so!UE::Core::Private::Function::TFunctionRefCaller<FRHICommandListImmediate::ExecuteAndReset()::$_125, void ()>::Call(void*) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/Core/Public/Templates/Function.h:474]
libUnrealEditor-Core.so!TGraphTask<TFunctionGraphTaskImpl<void (), (ESubsequentsMode::Type)0> >::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type, bool) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:1310]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksNamedThread(int, bool) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:758]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksUntilQuit(int) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:648]
libUnrealEditor-Core.so!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:2069]
libUnrealEditor-RenderCore.so!FRHIThread::Run() [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/RenderCore/Private/RenderingThread.cpp:333]
libUnrealEditor-Core.so!FRunnableThreadPThread::Run() [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
libUnrealEditor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:187]
libc.so.6!UnknownFunction(0x9f801)

System is Rocky Linux 9 with Nvidia RTX 3060…

anyone seen this error?

I also saw the same error for ubuntu 22.04,

LoginId:c06d5ba8184f4776b25cb869cb1da34f-000003e8
EpicAccountId:

Assertion failed: WriteDescriptors[DescriptorIndex].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER || WriteDescriptors[DescriptorIndex].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC [File:Runtime/VulkanRHI/Private/VulkanDescriptorSets.h] [Line: 1014] DescriptorType mismatch at index 8: called WriteBuffer<VK_DESCRIPTOR_TYPE_STORAGE_BUFFER> and was expecting VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.

libUnrealEditor-VulkanRHI.so!bool FVulkanDescriptorSetWriter::WriteBuffer<(VkDescriptorType)7>(unsigned int, VulkanRHI::FVulkanAllocation const&, unsigned long, unsigned long, unsigned int) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/VulkanRHI/Private/VulkanDescriptorSets.h:1012]
libUnrealEditor-VulkanRHI.so!FVulkanCommonPipelineDescriptorState::SetStorageBuffer(unsigned char, unsigned int, FVulkanResourceMultiBuffer const*) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/VulkanRHI/Private/VulkanPipelineState.h:67]
libUnrealEditor-VulkanRHI.so!FVulkanCommandListContext::RHISetUAVParameter(FRHIComputeShader*, unsigned int, FRHIUnorderedAccessView*) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/VulkanRHI/Private/VulkanCommands.cpp:187]
libUnrealEditor-VulkanRHI.so!void UE::RHICore::RHISetShaderParametersShared<FVulkanCommandListContext, FRHIComputeShader>(FVulkanCommandListContext&, FRHIComputeShader*, TArrayView<unsigned char const, int>, TArrayView<FRHIShaderParameter const, int>, TArrayView<FRHIShaderParameterResource const, int>, TArrayView<FRHIShaderParameterResource const, int>, bool) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/RHICore/Internal/RHIShaderParametersShared.h:84]
libUnrealEditor-VulkanRHI.so!FVulkanCommandListContext::RHISetShaderParameters(FRHIComputeShader*, TArrayView<unsigned char const, int>, TArrayView<FRHIShaderParameter const, int>, TArrayView<FRHIShaderParameterResource const, int>, TArrayView<FRHIShaderParameterResource const, int>) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/VulkanRHI/Private/VulkanCommands.cpp:317]
libUnrealEditor-RHI.so!FRHICommandSetShaderParameters::Execute(FRHICommandListBase&) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/RHI/Public/RHICommandListCommandExecutes.inl:110]
libUnrealEditor-Engine.so!FRHICommand<FRHICommandSetShaderParameters, FRHICommandSetShaderParametersString1234>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/RHI/Public/RHICommandList.h:1105]
libUnrealEditor-RHI.so!FRHICommandListBase::Execute(TRHIPipelineArray<IRHIComputeContext*>&, FRHICommandListBase::FPersistentState::FGPUStats*) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/RHI/Private/RHICommandList.cpp:592]
libUnrealEditor-RHI.so!TRHILambdaCommand<FRHICommandListImmediate, FRHICommandListImmediate::QueueAsyncCommandListSubmit(TArrayView<FRHICommandListImmediate::FQueuedCommandList, int>, FRHICommandListImmediate::ETranslatePriority, int)::$_124>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/RHI/Public/RHICommandList.h:457]
libUnrealEditor-RHI.so!FRHICommandListBase::Execute(TRHIPipelineArray<IRHIComputeContext*>&, FRHICommandListBase::FPersistentState::FGPUStats*) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/RHI/Private/RHICommandList.cpp:592]
libUnrealEditor-RHI.so!UE::Core::Private::Function::TFunctionRefCaller<FRHICommandListImmediate::ExecuteAndReset()::$_125, void ()>::Call(void*) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/Core/Public/Templates/Function.h:474]
libUnrealEditor-Core.so!TGraphTask<TFunctionGraphTaskImpl<void (), (ESubsequentsMode::Type)0> >::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type, bool) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:1310]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksNamedThread(int, bool) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:758]
libUnrealEditor-Core.so!FNamedTaskThread::ProcessTasksUntilQuit(int) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:648]
libUnrealEditor-Core.so!FTaskGraphCompatibilityImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/Async/TaskGraph.cpp:2069]
libUnrealEditor-RenderCore.so!FRHIThread::Run() [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/RenderCore/Private/RenderingThread.cpp:333]
libUnrealEditor-Core.so!FRunnableThreadPThread::Run() [/mnt/horde/++UE5/Sync/Engine/Source/./Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
libUnrealEditor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/mnt/horde/++UE5/Sync/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:187]
libc.so.6!UnknownFunction(0x94b42)
libc.so.6!UnknownFunction(0x1269ff)

System has Ubuntu 22.04 and RTX 2080 ti 11Gb.

Same here, running Windows 10 (22H2). Nvidia RTX 2070

I don’t like to make comments that just say “same”, but I’m at a loss here - I’ve never had to diagnose an error with Vulkan before. My searches for this exact error bring me to this thread every time. So I figure more data points can’t hurt.

Error reads:

Assertion failed: WriteDescriptors[DescriptorIndex].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER || WriteDescriptors[DescriptorIndex].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC [File:D:\build\++UE5\Sync\Engine\Source\Runtime\VulkanRHI\Private\VulkanDescriptorSets.h] [Line: 1009] 
DescriptorType mismatch at index 8: called WriteBuffer<VK_DESCRIPTOR_TYPE_STORAGE_BUFFER> and was expecting VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER.

“Breadcrumb” file included with the crash log:
Breadcrumbs_RHIThread_1.txt (106 Bytes)

I’m grasping at straws here but to my inexperienced eye, it looks like maybe the renderer is having trouble with hair strands?

I’ve tried re-reading the MetaHuman documentation just to make sure everything was installed or configured correctly, and as far as I can tell it should be solid.

And finally I’ll leave some guesses. Maybe MetaHuman (or a part of it) is incompatible with the Vulkan renderer? Or maybe Vulkan in combination with an Nvidia RTX card is the problem? It’s hard to say with this sample size, but 100% of the reports in this thread at this time have that combo in common.

To add to the info - I switched from Rocky Linux to Windows 11 and I’m no longer having any trouble with MetaHumans… so the tally now is Linux/Windows 10 + RTX = vulcan issue.

Getting this crash on UE 5.2, Windows 10, RTX 2060, Vulkan.

Switching to DX12 fixes it.

Vulkan Crashes When Trying To Play Game In Editor - #5 by poole712 appears to be the same issue, and offers an explanation.

I’ve spent the past week looking into this, sorry I didn’t update sooner.

@PurpleWaveJadien brought something important to my attention. Some of us didn’t declare which engine version we’re using, myself included! I’m on 5.3.1, and this version supports Vulkan+SM6. As PurpleWaveJadien said, switching to DX12 does seem to resolve the issue. But I would really like to use Vulkan, so I found a workaround. See TLDR if uninterested in long posts.

Here’s what I found:
Breadcrumbs from the crash show a context “HairInterpolation(Strands)”. This context is only set in HairStrandsInterpolation.cpp. That file is part of HairStrands (aka Groom). In other threads, I did see people reporting problems with hairless MetaHumans, and it was because they had disabled Grooms on their MetaHumans as a remedy for some crash or another. That would suggest some kind of misconfiguration or corruption in the Groom assets, or maybe some issue with the Groom source itself. I wasn’t able to locate a problem that would lead to this in Groom’s source though.

Then I took a look at VulkanRHI. In VulkanPipelineState.cpp, a switch is checking UAV->GetViewType() which returns a StructuredBuffer. If we are to assume the error message is correct and true, UAV->GetViewType() should return a TypedBuffer. The disparity sets in motion the mismatch later in the stack. That’s as far as I could get on that front; I have no idea how to track down what’s causing something like that yet.

Out of curiosity, I started opening Groom files in a test project. Some Grooms opened with no issue. But there were two archetypes that threw the same DescriptorType mismatch as when dragging a MetaHuman into a level: Eyebrows and Eyelashes. I noticed an option was checked in the problem Grooms that was not present on any of the Grooms that opened without crashing. The option was “Use Hair Raytracing Geometry”. I switched to DX12, disabled that option on every Groom asset I could find, switched back to Vulkan and it’s good to go!

For some bonus reading, nvidia forums had a thread regarding Groom. They don’t discuss much but the OP does provide a log file later in the discussion showing a stack trace similar to the one I was seeing with our issue here. This is what got me to try opening the Groom files. Although, while I am using an RTX card, I’m not using the Unreal/NvRTX branch, so this may just be coincidence.

TLDR; Temporarily switch to DX12. For each Groom asset, open it and navigate to Strands configuration and disable the option “Use Hair Raytracing Geometry”. The problem assets will likely be labeled as eyebrows and eyelashes. Once done with all of them, switch back to Vulkan. You should now be able to use MetaHumans and their Grooms.

As I wrap up this post, I realize it might have been less work to use the Property Matrix to edit all those Grooms without having to switch between DX12 and Vulkan. Unsure if it would still crash.

2 Likes