ue4-docker: Packaging fails on linux (with segfault)

Output of the ue4-docker info command:

ue4-docker version:         0.0.45 (latest available version is 0.0.50)
Operating system:           Linux (Ubuntu 18.04.4 LTS, 5.3.0-28-generic)
Docker daemon version:      19.03.5
NVIDIA Docker supported:    No
Maximum image size:         No limit detected
Available disk space:       221.06 GiB
Total system memory:        31.26 GiB physical, 2 GiB virtual
Number of processors:       6 physical, 12 logical

I’m trying to package a project using ue4docker on Linux. The compilation process works fine, but as soon as the cooking process starts, the process terminates with a segfault. Here’s the log:

ProcessResult.StdOut:   LogShaderCompilers: Display: Worker (3/13): shaders left to compile 1
ProcessResult.StdOut:   LogLinker: Warning: Asset '../../Plugins/Runtime/WebBrowserWidget/Content/WebTexture_M.uasset' has been saved with empty engine version. The asset will be loaded but may be incompatible.
ProcessResult.StdOut:   LogLinker: Warning: Asset '../../Plugins/Runtime/WebBrowserWidget/Content/WebTexture_M.uasset' has been saved with empty engine version. The asset will be loaded but may be incompatible.
ProcessResult.StdOut:   LogLinker: Warning: Asset '../../Plugins/Runtime/WebBrowserWidget/Content/WebTexture_T.uasset' has been saved with empty engine version. The asset will be loaded but may be incompatible.
ProcessResult.StdOut:   LogLinker: Warning: Asset '../../Plugins/Runtime/WebBrowserWidget/Content/WebTexture_T.uasset' has been saved with empty engine version. The asset will be loaded but may be incompatible.
ProcessResult.StdOut:   LogLinker: Warning: Asset '../../Plugins/Runtime/WebBrowserWidget/Content/WebTexture_TM.uasset' has been saved with empty engine version. The asset will be loaded but may be incompatible.
ProcessResult.StdErr:   [0210/162856:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
CommandUtils.Run: Took 22.229125s to run UE4Editor, ExitCode=139
InternalUtils.SafeDeleteFile: SafeDeleteFile /home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/Cook-2020.02.10-16.28.57.txt
InternalUtils.SafeCopyFile: SafeCopyFile /home/ue4/UnrealEngine/Engine/Programs/AutomationTool/Saved/Cook-2020.02.10-16.28.35.txt /home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/Cook-2020.02.10-16.28.57.txt
InternalUtils.SafeDeleteFile: SafeDeleteFile /home/ue4/UnrealEngine/Engine/Programs/AutomationTool/Saved/Cook-2020.02.10-16.28.35.txt
Log.WriteException: ==============================================================================
Log.WriteException: ERROR: Cook failed.
Log.WriteException:        (see /home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)
Log.WriteException: 
Log.WriteException: CommandletException: Editor terminated with exit code 139 (segmentation fault) while running Cook for /builds/project-0/Dreamcatcher/Dreamcatcher.uproject; see log /home/ue4/Library/Logs/Unreal Engine/LocalBuildLogs/Cook-2020.02.10-16.28.57.txt
Log.WriteException:   at AutomationTool.CommandUtils.RunCommandlet (Tools.DotNETCommon.FileReference ProjectName, System.String UE4Exe, System.String Commandlet, System.String Parameters, System.String& DestLogFile) [0x0076d] in <24a147dd91b247e1ac4c3b43a96c96e3>:0 
Log.WriteException:   at AutomationTool.CommandUtils.RunCommandlet (Tools.DotNETCommon.FileReference ProjectName, System.String UE4Exe, System.String Commandlet, System.String Parameters) [0x00001] in <24a147dd91b247e1ac4c3b43a96c96e3>:0 
Log.WriteException:   at AutomationTool.CommandUtils.CookCommandlet (Tools.DotNETCommon.FileReference ProjectName, System.String UE4Exe, System.String[] Maps, System.String[] Dirs, System.String InternationalizationPreset, System.String[] CulturesToCook, System.String TargetPlatform, System.String Parameters) [0x0013e] in <24a147dd91b247e1ac4c3b43a96c96e3>:0 
Log.WriteException:   at Project.Cook (AutomationTool.ProjectParams Params) [0x007ba] in <ceffa9e3a3664ec9972c2287d36ff5e2>:0 Wrapped by AutomationException: Cook failed.
Log.WriteException:   at Project.Cook (AutomationTool.ProjectParams Params) [0x007f7] in <ceffa9e3a3664ec9972c2287d36ff5e2>:0 
Log.WriteException:   at BuildCookRun.DoBuildCookRun (AutomationTool.ProjectParams Params) [0x00074] in <ceffa9e3a3664ec9972c2287d36ff5e2>:0 
Log.WriteException:   at BuildCookRun.ExecuteBuild () [0x00040] in <ceffa9e3a3664ec9972c2287d36ff5e2>:0 
Log.WriteException:   at AutomationTool.BuildCommand.Execute () [0x00001] in <24a147dd91b247e1ac4c3b43a96c96e3>:0 
Log.WriteException:   at AutomationTool.Automation.Execute (System.Collections.Generic.List`1[T] CommandsToExecute, System.Collections.Generic.Dictionary`2[TKey,TValue] Commands) [0x0007c] in <24a147dd91b247e1ac4c3b43a96c96e3>:0 
Log.WriteException:   at AutomationTool.Automation.Process (System.String[] Arguments, UnrealBuildTool.StartupTraceListener StartupListener) [0x00282] in <24a147dd91b247e1ac4c3b43a96c96e3>:0 
Log.WriteException:   at AutomationTool.Program.MainProc (System.String[] Arguments, UnrealBuildTool.StartupTraceListener StartupListener) [0x00001] in <e50303f0210a434eab4ab3c334bec706>:0 
Log.WriteException:   at AutomationTool.Program+<>c__DisplayClass1_0.<Main>b__2 () [0x00000] in <e50303f0210a434eab4ab3c334bec706>:0 
Log.WriteException:   at AutomationTool.InternalUtils.RunSingleInstance (System.Func`1[TResult] Main) [0x000a0] in <24a147dd91b247e1ac4c3b43a96c96e3>:0 
Log.WriteException:   at AutomationTool.Program.Main (System.String[] Arguments) [0x0020a] in <e50303f0210a434eab4ab3c334bec706>:0
Log.WriteException: ==============================================================================
Program.Main: AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

Looking at the more detailed log Cook-2020.02.10-16.28.35.txt these are the last lines (not very useful):

LogMaterial: Display: Missing cached shader map for material DefaultSpriteMaterial, compiling. 
LogMaterial: Display: Missing cached shader map for material DefaultSpriteMaterial, compiling. 

On windows, I can package this very same project correctly (using the windows containers), so my guess is that there is some missing library in the Linux containes, but I don’t know where to look honestly. Moreover, using ue4 package from the Linux host (and not from the Linux container) I’m able to package the project correctly. Any help is appreciated.

Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 25 (17 by maintainers)

Most upvoted comments

@avg07 please see @galeone’s comment for details on the appropriate command to run Xvfb: https://github.com/adamrehn/ue4-docker/issues/67#issuecomment-585124890. You will need to run this command and set the DISPLAY environment variable prior to running the ue4 package command, either by creating a Dockerfile that sets an appropriate ENTRYPOINT script or by running the commands interactively inside a container.

Why automatically running Xvfb with ue4cli? Isn’t the ue4cli just wrapping the ue4 editor and it’s independent of the running environment (with/without graphical framebuffer)?

You’re right, it’s not really part of ue4cli’s job to manage the environment, but I figure that automatically running Xvfb when it detects that you’re packaging a project that uses the WebBrowserWidget without a DISPLAY would make life easier for developers who encounter this issue. I don’t think I’d want to enable the behaviour by default though, probably just emit a warning providing the user with information about the problem and its solution unless they have specified a flag that enables the automatic behaviour.

For the docker part, I did something similar in the tests section of this article - you can reuse that code in your ue4-example-dockerfiles if you want

Awesome, thanks! I’ll be sure to credit you and link back to your blog post when I do. 😄