4.26 crash on startup

So, the answer hub is maybe not the place to put this, but there is a simple yet fatal bug in 4.26 that can be fixed very easily. It doesn’t really fit in the bug report form either and I would like other developers to be able to find this.

The crash occurs in MaterialCachedData.cpp, FMaterialCachedExpressionData::UpdateForExpressions in line 528, with an array out of bounds exception. The culprit lies in line 526:

FMaterialCachedParameterEntry& CachedEntry = Parameters.EditorOnlyEntries[static_cast<int32>(EMaterialParameterType::StaticSwitch) - static_cast<int32>(EMaterialParameterType::RuntimeCount)];

StaticSwitch has to be replaced with StaticComponentMask here. Seems like the code has been copy pasted but the programmer forgot to change this value. Maybe someone at Epic could forward this to an engine developer.

Hello,

We’ve made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

Thanks