Material Layers keep crashing the engine

With UE 4.26 Material Layer assets are now a standard part of the engine… but they keep on causing crashes when using them with Functions in the Layer.

In my case, the crash often seems related to the use of the “Mask Param” node, when using something like this:

When using the mentioned node outside of a function there’s no issue. correction: Also when using the node directly in the layer it causes a crash but …not always?

The crash occurs when assigning Material Layer Asset that has such a function inside of it to a Material Instance in the Layer Parameter panel.

How to handle this? I’ve already created a bug report, but it seems Material Layers in their current state are difficult to use.

For anyone curious, I’ve attached an example project that crashes when you:

  1. Create a Material Instance from the supplied Master Material
  2. Assign the supplied Layer Asset to the created Material Instance in the Layer Parameters function.

[link text][2]

I don’t really have a solution, I just want to say that I had the same exact problem today and that getting rid of the Mask Params inside my Material Layer function “fixed” the crashing for me. Let’s hope the devs fix this soon.