Packaging a project from the command line causes the executable to crash.

This crash only occurs when I build my project using the command line. If I build with shipping through the Editor it is able to produce a packaged build that has no issues. I am trying to build my project with jenkins so we can have automated builds.

Steps to Reproduce
Compile my project from the command line using this command

RunUAT.bat buildcookrun -cookcultures=en+ko-KR -i18npreset=All -verbose -project=“{PathToProject}” -noP4 -platform=Win64 -clientconfig=Shipping -serverconfig=Shipping -cook -allmaps -build -stage -pak -CrashReporter -archive

This is the same command I would use to package a ue4 project but now when the project is packaged it crashes at startup saying

LowLevelFatalError [File:D:\JenkinsBuilds\UE\workspace\UE\Engine\Source\Runtime\Engine\Private\Materials\MaterialShared.cpp] [Line: 2998] Failed to find shader map for default material WorldGridMaterial(/Engine/EngineMaterials/WorldGridMaterial.WorldGridMaterial)! Please make sure cooking was successful (No inline shaders, null GTSM)

Hi,

Can you zip and share the logs from the BuildCookRun command that generates the bad package? You might have to re-run the command as the UAT logs are deleted on startup. They will be under Engine\Programs\AutomationTool\Saved\Logs.

It would also be interesting if you could share the same logs but from the editor this time so we can compare them.

Regards

I reran the build and I can’t find any logs under Engine\Programs\AutomationTool\Saved\Logs. I was able to find some in Roaming\Unreal Engine\AutomationTool\Logs not sure if those are what your looking for. What I have included is the console output of the build run on the command line and the one built in engine.

Sorry! It wasn’t clear that you are using an installed build. The logs will be under “C:\Users\jbrendli\AppData\Roaming\Unreal Engine\AutomationTool\Logs\”

I would need all files since the main one doesn’t contains all the details.

Oh sorry I should add that to my questions from now on. Here’s the command line logs

Thanks for helping.

Awesome! I would recommend sticking as much as possible to the arguments generated by the editor. Some of the project settings are used to generate the argument list at the editor level. In this case, it would be the GenerateChunk setting that was probably mishandled because of the missing arguments. The editor command is a bit polluted with Turnkey and other editor specific arguments. I usually start at BuildCookRun and remove all the arguments that are meant to prevent the editor and UAT from being compiled.

Which version of 5.4 are you using? A colleague found that a similar problem should have been addressed in version 5.4.2. I can’t share the thread as it’s a private case.

While reviewing the logs I could see that the editor package is using chunks while the command line one it not. That could be related to the problem. I recommend adding -manifests to the command line .

There are also a couple of arguments that are missing:

  • -manifests : Looks like the one causing the problem
  • -package
  • -target=CortexHMI
  • -compressed
  • -installed
  • -prereqs : Only needed if you want the redistributable installer part of the package.

I believe we are using a custom version of 5.4.4. I’ll add these new arguments and see if they fix it.

Adding the manifest command fixed my issue. Thank you so much Martin.

Ok thank you Martin I’ll look into that and adjust our arguments.