Unreal engine gives me a crash report on trying to create a c++ project, not sure how to fix.

When I try to create a c++ project from the unreal engine project browser, it loads for a bit and then spits out this error:

The project could not be compiled. Would you like to open it in Visual Studio?

Running C:/Program Files/Epic Games/UE_5.3/Engine/Build/BatchFiles/Build.bat Development Win64 -Project=“C:/Users/Main User/Documents/Unreal Projects/MyProject8/MyProject8.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Using bundled DotNet SDK version: 6.0.302
Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” Development Win64 -Project=“C:/Users/Main User/Documents/Unreal Projects/MyProject8/MyProject8.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Log file: C:\Users\Main User\AppData\Local\UnrealBuildTool\Log.txt
Creating makefile for MyProject8Editor (no existing makefile)
@progress push 5%
Parsing headers for MyProject8Editor
Running Internal UnrealHeaderTool “C:\Users\Main User\Documents\Unreal Projects\MyProject8\MyProject8.uproject” “C:\Users\Main User\Documents\Unreal Projects\MyProject8\Intermediate\Build\Win64\MyProject8Editor\Development\MyProject8Editor.uhtmanifest” -WarningsAsErrors -installed
Total of 0 written
Reflection code generated for MyProject8Editor in 1.3658249 seconds
@progress pop
Building MyProject8Editor…
Using Visual Studio 2022 14.39.33519 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Determining max actions to execute in parallel (6 physical cores, 12 logical cores)
Executing up to 6 processes, one per physical core
Requested 1.5 GB memory per action, 2.71 GB available: limiting max parallel actions to 1
------ Building 6 action(s) started ------
[1/6] Compile [x64] SharedPCH.Engine.Cpp20.cpp
C:\Program Files\Epic Games\UE_5.3\Engine\Source\predefined C++ types (compiler internal)(420): error C2248: ‘FHazardPointerCollection::FHazardRecord::FHazardRecord’: cannot access private member declared in class ‘FHazardPointerCollection::FHazardRecord’
C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Experimental\Containers\HazardPointer.h(86): note: see declaration of ‘FHazardPointerCollection::FHazardRecord::FHazardRecord’
C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Experimental\Containers\HazardPointer.h(77): note: see declaration of ‘FHazardPointerCollection::FHazardRecord’
C:\Program Files\Epic Games\UE_5.3\Engine\Source\predefined C++ types (compiler internal)(420): note: the template instantiation context (the oldest one first) is
C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Experimental\Containers\HazardPointer.h(133): note: see reference to function template instantiation ‘void __builtin_array_init_helperFHazardPointerCollection::FHazardRecord(_T *,size_t) noexcept()’ being compiled
with
[
_T=FHazardPointerCollection::FHazardRecord
]
[2/6] Resource Default.rc2
Total time in Parallel executor: 18.56 seconds
Total execution time: 22.76 seconds

It then asks me if I want to open it in visual studio, in visual studio when i try to start without debugging these are the errors:

My unreal engine is 5.3.2
My visual studio is 2022 community 17.9.0.

I’ve tried uninstalling visual studio and unreal engine while looking at the guide on what options to select on visual studio, same error.

2 Likes

Updating to Visual Studio 17.9.0 caused the same issues, which downgrading resolved. If you’re on the community edition, they only allow you to use latest (which is particularly annoying in scenarios like this).

You may be able to resolve this by force uninstalling the latest toolchain and installing the version Epic currently recommends (17.6). If you start the Visual Studio installer, select modify, then go to the individual components tab on that screen. If you scroll down you’ll find the compiler in there (make sure you go to the x86_64 version) and deselect latest and select 17.6. See the screenshot below.

image_2024-02-16_112122463

Hope this helps.

Cheers,

Alan.

6 Likes

Thank you so much!

You just saved a couple of projects. Many thanks from the community.

For those who want use Rider instead VS, you can install

  • Visual Studio Build Tools (aka MS Build )

  • MSVC v143 - VS 2022 C++ x64/x86 build tools (v14.36-17.6)

  • Windows 10/11 SDK

  • .Net Framework SDK 4.8.1

  • .Net SDK

image

And JetBrains Rider will work out the box with live coding

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.