SOLVED | Unreal Automation Tool: Exit Code 1 | Program wont launch

EDIT: After days of research, I found that this error is caused because I had a global static FStreamableManager variable defined in a .cpp file. So, you should check if you have any engine native structs defined like this or any static variables that is breaking your program. Hope this helps someone :slight_smile:


Hi everyone, I have a C++ UE 5.3 project. I am having a problem about launching my packaged project.

TLDR; I can package without errors. PIE without errors. But cant launch the packaged .exe because ProcessManager.CreateProcess function fails somehow. Below you can find the details and my findings.

I would be very much appreciated if anyone help me out on this.

I first had a nullptr fatal error when I tried to launch the program couple of days ago. It was about a data table that is not being cooked because it was loaded from code. So, I ticked Cook Everything from the Project Settings → Packaging → Advanced. After that, I started getting this error.

I have no errors or warnings during compilation/build, cooking, staging, deploying phases. Also everything works as expected in PIE. After I try to open the program by the .exe nothing happens.

If I use the Quick Launch option in the editor I get this error code:

AutomationTool exiting with ExitCode=1 (Error_Unknown)

I checked every BP by opening them to see if they are corrupted. Nothing crashed the editor or looked weird. I almost have literally no scripting logic in BP’s.

As far as I debugged it, it is related to the ProcessManager of the AutomationTool. Here are my findings from the logs:

AutomationException: Client exited with error code: 777006

at AutomationScripts.Project.RunClient(List`1 DeployContextList, String ClientLogFile, ERunOptions ClientRunFlags, String ClientApp, String ClientCmdLine, ProjectParams Params)
AutomationTool\Scripts\RunProjectCommand.Automation.cs:line 542

RunProjectCommand.Automation.cs:line 542 is just a throw. Before that these happen. Code only runs until the “Running” log, then it throws the error.

Logger.LogInformation("Starting Client....");
ClientProcess = SC.StageTargetPlatform.RunClient(ClientRunFlags, ClientApp, ClientCmdLine, Params);

// has an empty function body
SC.StageTargetPlatform.PostRunClient(ClientProcess, Params);

SC.StageTargetPlatform.RunClient:

			LogEventType SpewVerbosity = Options.HasFlag(ERunOptions.SpewIsVerbose) ? LogEventType.Verbose : LogEventType.Console;
			if (!Options.HasFlag(ERunOptions.NoLoggingOfRunCommand))
			{
				LogWithVerbosity(SpewVerbosity,"Running: " + App + " " + (String.IsNullOrEmpty(CommandLine) ? "" : CommandLine));
			}

			bool bUseShellExecute = Options.HasFlag(ERunOptions.UseShellExecute);
			bool bRedirectStdOut = !bUseShellExecute && !Options.HasFlag(ERunOptions.NoStdOutRedirect);
			bool bAllowSpew = bRedirectStdOut && Options.HasFlag(ERunOptions.AllowSpew);
			bool bCaptureSpew = bRedirectStdOut && !Options.HasFlag(ERunOptions.NoStdOutCapture);

			IProcessResult Result = ProcessManager.CreateProcess(App, bAllowSpew, bCaptureSpew, Env, SpewVerbosity: SpewVerbosity, SpewFilterCallback: SpewFilterCallback, WorkingDir: WorkingDir);

I think ProcessManager.CreateProcess somehow does not work properly.

I think I have the same problem, 777006 and a failure to launch (the executable does nothing after packaging, as you describe).

AutomationException: Client exited with error code: 777006

then it directs me to a Client.log for details, but there is not Client.log file written.

Would you be able to point me in the direction you took to debug this? How did you reach the conclusion that your use of FStreamableManager was the problem?
This page appears to be the only reference to this error message on the internet!

(Edit: I first noticed this issue when I tried 5.4. My project built and ran standalone fine in 5.3.2. I then switched back to 5.3.2 and am now testing out 5.5 - but I had it working fine on 5.5. I can’t find any change I’ve made since it was working that should cause this issue, but clearly there’s something wrong!)
Thanks in advance

Roo

I made a separate post about this issue and documented my progress towards finding the solution, that’s here: Packaged .exe does nothing (silent crashes) - Development / Programming & Scripting - Epic Developer Community Forums

TL;DR: Debug the executable that’s within your YourBuildDirectory/Windows/YourProject/Binaries/Win64/ directory - in my case that actually gave callstacks that helped me locate the problem code, whereas everything else I tried was a dead end.