Material Parameter Collection crashes material editor with Mac

Our project is instantly crashing with 4.11(and with 4.12.2 preview) on Mac if I try to use Material editor with materials that use Material Parameter Collection in anyway.
Simply way to reprocude this bug is to create new Blank project. Create new MPC. Add single scalar value there. Create and set new material to some mesh. Go to new material, add MPC node. Select that scalar value and plug that to emissive. When material compiles engine will crash.

> MachineId:CDC553C24341D3024DED54BD7A17CF7A
EpicAccountId:984f0b9e5d7a4c36ac89389a72cba8ee

 SEGV_MAPERR at 0x20

FMetalRHICommandContext::RHISetShaderUniformBuffer(FRHIPixelShader, unsigned int, FRHIUniformBuffer) Address = 0x13f2f955c [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Apple/MetalRHI/Private/MetalCommands.cpp, line 384] [in UE4Editor-MetalRHI.dylib]
void FMaterialShader::SetParameters(FRHICommandList&, FRHIPixelShader, FMaterialRenderProxy const, FMaterial const&, FSceneView const&, bool, ESceneRenderTargetsMode::Type, bool) Address = 0x117a2bdb0 [Runtime/RHI/Public/RHICommandList.h, line 1438] [in UE4Editor-Renderer.dylib]
TBasePassPixelShaderPolicyParamType::SetParameters(FRHICommandList&, FMaterialRenderProxy const, FMaterial const&, FViewInfo const, EBlendMode, bool, ESceneRenderTargetsMode::Type, float) Address = 0x1174ba6ae [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Renderer/Private/BasePassRendering.h, line 501] [in UE4Editor-Renderer.dylib]
TBasePassDrawingPolicy::SetSharedState(FRHICommandList&, FViewInfo const*, FMeshDrawingPolicy::ContextDataType, float) const Address = 0x1174b99d6 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Renderer/Private/BasePassRendering.h, line 806] [in UE4Editor-Renderer.dylib]
void FDrawBasePassDynamicMeshAction::Process(FRHICommandList&, FProcessBasePassMeshParameters const&, FUniformLightMapPolicy const&, FUniformLightMapPolicy::ElementDataType const&) const Address = 0x1174b54c0 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Renderer/Private/BasePassRendering.cpp, line 396] [in UE4Editor-Renderer.dylib]
void ProcessBasePassMesh(FRHICommandList&, FProcessBasePassMeshParameters const&, FDrawBasePassDynamicMeshAction const&) Address = 0x117463aff [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Renderer/Private/BasePassRendering.h, line 1235] [in UE4Editor-Renderer.dylib]
FBasePassOpaqueDrawingPolicyFactory::DrawDynamicMesh(FRHICommandList&, FViewInfo const&, FBasePassOpaqueDrawingPolicyFactory::ContextType, FMeshBatch const&, bool, bool, FPrimitiveSceneProxy const*, FHitProxyId, bool) Address = 0x11741380f [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Renderer/Private/BasePassRendering.cpp, line 453] [in UE4Editor-Renderer.dylib]
FRendererModule::DrawTileMesh(FRHICommandListImmediate&, FSceneView const&, FMeshBatch const&, bool, FHitProxyId const&) Address = 0x1178fb45b [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Renderer/Private/Renderer.cpp, line 83] [in UE4Editor-Renderer.dylib]
FTileRenderer::DrawTile(FRHICommandListImmediate&, FSceneView const&, FMaterialRenderProxy const*, bool, float, float, float, float, float, float, float, float, bool, FHitProxyId, FColor) Address = 0x10c114360 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Engine/Private/TileRendering.cpp, line 177] [in UE4Editor-Engine.dylib]
FCanvasTileRendererItem::Render_RenderThread(FRHICommandListImmediate&, FCanvas const*) Address = 0x10c115019 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Engine/Private/TileRendering.cpp, line 244] [in UE4Editor-Engine.dylib]
FCanvas::Flush_RenderThread(FRHICommandListImmediate&, bool) Address = 0x10c23d612 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Engine/Private/UserInterface/Canvas.cpp, line 681] [in UE4Editor-Engine.dylib]
FPreviewElement::DrawRenderThread(FRHICommandListImmediate&, void const*) Address = 0x11bcaf667 (filename not found) [in UE4Editor-GraphEditor.dylib]
FSlateRHIRenderingPolicy::DrawElements(FRHICommandListImmediate&, FSlateBackBuffer&, FMatrix const&, TArray const&, bool) Address = 0x12c4ee7f7 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/SlateRHIRenderer/Private/SlateRHIRenderingPolicy.cpp, line 648] [in UE4Editor-SlateRHIRenderer.dylib]
FSlateRHIRenderer::DrawWindow_RenderThread(FRHICommandListImmediate&, FSlateRHIRenderer::FViewportInfo const&, FSlateWindowElementList&, bool, bool) Address = 0x12c4d4a5b [Runtime/Engine/Public/UnrealClient.h, line 32] [in UE4Editor-SlateRHIRenderer.dylib]
TGraphTask::ExecuteTask(TArray&, ENamedThreads::Type) Address = 0x12c505877 [Runtime/Core/Public/Stats/Stats2.h, line 1537] [in UE4Editor-SlateRHIRenderer.dylib]
FNamedTaskThread::ProcessTasksNamedThread(int, bool) Address = 0x109384c8e [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp, line 148] [in UE4Editor-Core.dylib]
FNamedTaskThread::ProcessTasksUntilQuit(int) Address = 0x109380535 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformProcess.cpp, line 498] [in UE4Editor-Core.dylib]
FTaskGraphImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) Address = 0x10937d290 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp, line 1487] [in UE4Editor-Core.dylib]
RenderingThreadMain(FEvent*) Address = 0x10f9b4a88 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp, line 310] [in UE4Editor-RenderCore.dylib]
FRenderingThread::Run() Address = 0x10f9ca0ad [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp, line 436] [in UE4Editor-RenderCore.dylib]
FRunnableThreadPThread::Run() Address = 0x1093cdad8 [/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.cpp, line 26] [in UE4Editor-Core.dylib]
FRunnableThreadPThread::_ThreadProc(void*) Address = 0x109393cee [Runtime/Core/Private/GenericPlatform/../HAL/PThreadRunnableThread.h, line 168] [in UE4Editor-Core.dylib]
_pthread_body Address = 0x7fff9b21f99d (filename not found) [in libsystem_pthread.dylib]
_pthread_body Address = 0x7fff9b21f91a (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7fff9b21d351 (filename not found) [in libsystem_pthread.dylib]

This will take time to fix as it isn’t a bug within the MetalRHI itself. The high-level code isn’t providing a uniform buffer for the new material parameter collection - older APIs like D3D & GL permitted unbound resource access but for Metal & other new APIs this is not acceptable and a uniform buffer must be provided or the GPU may crash.

Hello,

This is currently a known issue, and is entered into our system as UE-30184. Thank you for your report.

Have a great day

Is there any way to work around this? This basically prevents Our Mac and ios developing. Material that crash only on Mac and ios and it’s not fixable with Mac because editor itself crash.

ahh I also have this issue >.< anyone found a workaround yet?

Hello,

Try upgrading your project to 4.12 Preview 5. This issue has been reported as fixed in that version.

Have a great day

Awesome, I’ll give that a go!

Just had a lookie, it doesn’t crash with 4.12! :slight_smile:

4.12 Preview 5 fixed this. Still having some Shader compiler errors.
Can’t figure exact cause but it’s related to materials. Engine crash when compiling shaders and won’t start again. This is on with AMD card.

As far as your new crash goes, please open up a new Answerhub post so we can investigate it separately.

Thank you