AutomationTool terminates with CommandFailedException

Greetings!

I’m running Windows 10 64bit, using Unreal Engine 4.17 and Visual Studio 15.4.0 (2017)

I’m considering moving to the Unreal Engine to help speed up development with my projects. Currently making games using plain C++ with library dependencies. I’m interested in Unreal because of it’s C++ scripting engine. Unreal’s competitors are using C#, which we all (should) know can be quite easily reversed (nightmare for an MMO project).

Before getting serious with Unreal, I ran a basic packaging run to see what I can expect from the process. I loaded the C++ Third Person project template and then immediately tried to package with the shipping option selected.

Attempting to package a 32 bit application in shipping mode returns the following:

UATHelper: Packaging (Windows (32-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): D:\Programs\UE_4.17\Engine\Binaries\DotNET\UnrealBuildTool.exe TestProject Win32 Shipping -Project=D:\Projects\Unreal\TestProject\TestProject.uproject  D:\Projects\Unreal\TestPr
oject\TestProject.uproject -NoUBTMakefiles  -remoteini="D:\Projects\Unreal\TestProject" -skipdeploy -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2017.10.10-13.42.02.txt' 
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictio
nary`2 InTargetToManifest)
UATHelper: Packaging (Windows (32-bit)):    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
UATHelper: Packaging (Windows (32-bit)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
UATHelper: Packaging (Windows (32-bit)):    at BuildCookRun.ExecuteBuild()
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.Automation.Process(String[] Arguments)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Windows (32-bit)):    at AutomationTool.Program.Main()
UATHelper: Packaging (Windows (32-bit)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (32-bit)): BUILD FAILED

Attempting to package 64 bit application in shipping mode causes the packager to stall during the cooking process. It stalls for about 30 minutes and then returns an out of memory error.

Again, this is the base Third Person C++ template that ships with the Engine. No modifications were made.

A simple search brings up previous solutions, which typically involve deleting the Saved and Intermediate folders in the project directory. This does not resolve the issue on my end.

I thought about fishing through the Unreal Engine’s source and attempt to debug the problem, however all links to the unreal repository return a 404 response. What are my options?

Thanks,

– Edit –

Blueprint projects can be packaged. No problems there. The issue only occurs when packaging C++ projects (which is the project type I’m interested in).

Update: Blueprint projects can be packaged. No problems there. The issue only occurs when packaging C++ projects (which is the project type I’m interested in).

Hey, I’m having a similar issue with compilation with unreal projects, but it only started with the recent update to Visual Studio 15.4.0. For some reason 2 different Windows SDK’s are being included during the process and they’re getting object redefinition errors, as duplicate headers are being included at the same time.

If you have access to any version of VS2017 before 15.4.0 it should compile. Hopefully this problem gets resolved soon.

Installing the VC++ 2015.3 v140 toolset fixes this issue.

Hi CylonWarrior, thanks for the reply. Installing the VC++ 2015.3 v140 toolset fixes the issue.