Description

This is an infrequent crash in the 4.18 release. Users have not provided any descriptions of their actions when the crash occurred.

Source Context

 849       uint32 UMaterialExpression::GetOutputType(int32 OutputIndex)
  850       {
  851       	// different outputs should be defined by sub classed expressions
  852       	if (IsResultMaterialAttributes(OutputIndex))
  853       	{
  854       		return MCT_MaterialAttributes;
  855       	}
  856       	else
  857       	{
  858 ***** 		FExpressionOutput& Output = GetOutputs()[OutputIndex];
  859       		if (Output.Mask)
  860       		{
  861       			int32 MaskChannelCount = (Output.MaskR ? 1 : 0)
  862       									+ (Output.MaskG ? 1 : 0)
  863       									+ (Output.MaskB ? 1 : 0)
  864       									+ (Output.MaskA ? 1 : 0);
  865       			swch (MaskChannelCount)
  866       			{
  867       			case 1:
  868       				return MCT_Float;
  869       			case 2:
  870       				return MCT_Float2;
  871       			case 3:
  872       				return MCT_Float3;
  873       			case 4:
Steps to Reproduce
  1. Open a material with many nodes in the editor
  2. Add a MaterialFunctionCall node to the Graph
  3. Drag and connect the UnspecifiedFunction's pin to any pin on Material Result Node
    Result: Editor Crashes

Note: The function call node has a single output pin by default which is incorrect which is why linking it causes the crash.

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

UE4Editor_Engine!UMaterialExpression::GetOutputType() [materialexpressions.cpp:859]
UE4Editor_UnrealEd!UMaterialGraphSchema::ArePinsCompatible() [materialgraphschema.cpp:306]
UE4Editor_UnrealEd!UMaterialGraphSchema::CanCreateConnection() [materialgraphschema.cpp:522]
UE4Editor_GraphEditor!FDragConnection::HoverTargetChanged() [dragconnection.cpp:55]
UE4Editor_GraphEditor!FGraphEditorDragDropAction::SetHoveredPin() [grapheditordragdropaction.cpp:55]
UE4Editor_GraphEditor!SGraphPin::OnDragEnter() [sgraphpin.cpp:649]
UE4Editor_Slate!<lambda_f61e425f9587e96b799927cd214b1498>::operator() [slateapplication.cpp:5540]
UE4Editor_Slate!FEventRouter::Route<FNoReply,FEventRouter::FBubblePolicy,FDragDropEvent,<lambda_f61e425f9587e96b799927cd214b1498> >() [slateapplication.cpp:234]
UE4Editor_Slate!FSlateApplication::RoutePointerMoveEvent() [slateapplication.cpp:5534]
UE4Editor_Slate!FSlateApplication::ProcessMouseMoveEvent() [slateapplication.cpp:5965]
UE4Editor_Slate!FSlateApplication::OnMouseMove() [slateapplication.cpp:5899]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessDeferredMessage() [windowsapplication.cpp:1763]
UE4Editor_ApplicationCore!FWindowsApplication::DeferMessage() [windowsapplication.cpp:2171]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessMessage() [windowsapplication.cpp:888]
UE4Editor_ApplicationCore!FWindowsApplication::AppWndProc() [windowsapplication.cpp:725]
user32!UserCallWinProcCheckWow()
user32!DispatchMessageWorker()
UE4Editor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [windowsplatformapplicationmisc.cpp:129]
UE4Editor!FEngineLoop::Tick() [launchengineloop.cpp:3220]
UE4Editor!GuardedMain() [launch.cpp:166]
UE4Editor!GuardedMainWrapper() [launchwindows.cpp:134]
UE4Editor!WinMain() [launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [exe_common.inl:253]
kernel32!BaseThreadInitThunk()
ntdll!RtlUserThreadStart()

Have Comments or More Details?

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

0
Login to Vote

Cannot Reproduce
ComponentUE - Rendering - Materials
Affects Versions4.18
Target Fix4.19
Fix Commit3794273
Main Commit3807911
CreatedNov 21, 2017
ResolvedDec 5, 2017
UpdatedNov 2, 2021