Description

Adding a Material Layer to a Material Instance that has a Material Function Call node connected to the Set Material Attributes node causes the editor to crash. I tested a Material Layer without the Material Function Call and there was no crash.

Tested in //UE4/Release-4.25 @ CL 14469661 and this did not occur, so marking as a Regression.

Steps to Reproduce

Quick Repro:

  1. Download the project from the following location: [Link Removed]
  2. Right-Click the M_Layer asset
  3. Select Create Material Instance
  4. Open the Material Instance asset
  5. Next to the Details panel, open the Layer Parameters panel
  6. Click the arrow next to Background to expand the settings
  7. Set the Layer Asset as ML_Test

RESULT:

The editor crashes

EXPECTED:

The user would be able to add a Material Layer with a MaterialFunctionCall to a Material Instance without error

Callstack
=== Critical error: ===

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 674] 
Array index out of bounds: 0 from an array of size 0


[Callstack] 0x00007ff876053b29 KERNELBASE.dll!UnknownFunction []
[Callstack] 0x00007ff80707d096 UE4Editor-Core.dll!ReportAssert() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformCrashContext.cpp:1627]
[Callstack] 0x00007ff8070807f8 UE4Editor-Core.dll!FWindowsErrorOutputDevice::Serialize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsErrorOutputDevice.cpp:78]
[Callstack] 0x00007ff806d8e98d UE4Editor-Core.dll!FOutputDevice::LogfImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\OutputDevice.cpp:61]
[Callstack] 0x00007ff806d25625 UE4Editor-Core.dll!AssertFailedImplV() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
[Callstack] 0x00007ff806d276d0 UE4Editor-Core.dll!FDebug::CheckVerifyFailedImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
[Callstack] 0x00007ff804ef01d8 UE4Editor-Engine.dll!DispatchCheckVerify<void,<lambda_a42d0919e8303add9bf9f7b44044abc5> >() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Misc\AssertionMacros.h:165]
[Callstack] 0x00007ff803f06e0c UE4Editor-Engine.dll!FMaterialCachedExpressionData::UpdateForExpressions() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialCachedData.cpp:528]
[Callstack] 0x00007ff803e9d69d UE4Editor-Engine.dll!<lambda_3a4808425eca5b1b87ead9d0466f5a48>::operator()() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialCachedData.cpp:222]
[Callstack] 0x00007ff803ee6ef2 UE4Editor-Engine.dll!UMaterialExpressionMaterialFunctionCall::IterateDependentFunctions() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialExpressions.cpp:13255]
[Callstack] 0x00007ff803ee6fcd UE4Editor-Engine.dll!UMaterialFunction::IterateDependentFunctions() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialExpressions.cpp:12000]
[Callstack] 0x00007ff803f0857f UE4Editor-Engine.dll!FMaterialCachedExpressionData::UpdateForFunction() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialCachedData.cpp:237]
[Callstack] 0x00007ff803f08632 UE4Editor-Engine.dll!FMaterialCachedExpressionData::UpdateForLayerFunctions() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialCachedData.cpp:247]
[Callstack] 0x00007ff803f97002 UE4Editor-Engine.dll!UMaterialInstance::UpdateCachedLayerParameters() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Engine\Private\Materials\MaterialInstance.cpp:4031]
[Callstack] 0x00007ff8018c368a UE4Editor-UnrealEd.dll!UMaterialEditorInstanceConstant::RegenerateArrays() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\PreviewMaterial.cpp:978]
[Callstack] 0x00007ff8018bf9f2 UE4Editor-UnrealEd.dll!UMaterialEditorInstanceConstant::PostEditChangeProperty() [D:\Build\++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\PreviewMaterial.cpp:877]
[Callstack] 0x00007ff806684ff0 UE4Editor-CoreUObject.dll!UObject::PostEditChangeChainProperty() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Obj.cpp:454]
[Callstack] 0x00007ffffc7c6d44 UE4Editor-PropertyEditor.dll!FPropertyNode::NotifyPostChange() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\PropertyNode.cpp:2342]
[Callstack] 0x00007ffffc7c6559 UE4Editor-PropertyEditor.dll!FPropertyHandleBase::NotifyPostChange() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\PropertyHandleImpl.cpp:3074]
[Callstack] 0x00007ffffcd26d49 UE4Editor-MaterialEditor.dll!FMaterialPropertyHelpers::OnMaterialLayerAssetChanged() [D:\Build\++UE4\Sync\Engine\Source\Editor\MaterialEditor\Private\MaterialPropertyHelpers.cpp:143]
[Callstack] 0x00007ffffcd47d69 UE4Editor-MaterialEditor.dll!SMaterialLayersFunctionsInstanceTree::RefreshOnAssetChange() [D:\Build\++UE4\Sync\Engine\Source\Editor\MaterialEditor\Private\SMaterialLayersFunctionsTree.cpp:1183]
[Callstack] 0x00007ffffcce5662 UE4Editor-MaterialEditor.dll!TBaseSPMethodDelegateInstance<0,SMaterialLayersFunctionsInstanceTree,0,void __cdecl(FAssetData const &),FDefaultDelegateUserPolicy,int,enum EMaterialParameterAssociation>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
[Callstack] 0x00007ffffc7e9c2d UE4Editor-PropertyEditor.dll!SObjectPropertyEntryBox::OnSetObject() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\PropertyCustomizationHelpers.cpp:576]
[Callstack] 0x00007ffffc775f47 UE4Editor-PropertyEditor.dll!TBaseSPMethodDelegateInstance<0,SObjectPropertyEntryBox,0,void __cdecl(FAssetData const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
[Callstack] 0x00007ffffc91129f UE4Editor-PropertyEditor.dll!SPropertyEditorAsset::SetValue() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\UserInterface\PropertyEditor\SPropertyEditorAsset.cpp:941]
[Callstack] 0x00007ffffc8b1a67 UE4Editor-PropertyEditor.dll!TBaseSPMethodDelegateInstance<0,SPropertyEditorAsset,0,void __cdecl(FAssetData const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
[Callstack] 0x00007ffffc8dfdb4 UE4Editor-PropertyEditor.dll!SPropertyMenuAssetPicker::OnAssetSelected() [D:\Build\++UE4\Sync\Engine\Source\Editor\PropertyEditor\Private\UserInterface\PropertyEditor\SPropertyMenuAssetPicker.cpp:279]
[Callstack] 0x00007ffffc8b3087 UE4Editor-PropertyEditor.dll!TBaseSPMethodDelegateInstance<0,SPropertyMenuAssetPicker,0,void __cdecl(FAssetData const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
[Callstack] 0x00007ffff82086b6 UE4Editor-ContentBrowser.dll!SAssetPicker::HandleItemSelectionChanged() [D:\Build\++UE4\Sync\Engine\Source\Editor\ContentBrowser\Private\SAssetPicker.cpp:528]
[Callstack] 0x00007ffff81e7877 UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetPicker,0,void __cdecl(FContentBrowserItem const &,enum ESelectInfo::Type),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
[Callstack] 0x00007ffff81a492b UE4Editor-ContentBrowser.dll!SAssetView::AssetSelectionChanged() [D:\Build\++UE4\Sync\Engine\Source\Editor\ContentBrowser\Private\SAssetView.cpp:3324]
[Callstack] 0x00007ffff81e9637 UE4Editor-ContentBrowser.dll!TBaseSPMethodDelegateInstance<0,SAssetView,0,void __cdecl(TSharedPtr<FAssetViewItem,0>,enum ESelectInfo::Type),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:307]
[Callstack] 0x00007ffff8236b76 UE4Editor-ContentBrowser.dll!SListView<TSharedPtr<FAssetViewItem,0> >::Private_SignalSelectionChanged() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Public\Widgets\Views\SListView.h:947]
[Callstack] 0x00007ffff822c5ad UE4Editor-ContentBrowser.dll!STableRow<TSharedPtr<FAssetViewItem,0> >::OnMouseButtonUp() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Public\Widgets\Views\STableRow.h:617]
[Callstack] 0x00007ff802b546be UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,<lambda_cc5aea9e7377b04ce85c30c65ec3889b> >() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:378]
[Callstack] 0x00007ff802bd7f54 UE4Editor-Slate.dll!FSlateApplication::RoutePointerUpEvent() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:4815]
[Callstack] 0x00007ff802bc0367 UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5356]
[Callstack] 0x00007ff802bb3642 UE4Editor-Slate.dll!FSlateApplication::OnMouseUp() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Slate\Private\Framework\Application\SlateApplication.cpp:5321]
[Callstack] 0x00007ff85646bca5 UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2174]
[Callstack] 0x00007ff856459197 UE4Editor-ApplicationCore.dll!FWindowsApplication::DeferMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:2638]
[Callstack] 0x00007ff85646e379 UE4Editor-ApplicationCore.dll!FWindowsApplication::ProcessMessage() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:1042]
[Callstack] 0x00007ff856454310 UE4Editor-ApplicationCore.dll!FWindowsApplication::AppWndProc() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsApplication.cpp:874]
[Callstack] 0x00007ff878135c1d USER32.dll!UnknownFunction []
[Callstack] 0x00007ff878135612 USER32.dll!UnknownFunction []
[Callstack] 0x00007ff85646f904 UE4Editor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages() [D:\Build\++UE4\Sync\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp:130]
[Callstack] 0x00007ff75e938857 UE4Editor.exe!FEngineLoop::Tick() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4748]
[Callstack] 0x00007ff75e9511ac UE4Editor.exe!GuardedMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:169]
[Callstack] 0x00007ff75e95128a UE4Editor.exe!GuardedMainWrapper() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
[Callstack] 0x00007ff75e9652ed UE4Editor.exe!WinMain() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:268]
[Callstack] 0x00007ff75e96801a UE4Editor.exe!__scrt_common_main_seh() [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[Callstack] 0x00007ff878ac7c24 KERNEL32.DLL!UnknownFunction []
[Callstack] 0x00007ff87908d721 ntdll.dll!UnknownFunction []

Have Comments or More Details?

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

2
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions4.26.1
Target Fix4.27
Fix Commit16036220
Main Commit16115137
Release Commit16036220
CreatedMar 30, 2021
ResolvedApr 16, 2021
UpdatedJun 14, 2022
View Jira Issue