Cooking for IOS Crashes

Using Unreal Engine 4.12.0 source editor, trying to package for IOS the packaging process will crash on the Cook command stage every time.

The Cook section constantly crashes. I’ve attached the output for the Cook command section when it crashes. The building process still continues on afterwards. However, at the end, the automation tool outputs the following:
link text

Project.Archive: ********** ARCHIVE
COMMAND STARTED **********
Program.Main: ERROR: AutomationTool
terminated with exception:
System.ArgumentOutOfRangeException:
Cannot be negative, and should not
exceed length of string. Parameter
name: startIndex at
System.String.IndexOf (System.String
value, Int32 startIndex, Int32 count)
[0x00000] in :0
at System.String.IndexOf
(System.String value, Int32
startIndex) [0x00000] in unknown>:0 at
IOSPlatform.GetFilesToArchive
(AutomationTool.ProjectParams Params,
DeploymentContext SC) [0x00000] in
:0 at
Project.CreateArchiveManifest
(AutomationTool.ProjectParams Params,
DeploymentContext SC) [0x00000] in
:0 at
Project.Archive
(AutomationTool.ProjectParams Params)
[0x00000] in :0
at BuildCookRun.DoBuildCookRun
(AutomationTool.ProjectParams Params)
[0x00000] in :0
at BuildCookRun.ExecuteBuild ()
[0x00000] in :0
at AutomationTool.BuildCommand.Execute
() [0x00000] in :0
at AutomationTool.Automation.Execute
(System.Collections.Generic.List1 CommandsToExecute, Tools.DotNETCommon.CaselessDictionary.CaselessDictionary1
Commands) [0x00000] in unknown>:0 at
AutomationTool.Automation.Process
(System.String CommandLine)
[0x00000] in :0
at AutomationTool.Program.MainProc
(System.Object Param) [0x00000] in
:0 at
AutomationTool.InternalUtils.RunSingleInstance
(System.Func`2 Main, System.Object
Param) [0x00000] in unknown>:0 at
AutomationTool.Program.Main ()
[0x00000] in :0
Program.Main: AutomationTool exiting
with ExitCode=1 (Error_Unknown)
Domain_ProcessExit RunUAT ERROR:
AutomationTool was unable to run
successfully.

Any way around this? Without the cook process working, my project is at a standstill.

I’ve also attached the minidump.link text

Checking the log of the project when the crash happens seems to output the following:

Appending System Log:
Jun 20 08:34:58 Yusufs-iMac UE4Editor[5528]: _SubscribeForMuxNotifications (thread 0x700002220000): returned 0x0.
Jun 20 08:34:58 Yusufs-iMac UE4Editor[5528]: AMDeviceNotificationSubscribeWithOptions (thread 0x700002220000): returned 0x0.
Jun 20 08:35:01 Yusufs-iMac UE4Editor[5528]: _AMDDeviceAttachedCallbackv3 (thread 0x700002220000): Device ‘AMDevice 0x7fb179e3c580 {UDID = 3c38a2dbd3efcee70075b08b63c2c64f4a5b3407, device ID = 1, location ID = 0x14100000, product ID = 0x12a8}’ attached.
Jun 20 08:35:02 Yusufs-iMac UE4Editor[5528]: AMDeviceStopSession (thread 0x700002220000): returned 0x0 for device 1
Jun 20 08:35:06 — last message repeated 1 time —
Jun 20 08:35:06 Yusufs-iMac launchservicesd[74]: SecTaskLoadEntitlements failed error=22

Hi Sabun,

When see the AutomationTool fails, the error is listed further up the log under Error/Warning Summary; typically the first one or more items. Please post the rest of your Output log (View ouput log, right-click to clear, then package.) Cut n paste entire contents in a text file and search for all instances of “error.”

If you cannot identify the problem yourself, post the entire log here and we’ll try to help.

.

Hi , just to clarify, I’m packaging through the command line Terminal and not through the editor (the editor on Mac crashes at 93% on start up every time with a null reference at LogMac: FTextFormatHelper::Format).

I’ve attached the full output log during the cook and package process.
link text

This is also the full Crash Report folder for your inspection:
link text

I run the following commands. First I run this to build the necessary dylibs:
/bin/sh /Users/imac/UE4-4.12.0-Source/Engine/Build/BatchFiles/Mac/RunMono.sh /Users/imac/UE4-4.12.0-Source/Engine/Binaries/DotNET/UnrealBuildTool.exe ProjectXYZEditor Mac Development /Users/imac/Desktop/TEMP/ProjectXYZ/ProjectXYZ.uproject

Then, I run the IPP to validate the cert and provision:
/bin/sh /Users/imac/UE4-4.12.0-Source/Engine/Build/BatchFiles/Mac/RunMono.sh /Users/imac/UE4-4.12.0-Source/Engine/Binaries/DotNET/IOS/IPhonePackager.exe Validate Engine -project /Users/imac/Desktop/TEMP/ProjectXYZ/ProjectXYZ.uproject -bundlename com.company.game.projectxyz

Lastly, I run the build command to cook and package for IOS:
/Users/imac/UE4-4.12.0-Source/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -nocompileeditor -nop4 -project=/Users/imac/Desktop/TEMP/ProjectXYZ/ProjectXYZ.uproject -cook -stage -archive -archivedirectory=/Users/imac/Desktop/TEMP/Build -package -clientconfig=Shipping -ue4exe=UE4Editor -clean -compressed -pak -prereqs -distribution -nodebuginfo -targetplatform=IOS -build -CrashReporter -utf8output

Additional info:
MacOSX SDK 10.11
Iphone SDK 9.3

Imac 21.5" Late 2015
OS X 10.11.5
Intel i5 2.8GHz
16GB DDR3 1867MHz
Intel Iris Pro Graphics 6200
Unreal Engine 4.12.0 Source version from Github.

Please let me know if there’s anything else you want to know or would like me to try.

Upon further inspection, your logs indicate that you are using SSH and failing to login successfully.

It looks like the you will need to go into System Preferences > Sharing > Remote Login and allow access for all.

Source: How can a Standard user use ssh / sftp on Lion Server

Also, you may need to add 'sudo ’ to the beginning of your terminal command. Running a command with sudo will execute the command as a root user and you will have more permissions than a standard user.