Crash attempting to view a groom asset using rigged guides in the character BP viewport

This is on vanilla 5.7.4 editor binaries.

This crash occurs when attempting to view a groom asset using rigged guides in the character BP viewport only, and only on cold opening the BP. If the groom is first rendered in the world (by means of it being in sequence, but maybe anytime in world), the BP viewport rendering works fine. Only on the cold opening the BP does it crash.

The groom is using autogenerated rigged guides SK with no manual changes made within the skeletal mesh asset. However, a transparent material is added to the mesh in the BP defaults. When this is removed, it works ok-- no crash. But I have also tried opaque material with extreme WPO to essentially hide it, which also results in the crash. Opening the skeletal mesh prior to the BP also seems to prevent the crash.

From what I can tell, the SK mesh must be rendered at some point within the editor session before the groom it is driving will render in the BP viewport without crashing or the groom must be rendered in world first.

[Attachment Removed]

I thought I included the callstack but maybe not?

Here is the callstack:

> KERNELBASE.dll!00007ff9955b5369() Unknown

UnrealEditor-Core.dll!ReportAssert(const wchar_t * ErrorMessage, void * ProgramCounter) Line 1954 C++

UnrealEditor-Core.dll!FWindowsErrorOutputDevice::Serialize(const wchar_t * Msg, ELogVerbosity::Type Verbosity, const FName & Category) Line 85 C++

[Inline Frame] UnrealEditor-Core.dll!FOutputDevice::LogfImpl::__l3::<lambda_1>::operator()(wchar_t *) Line 81 C++

[Inline Frame] UnrealEditor-Core.dll!GrowableLogfV(const wchar_t * Fmt, char *) Line 47 C++

UnrealEditor-Core.dll!FOutputDevice::LogfImpl(const wchar_t * Fmt, …) Line 81 C++

[Inline Frame] UnrealEditor-Core.dll!FOutputDevice::Logf(const wchar_t[49] &) Line 246 C++

UnrealEditor-Core.dll!AssertFailedImplV(const char * Expr, const char * File, int Line, void * ProgramCounter, const wchar_t * Format, char * Args) Line 175 C++

UnrealEditor-Core.dll!FDebug::CheckVerifyFailedImpl2V(const char * Expr, const char * File, int Line, const wchar_t * Format, char * Args) Line 722 C++

UnrealEditor-Core.dll!FDebug::CheckVerifyFailedImpl2(const char * Expr, const char * File, int Line, const wchar_t * Format, …) Line 745 C++

[Inline Frame] UnrealEditor-Engine.dll!TArray<TUniquePtr<FGPUBaseSkinVertexFactory,TDefaultDelete<FGPUBaseSkinVertexFactory>>,TSizedDefaultAllocator<32>>::RangeCheck(int) Line 1095 C++

[Inline Frame] UnrealEditor-Engine.dll!TArray<TUniquePtr<FGPUBaseSkinVertexFactory,TDefaultDelete<FGPUBaseSkinVertexFactory>>,TSizedDefaultAllocator<32>>::operator[](int) Line 1173 C++

[Inline Frame] UnrealEditor-Engine.dll!TArray<TUniquePtr<FGPUBaseSkinVertexFactory,TDefaultDelete<FGPUBaseSkinVertexFactory>>,TSizedDefaultAllocator<32>>::operator[](int) Line 1186 C++

UnrealEditor-Engine.dll!FSkeletalMeshObjectGPUSkin::GetBaseSkinVertexFactory(int LODIndex, int ChunkIdx) Line 1951 C++

UnrealEditor-Engine.dll!FSkeletalMeshDeformerHelpers::GetBoneBufferForReading(const FSkeletalMeshObject * InMeshObject, int InLodIndex, int InSectionIndex, bool bInPreviousFrame) Line 23 C++

UnrealEditor-HairStrandsCore.dll!RunHairStrandsDeformation_Guide(FRDGBuilder & GraphBuilder, FSceneInterface * Scene, const FSceneView * View, const unsigned int ViewUniqueID, const TArray<FHairStrandsInstance *,TSizedDefaultAllocator<32>> & Instances, const FShaderPrintData * ShaderPrintData, FHairTransientResources & TransientResources, FGlobalShaderMap * ShaderMap) Line 1115 C++

UnrealEditor-HairStrandsCore.dll!ProcessHairStrandsBookmark(FRDGBuilder * GraphBuilder, EHairStrandsBookmark Bookmark, FHairStrandsBookmarkParameters & Parameters) Line 3369 C++

UnrealEditor-Renderer.dll!FSceneRenderer::PreVisibilityFrameSetup(FRDGBuilder & GraphBuilder) Line 5027 C++

[Inline Frame] UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::PreVisibilityFrameSetup(FRDGBuilder &) Line 5845 C++

UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::BeginInitViews(FRDGBuilder & GraphBuilder, const FSceneTexturesConfig & SceneTexturesConfig, FInstanceCullingManager & InstanceCullingManager, FRDGExternalAccessQueue & ExternalAccessQueue, FDeferredShadingSceneRenderer::FInitViewTaskDatas & TaskDatas) Line 5871 C++

UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRDGBuilder & GraphBuilder, const FSceneRenderUpdateInputs * SceneUpdateInputs) Line 2052 C++

UnrealEditor-Renderer.dll!RenderViewFamily_RenderThread(FRDGBuilder & GraphBuilder, FSceneRenderer * Renderer, const FSceneRenderUpdateInputs * SceneUpdateInputs) Line 4912 C++

[Inline Frame] UnrealEditor-Renderer.dll!FRendererModule::BeginRenderingViewFamilies::__l116::<lambda_4>::operator()(FRDGBuilder &) Line 5207 C++

UnrealEditor-Renderer.dll!`FRendererModule::BeginRenderingViewFamilies’::`116’::<lambda_4>::<lambda_invoker_cdecl>(FRDGBuilder & GraphBuilder, const FSceneRenderFunctionInputs & Inputs) Line 5209 C++

[Inline Frame] UnrealEditor-Renderer.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,bool __cdecl(FRDGBuilder &,FSceneRenderFunctionInputs const &)>::operator()(FRDGBuilder &) Line 414 C++

UnrealEditor-Renderer.dll!FSceneRenderProcessor::Execute::__l30::<lambda_4>::operator()(FRHICommandListImmediate & RHICmdList) Line 894 C++

UnrealEditor-RenderCore.dll!ExecuteCommand(FRHICommandList * RHICmdList, const TVariant<TUniqueFunction<void __cdecl(void)>,TUniqueFunction<void __cdecl(FRHICommandList &)>,TUniqueFunction<void __cdecl(FRHICommandListImmediate &)>> & Function, const FRenderCommandTag & Tag) Line 1540 C++

[Inline Frame] UnrealEditor-RenderCore.dll!FRenderThreadCommandPipe::ExecuteCommands::__l2::<lambda_1>::operator()(TVariant<TUniqueFunction<void __cdecl(void)>,TUniqueFunction<void __cdecl(FRHICommandList &)>,TUniqueFunction<void __cdecl(FRHICommandListImmediate &)>> &&) Line 1937 C++

UnrealEditor-RenderCore.dll!UE::RenderCommandPipe::FCommandList::ConsumeCommands<`FRenderThreadCommandPipe::ExecuteCommands’::`2’::<lambda_1>>(const FRenderThreadCommandPipe::ExecuteCommands::__l2::<lambda_1> & Lambda) Line 431 C++

[Inline Frame] UnrealEditor-RenderCore.dll!FRenderThreadCommandPipe::ExecuteCommands(UE::RenderCommandPipe::FCommandList &) Line 1935 C++

UnrealEditor-RenderCore.dll!FRenderThreadCommandPipe::EnqueueAndLaunch::__l5::<lambda_1>::operator()() Line 1924 C++

[Inline Frame] UnrealEditor-RenderCore.dll!UE::Core::Private::Function::TFunctionRefBase<UE::Core::Private::Function::TFunctionStorage<1>,void __cdecl(void)>::operator()() Line 414 C++

[Inline Frame] UnrealEditor-RenderCore.dll!TFunctionGraphTaskImpl<void __cdecl(void),1>::DoTaskImpl(TUniqueFunction<void __cdecl(void)> &) Line 1101 C++

[Inline Frame] UnrealEditor-RenderCore.dll!TFunctionGraphTaskImpl<void __cdecl(void),1>::DoTask(ENamedThreads::Type) Line 1094 C++

UnrealEditor-RenderCore.dll!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),1>>::ExecuteTask() Line 696 C++

UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() Line 518 C++

[Inline Frame] UnrealEditor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32>> &) Line 495 C++

UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 791 C++

UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 680 C++

UnrealEditor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 260 C++

UnrealEditor-RenderCore.dll!FRenderingThread::Run() Line 393 C++

UnrealEditor-Core.dll!FRunnableThreadWin::Run() Line 159 C++

UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() Line 79 C++

[External Code]

[Attachment Removed]

Hi!

Thank you for reportting!

This is the first time we heard about that. Would it be possible to share a small repro project so that we can investigate it on our side?

Thank you!

/Charles.

[Attachment Removed]

Ok let me ask the content team if they can get some kind of a small repro project put together that can repro, i’ll let you know! Thanks.

[Attachment Removed]

Great! Thank you :slight_smile:

[Attachment Removed]

Ok I hope this can help… The content artist has forwarded a standalone project with some more details:

--

I can’t get the repro on BP viewport crash in the new project. I think maybe corrupt DDC somehow. Launching cinematic project with ddc=Cold seems to have solved issue for that launch only. Previously I think I tried ddc=NoShared which is why I didn’t think that was the problem.

As to how my ddc could have potentially been corrupt:

I am really pretty certain it has to do with the empty skeletal mesh that is created on rebuild of groom asset using rigged guides. That portion is easy to reproduce. Just rebuild the groom, click on the skeletal mesh it regenerates, and I get crash ‘A’.

Then I am able to produce the same callstack crash as I was hitting in the BP viewport by assigning the autogenerated skeletal mesh to a binding asset for the groom, which is crash 'B".

Repro for crash A would be:

1) Right-click context menu click rebuild on /Game/MetaHumans/Test_MHC/Grooms/GroomAsset_0.GroomAsset_0

2) Try to open autogenerated GroomAsset_0_SkeletalMesh

3) crash

Repro for crash B would be:

1) Open /Game/MetaHumans/Test_MHC/Grooms/GroomAsset_0_GroomAsset_0_SkeletalMesh_Binding.GroomAsset_0_GroomAsset_0_SkeletalMesh_Binding

2) crash

OR

1) Create new binding from groom

2) Assign autogenerated skeletal mesh as target

3) crash

[Attachment Removed]

forgot to attach the project zip! but maybe it’s too big to attach here is a link to it:

https://drive.google.com/file/d/1\-ty3GnO\_I\_IiAmZSzneJM3UDnUJKfpdV/view?usp\=sharing

[Attachment Removed]

Hello! I reproduced your issue in our mainline.

You can fix it by changing the function RunHairStrandsDeformation_Guide() /Engine/Plugins/Runtime/HairStrands/Source/HairStrandsCore/Private/GroomManager.cpp by replacing

FSkeletalMeshLODRenderData const* LodRenderData = &SkeletalMeshObject->GetSkeletalMeshRenderData().LODRenderData[LodIndex];
if (LodRenderData->RenderSections.IsValidIndex(InstanceData.Instance->DeformedSection)) 
{
...
}

by

FSkeletalMeshLODRenderData const* LodRenderData = SkeletalMeshObject->GetSkeletalMeshRenderData().LODRenderData.IsValidIndex(LodIndex) ? &SkeletalMeshObject->GetSkeletalMeshRenderData().LODRenderData[LodIndex] : nullptr;
if (LodRenderData && LodRenderData->RenderSections.IsValidIndex(InstanceData.Instance->DeformedSection)) 
{
...
}

and in /Engine/Source/Runtime/Engine/Private/SkeletalRenderGPUSkin.cpp by replacing

FGPUBaseSkinVertexFactory const* FSkeletalMeshObjectGPUSkin::GetBaseSkinVertexFactory(int32 LODIndex, int32 ChunkIdx) const
{
	return LODs[LODIndex].GPUSkinVertexFactories.VertexFactories[ChunkIdx].Get();
}

by

FGPUBaseSkinVertexFactory const* FSkeletalMeshObjectGPUSkin::GetBaseSkinVertexFactory(int32 LODIndex, int32 ChunkIdx) const
{
	if (LODs.IsValidIndex(LODIndex) && LODs[LODIndex].GPUSkinVertexFactories.VertexFactories.IsValidIndex(ChunkIdx))
	{
		return LODs[LODIndex].GPUSkinVertexFactories.VertexFactories[ChunkIdx].Get();
	}
	return nullptr;
}

I hope this helps.

/Charles

[Attachment Removed]

awesome , thanks!

[Attachment Removed]