Non-editor builds in UE5.8 crash in MSVC before main method, even in non-modified 1st person template project

I have a 5.7 project which I updated to 5.8. It works just fine in Development Editor build, but when I build it without editor (Development or DebugGame build), the application crashes immediately and silently (no logs, dialogs, nothing). With debugger I was able to see it gets following error:
Exception thrown at 0x00007FFC0A851B6A in MyProject-Win64-DebugGame.exe: Microsoft C++ exception: xSharedMemoryException at memory location 0x000000B0A117ED20.

Attached image below:

I have done non-editor builds earlier in 4.7 and testing in multiplayer setups without any problems. I have been using VS2022 and MSVC 14.44. Now I tried this with VS2026 and MSVC 14.50 as well but I get the same results with it. I did also make a default first person c++ project and try it there. Exact same results, editor builds work, non-editor ones crash to same error.

Any ideas what to try out next?

Hello there @Ukkoprkl!

The fact that this is not leaving any logs or traces is quite strange. And from the error you get, plus what’s seen in your screenshot, it seems the whole process dies on startup.

Checking with my peers, first thing to consider, specially has you just migrated the project, is to ensure that every and all components tied to the VS installation are present, and using their correct version. You can review the entire process with the UE doc below:

After ensuring everything is properly installed, the very next step after a migration, is to fully clear the project’s cache, as stale data is very likely present on it. To do so, close both UE and VS, then navigate to your project’s main directory, to delete the following folders:

  • Binaries
  • Intermediate
  • Saved
  • DerivedDataCache
  • .vs

Once complete, locate your .uproject file, righ click on it, and select “Generate Visual Studio project files”. Now you can re-open both UE and VS, to allow the project to fully rebuild.

If the issue persists, even in a default project as you tested before, then the remaining step would be a full reinstall of both UE and VS from your system, a fresh start. VS can be removed with it’s installer, no major workarounds. UE, on the other hand, requires a few more steps to fully clear:

  • First, uninstall the engine, launcher, any asset packs, etc
  • Next, open the registry directory HKEY_CURRENT_USER\Software\Epic Games\Unreal Engine\Builds, and delete any build entries
  • Finally, delete the folders %userprofile%\AppData\Local\UnrealEngine and %userprofile%\AppData\Local\UnrealHeaderTool
  • After that, no elements related to UE should be left in your system
  • Now, reinstall UE launcher from scratch, and only add the version of the engine you want to work with (in this case, 5.8)
  • At this stage, reinstall VS and all it’s components
  • After the process is complete, re-do the test with a blank c++ project