Description

It is possible to cause an editor crash when changing a the value of a node involved with a reentrant expression. See the steps to reproduce for more information.

Specifically, the crash occurs when changing a value on the node itself, but not when changing the same value via the details panel when the node is selected.

As a side note, as the attached images show, it is possible to create a reentrant expression that doesn't cause a material compilation error due to the output of a material function being completely independent of the input. This crash will occur regardless of whether or not the compilation error is thrown, but it is slightly more egregious for the crash to occur without being told about the reentrant expression by the editor.

Steps to Reproduce
  • Create a new material
  • Create a new material function
  • Refer to the attached image for the material and material function setup, or follow the next steps
  • For the material function, take in a scalar and add it to a constant value. Return the result of the addition, and output an additional value, that being just the constant value.
  • For the material, add the material function node and a multiply node. The material function's result should go into the base colour of the material. The input of the material function should be the output of the material node, and the additional output of the material function should be the input of the multiply node.
  • Note that this would usually cause a material compilation error because of a reentrant expression, but it does not in this case because the output of the material function is a constant completely independent of the input of the function.
  • Try to change Const B of the multiply node from the details panel, note this works as expected
  • Try change Const B of the multiply node from the node itself, note this causes the editor to crash
Callstack

Unhandled Exception: EXCEPTION_STACK_OVERFLOW

UnrealEditor_UnrealEd!UObjectBaseUtility::IsA<UMaterialGraphNode>() [D:\build\++UE5\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\UObjectBaseUtility.h:620]
UnrealEditor_UnrealEd!UMaterialGraphNode::PropagatePropertyChange() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\MaterialGraphNode.cpp:835]
UnrealEditor_UnrealEd!UMaterialGraphNode::PropagatePropertyChange() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\MaterialGraphNode.cpp:831]
UnrealEditor_UnrealEd!UMaterialGraphNode::PropagatePropertyChange() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\MaterialGraphNode.cpp:831]
UnrealEditor_UnrealEd!UMaterialGraphNode::PropagatePropertyChange() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\MaterialGraphNode.cpp:831]
... (repeating for over 8000 lines)

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Rendering Architecture - Materials
Affects Versions5.45.4.4
Target Fix5.5
Fix Commit36302328
CreatedOct 1, 2024
ResolvedOct 4, 2024
UpdatedOct 7, 2024
View Jira Issue