UE4 4.24.3 Shader Crash Fix

Hi all, I apologize if this is the wrong area to post, but today I encountered a crash on startup and after trying all types of troubleshooting and googling, there was no answer anywhere. I spent the last 2 hours trying to figure it out on my own and with little C++ experience, it was a nightmare! Alas, I managed to find a workaround and figured I’d share in case anyone ever ends up in the same boat and fail to find a solution.

The link are images of the crash report I had as well as the lines in the shader.cpp you need to find to fix the problem. Open the shader.cpp file located where directed in the crash report and replace the code with as shown below. Shader crash for UE4 4.24.3 - Album on Imgur

The .txt file is the text you need to replace the " FShader - SerializeBase(FArchive & Ar, bool bShadersInline, bool bLoeadedByCookedMaterial) " with, starting on line 1296.

Again, I hope this helps someone down the road. Just wanted there to be an actual documented case of the issue and a way to fix it. You could also just stay up to date on engine versions. whatever works best. Good luck on all your projects!