A Quick Work Around for MSVC C++ Compiler (Latest) Crashing Unreal 5.3

[Personal Devlog — March 24, 2024]

Echo Yin
Women in Technology
3 min readMar 24, 2024

--

I have been toying with Unreal 5.3 in the last couple of mouths. It’s a gigantic blob of wonderful creation that is, quite frankly, scary to new game developers. But when you spend more time with it, then it’s in fact a gentle Big Daddy :)

What is the Issue Here?

As we all know Unreal is mostly using C++ for programming. Unfortunately the latest MSVC compiler tend to crash Unreal because, due to the error log outputs, the building process has additional assertion process on FHazardRecord that lead to build failure.

FHazardPointerCollection::FHazardRecord(_T *,size_t) noexcept()’ being compiled
with
[
_T=FHazardPointerCollection::FHazardRecord
]

How to Quick Fix It?

Most likely we have Visual Studio 2022 installed along with Unreal. Unless you are a super geek who is using customized C++ compiler and configure them in Unreal, you might not need to read further. This is a quick fix that works for me and some fellow game devs I know.

Upon Visual Studio installation it came with Visual Studio Installer, that’s where all the installed development tools and components are listed.

Here are the steps to fix Unreal crashed by the latest MSVC compiler:

1. Open Visual Studio Installer, click on Modify ;

2. Find Individual Components and Type msvc in the search bar;

3. I’m assuming you are using Windows as OS. Here MSVC v143 — VS 2022 C++ x64/x86 build tool(Latest) is the little naughty boy causes us pain :(

4. Deselect it and choose MSVC v143 — VS 2022 C++ x64/x86 build tools (v14.36–17.6) instead. This is the compiler version we want.

5. Click on Modify and let VS Installer handle the rest.

That’s it! You can test compiling your Unreal project in the IDE of your choice or type LiveCoding.Compile in the Cmd in the editor.

Bonus: CMake Users

On top of using Unreal I’m also using the CMake bundle and toolchains to run other C++ programs outside Unreal.

When deselecting MSVC v143 — VS 2022 C++ x64/x86 build tool(Latest), the C++ CMake tools for Windows is also automatically deselected. I’m a bit of lazy person who lets Clion and Conan auto configure CMake toolchain and generator for me. Deselecting CMake tools will confuse Clion, it cannot find the proper tools to build my C++ programs.

A good thing is, right now the C++ programs I’m writing are for learning purposes. They are C++ standard and compiler agnostic. A work around for me is to install Visual Studio 2019 and install C++ compilers from there. And configure Clion and Conan accordingly. Now I’m a happy programmer who can enjoying writing code instead of being a technician.

Hope this little work around helps you as well. Fingers crossed that Microsoft will fix the compiling issues for Unreal soon.

Take care!

--

--