Vitals Simulation Error Guide

Vitals Simulation Error Guide



Introduction

These are a list of all of the errors that I (and the rest of the current team) have run into while working with the project. I go into detail what different errors mean, what is causing them, and how to solve them.


Unreal Engine C++ Project Fails to Build

Solution

Start by downloading the latest Visual Studio Community version (2022).

In the installer, install the following workloads:

  • .NET Desktop Development
  • Desktop Development with C++
  • Windows Application Development
  • Game Development with C++
In the installer, install the following individual components:
  • MSVC v143 - VS 2022 C++ x64/x86 build tools (14.38 - 17.8)


VS Installer Workloads

All of these components are required to build a C++ Unreal Engine project. Desktop Development with C++ is required to build Colosseum.

Note: I have Unity installed, so I also have the Game Development with Unity workload.

Click Install. This will take some time (roughly 25GB)

Here is the problem: when you installed the Desktop Development with C++ workload, you installed the component MSVC v143 - VS 2022 C++ x64/x86 build tools (latest). You cannot get rid of this component, as it is required by many other components. However, Unreal Engine does not like the latest build tools due to a security risk and requires you use a previous version. This previous version is the MSVC v143 - VS 2022 C++ x64/x86 build tools (14.38 - 17.8) component you installed earlier as an individual component.

The next step is to make Unreal Engine use the previous version of the build tools. Assuming Unreal Engine is already installed and has been run at least once, in your Windows search bar, type in %appdata% and go to the folder location. This will bring you to the AppData\Roaming folder.


AppData Folder

Navigate to Unreal Engine/Unreal Build Tool and open BuildConfiguration.xml with a text editor and change it to include the following:


<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
    <WindowsPlatform>
        <CompilerVersion>14.38.33130</CompilerVersion>
        <ToolchainVersion>14.38.33130</ToolchainVersion>
    </WindowsPlatform>
</Configuration>

The version number you see in the CompilerVersion and ToolchainVersion tags are the specific version of the build tools you installed. This is the last supported version that Unreal Engine will accept.

Now you should be able to build a blank C++ Unreal Engine project. If you cannot, ensure that the steps above are completed correctly.

I did this with a fresh install on a brand new Windows 11 machine. I don't imagine that the Windows version matters, but I have not tested this on Windows 10.

Building Colosseum to Work with Unreal Engine

If you followed the steps in the previous section, you will likely run into an error detailing that the Unreal Engine and Colosseum versions do not match if you try to build and run a project that uses the Colosseum plugin (like Blocks).

To tell Colosseum to build with the (14.38 - 17.8) toolchain, we need to modify the build.cmd script. Open up the build.cmd file in a text editor and change line 125 to the following:


cmake -G"Visual Studio 17 2022" -T v143 ..

The -T v143 flag tells CMake to use the MSVC v143 - VS 2022 C++ x64/x86 build tools (14.38 - 17.8) toolchain instead of the latest version (which is the default toolchain)

Then, run the build.cmd script like normal in the Developer Command Prompt for VS 2022. Hopefully, you will see the toolchain version number (14.38.33130) during the build process. Once it's finished building, open the Blocks.sln file. Go to Build > Build Solution, and hopefully you will again see the toolchain version number (14.38.33130) in the output window. Once the build succeeds, you are ready to go!


Drone Environment Build Errors

~25 AirSim Plugin Compilation Errors Solution

This error was occurring after cloning the git repository. Previously, the repository was tracking the Plugins folder. However, from the error explained above, you NEED to use the Plugins folder from your build of Colosseum.

The problem was that Visual Studio was using git to track changes in the Plugins folder. Even after deleting and replacing the Plugins folder, git still considered the Plugins "unchanged" and would not compile the plugin. You would see in the Build Output [Adaptive Build] Files excluded from building: ...

The solution was to simply stop tracking the Plugins folder in git. I added Plugins/AirSim to the .gitignore file. DO NOT TRACK PLUGINS IN GIT REPO!

DroneEnvironment.dll could not be closed Solution

There are three cases for why this might occur:

The first case is that you are trying to Build Solution from VS while the Unreal Engine editor is open and Live Coding is enabled. Live Coding allows you to perform a quick compile when modifying C++ files. However, while it is active, you won't be able to do Build Solution from VS without closing the Unreal Engine editor first.

Personally, I disabled Live Coding so that in order to compile, I have to run Build Solution from VS. This way, I can see the compilation errors in the VS Output window instead of the Unreal Engine editor. To do this, go to Edit > Editor Preferences > Live Coding and uncheck Enable Live Coding.


Disable Live Coding

The second case is interference from an antivirus program. An antivirus program may be trying to scan the DroneEnvironment.dll file while it is being built, causing the file to be locked. When this occurs, just disable your antivirus program temporarily and try to build again.

The third case is when you encounter a crash during Play mode. Unreal Engine will close an a popup will appear showing you the crash log. Keeping this log open will prevent you from building the solution in VS until it is closed.

Cannot Interact with UI in Some Areas of Screen Solution

This issue is due to AirSim having its own HUD that is blocking our HUD. Here's how to disable the AirSim HUD from blocking our UI interaction:

In the Content Browser, navigate to Plugins/AirSim/Content/Blueprints and open BP_SimHUDWidget
BP_SimHUDWidget Location

To see the Plugins folder in the Content Browser, click on the Settings icon and enable Show Plugin Content.
Show Plugin Content

In the Hierarchy tab, select the [CanvasPanel_0] component.
BP_SimHUDWidget Canvas Panel Location

In the Details tab, set Visibility to Not Hit Testable (Self & All Children).
BP_SimHUDWidget Canvas Panel Visibility


Blocks/AirSim Project Errors

Eigen/Dense Not Found Solution

This error occurs when you are using someone else's Plugins folder. You CANNOT copy-paste someone else's Plugins folder. You must get your own Plugins folder that you got when you built Colosseum. Copy the Plugins folder from .../Colosseum/Unreal

Unreal Engine Crashes on Play Solution

This specifically occurs in the Colosseum 5.2 release package. The crash log will mention that a NULL pointer exception occurred at SimModeBase.cpp on line 235.

Luckily, this is an easy fix. Navigate to .../Colosseum/Unreal/Plugins/AirSim/Source/SimMode/SimModeBase.cpp
SimModeBase.cpp Location

On line 229, change the #if directive to the following: #if ((ENGINE_MAJOR_VERSION > 4) || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 27))
SimModeBase.cpp Fix

Once corrected, save the file and copy this Plugins folder into .../Colosseum/Unreal/Environment/Blocks. Then, open the Blocks.sln file in VS and do Build > Build Solution. You should be able to play the Blocks project.
Move Plugins Folder Part 1 Move Plugins Folder Part 2


Colosseum Build Errors

HKEY_CLASSES_ROOT does not exist Solution

This error will pop up towards the end of the building Colosseum, when build.cmd tries to Generate Visual Studio project files.

This means that Unreal Engine is not associated with the Windows Registry yet. This may occur if you have never opened Unreal Engine before.

To fix this, verify your Unreal Engine installation. In the Epic Games Launcher, go to the Library tab, find the version of Unreal Engine you are using, click on the three dots next to it, and select Verify. Once the verification is complete, try launching Unreal Engine to let initialization scripts run.

Then, you should be able to run the build.cmd script again for Colosseum.

C Compiler Unknown Solution

After running the build.cmd script, you may see an error during the Build rpclib stage that says the C compiler Identification is unknown and that it cannot run a simple test program. Finally, it will say that there was some link error where the script could not close a file.

This error may also occur during Build Solution in VS. An error will generate that says some .dll files cannot be closed.

To solve this, first ensure that you have the correct Visual Studio 2022 workloads installed, as described in the Unreal Engine C++ Project Fails to Build section.

If the error still occurs, then it is likely your antivirus program. Try disabling your antivirus program temporarily and then run the build.cmd script again.