Basic Project: "-waitmutex exited with code 5 Please verify that you have sufficient rights to run this command" error?

Hi I am trying to build just one of the basic start templates (C++ Top-Down) in UE4. The solution will only build about 40% of the time (after a full Rebuild) the rest of the time I get:

“AITEditor Win64 Development “C:\AIT\AIT.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command."

I have not added/removed any code or game objects at this point, this has happened with every single project I have created both at my Office and at Home.

The “sufficient rights” led me to believe it was a User Profile issue but I am an administrator on both of these machines, unless it’s trying to run Build.bat with some other profile? But then why would it be such an intermittent issue?

Could anybody provide any insight? I was hoping to use UE4 to create some AI Examples for my students next year but if I can’t get the basics working that won’t be an option.

Many thanks, Will

Platform

Windows 10
UE4 Version: 4.16.1
Visual Studio: VS Community 2015 14.0.25431.01 Update 3

Console

1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------ 2>------ Build started: Project: AIT, Configuration: Development_Editor x64 ------ 2> Compiling game modules for hot reload 2> Parsing headers for AITEditor 2> Running UnrealHeaderTool “C:\AIT\AIT.uproject” “C:\AIT\Intermediate\Build\Win64\AITEditor\Development\AITEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed 2> Reflection code generated for AITEditor in 5.7266943 seconds 2> Performing 6 actions (4 in parallel) 2> AITPlayerController.cpp 2> AITGameMode.cpp 2> AITCharacter.cpp 2> AIT.generated.cpp 2> [5/6] Link UE4Editor-AIT-5828.dll 2> [6/6] Link UE4Editor-AIT-1339.lib 2> Creating library C:\AIT\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIT-5828.lib and object C:\AIT\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIT-5828.exp 2> Creating library C:\AIT\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIT-5828.suppressed.lib and object C:\AIT\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIT-5828.suppressed.exp 2>ERROR : UBT error : Failed to produce item: C:\AIT\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIT-1339.lib 2> Total build time: 9.32 seconds (Local executor: 0.00 seconds) 2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ““C:\Program Files\Epic Games\UE_4.16\Engine\Build\BatchFiles\Build.bat” AITEditor Win64 Development “C:\AIT\AIT.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command. ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Hot Reload is notoriously finicky. Have you tried building from Visual Studio without the Editor opened?

Hi Matt, thanks for the response. I think you’re right it seems to be Visual Studio and the Editor fighting each other somehow?

If I consistenly just build using the ‘Compile’ button in the Editor I’ve not run in to any problems (yet).

I am seeing this as well. However it seems that no matter what I do it fails to build. Not even when I run the VS in admin mode it will work…

While not the original poster’s issue, but for the benefit of others that land on this page with the " … -waitmutex exited with code 5…" error… One way I caused the issue was from the below. With the moral being that this error message is sometimes totally misleading; in my case, it was induced merely by a bad annotation that had nothing to do with “sufficient rights” ! Worse, my problematic annotation wasn’t even considered “bad” until ~4.17.

USTRUCT() // BAD!!!  at least in my case 
struct MyInputStruct
{.... 

     instead of ...

USTRUCT(BlueprintType) //Good !  This is needed (in my case) when using 4.17+
struct MyInputStruct
{