Description

Encountered a Metal crash when painting Foliage on Mac.
I'm unable to reproduce anything similar on Windows.

This crash can occur if the user drags a Static Mesh into the Foliage Panel or uses an existing Foliage Asset.
Tested with several large Static Mesh surfaces - painted foliage still causes a crash with the same callstack. The Landscape is not necessary, though it is the easiest repro.

I cannot reproduce this issue in the current 4.16.3 Binary (CL 3564957); as such, this issue is marked as a regression.

Steps to Reproduce
  1. Create a new Landscape
  2. Enter Foliage Mode
  3. Add a Static Mesh to the Foliage Panel
  4. Paint until the mesh count in the Foliage Panel reaches ~300 meshes

Result:
Editor crashes with a callstack referencing Metal RHI

Expected Result:
Foliage is painted without errors, warnings, or crashes

Callstack
LoginId:d64dd6d91d4a574674d0509c5dcc5799
EpicAccountId:e125cca40a8c44d0a2f55393fda65e3d

 SEGV_MAPERR at 0x3

FGenericPlatformMisc::RaiseException(unsigned int) Address = 0x102979dcb (filename not found) [in UE4Editor-Core.dylib]
FMacErrorOutputDevice::Serialize(wchar_t const*, ELogVerbosity::Type, FName const&) Address = 0x104314179 (filename not found) [in UE4Editor-ApplicationCore.dylib]
FOutputDevice::Logf(wchar_t const*, ...) Address = 0x102c27cfd (filename not found) [in UE4Editor-Core.dylib]
FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, ...) Address = 0x102b9e31b (filename not found) [in UE4Editor-Core.dylib]
FMetalDynamicRHI::RHICreateVertexBuffer(unsigned int, unsigned int, FRHIResourceCreateInfo&) Address = 0x128dd9bca (filename not found) [in UE4Editor-MetalRHI.dylib]
FMetalDynamicRHI::CreateVertexBuffer_RenderThread(FRHICommandListImmediate&, unsigned int, unsigned int, FRHIResourceCreateInfo&) Address = 0x128dd9f51 (filename not found) [in UE4Editor-MetalRHI.dylib]
FStaticMeshInstanceBuffer::InitRHI() Address = 0x10746535a (filename not found) [in UE4Editor-Engine.dylib]
FRenderResource::UpdateRHI() Address = 0x103f80684 (filename not found) [in UE4Editor-RenderCore.dylib]
FStaticMeshInstanceBuffer::UpdateRHIVertexBuffer(int, unsigned int, unsigned int) Address = 0x107465a34 (filename not found) [in UE4Editor-Engine.dylib]
FStaticMeshInstanceBuffer::UpdateRHIVertexBuffer(TSet<int, DefaultKeyFuncs<int, false>, FDefaultSetAllocator> const&) Address = 0x1074658a3 (filename not found) [in UE4Editor-Engine.dylib]
TGraphTask<FInstancedStaticMeshRenderData::UpdatePerInstanceRenderData(TSet<int, DefaultKeyFuncs<int, false>, FDefaultSetAllocator> const&)::EURCMacro_FPerInstanceRenderDataBufferUpdate>::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) Address = 0x107492d0c (filename not found) [in UE4Editor-Engine.dylib]
FNamedTaskThread::ProcessTasksNamedThread(int, bool) Address = 0x10299633c (filename not found) [in UE4Editor-Core.dylib]
FNamedTaskThread::ProcessTasksUntilQuit(int) Address = 0x1029953e8 (filename not found) [in UE4Editor-Core.dylib]
FTaskGraphImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) Address = 0x1029914ce (filename not found) [in UE4Editor-Core.dylib]
RenderingThreadMain(FEvent*) Address = 0x103f792a1 (filename not found) [in UE4Editor-RenderCore.dylib]
FRenderingThread::Run() Address = 0x103f8dd17 (filename not found) [in UE4Editor-RenderCore.dylib]
FRunnableThreadPThread::Run() Address = 0x102a0a69e (filename not found) [in UE4Editor-Core.dylib]
FRunnableThreadPThread::_ThreadProc(void*) Address = 0x1029b53e7 (filename not found) [in UE4Editor-Core.dylib]
_pthread_body Address = 0x7fffbc2de93b (filename not found) [in libsystem_pthread.dylib]
_pthread_body Address = 0x7fffbc2de887 (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7fffbc2de08d (filename not found) [in libsystem_pthread.dylib]

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-50744 in the post.

2
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions4.17.24.184.19
Target Fix4.20
Fix Commit4003226
Main Commit4052378
Release Commit4095966
CreatedOct 4, 2017
ResolvedApr 13, 2018
UpdatedMay 31, 2018
View Jira Issue