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 ![]()
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.