iOS Metal-based build crashes at launch

SmallShake
Fri, 13 May 2016 15:37:29 +0000
World Creation

Hi,

I encountered a crash when deploying a game to iOS with Metal enabled. It seems to only happen if I have a sub-level added to my starting level.

The crash occurs on startup, in Metal-related code, with the following message:

May 13 16:53:05 iPad-rgrabowski UE4Game[278] <Warning>: Fatal error: [File:/Users/build/BuildFarm/build_++UE4+Release-4.11/Engine/Source/Runtime/Apple/MetalRHI/Private/MetalCommandList.cpp] [Line: 51]
Command Buffer SlateUI Failure! Error Domain: MTLCommandBufferErrorDomain Code: 2 Description Caused GPU Hang Error (IOAF code 3) Unknown Unknown

There are rare cases when a build actually starts the first time after deploying, but the following tries always result in a crash. Overall repro rate on my side is estimated to be around 9/10 (maybe 2 or 3 clean starts out of a couple dozen attempts).

More details of the process and environment:
Engine version: UE4 4.11.2 (tried both the binary version downloaded from launcher and a source version from GitHub, tag 4.11.2-release)
Build process: remote build from a Windows machine on a networked Mac builder
Mac software: OS X 10.11.4, XCode 7.3, iPhone SDK 9.3
iOS device: iPad Air with iOS 9.1 or 9.3.1 (these are the two I tried)

I have been able to reproduce this also in a clean, template-based project with the following steps:

 1. Install a clean UE4 4.11.2 from the launcher.
 2. Create a project from the BP First Person template, with the "Mobile/Tablet", "Maximum Quality" and "No starter content" options.
 3. Create an empty level somewhere in the project.
 4. With the default level open (FirstPersonExampleMap), add the newly created empty level to the level list (by simply dragging it onto the list), so that it becomes a sub-level of the default level.
 5. In the options for the newly added sub-level, select the "Initially Loaded" and "Initially Visible" options.
 6. Save the project.
 7. Setup a bundle identifier, provisioning profile and certificate for development builds.
 8. In Project Launcher, create a custom Launch Profile with Build = disabled, Cook = by the book (only iOS), Package = do not package, Deploy = Copy to device, Launch = do not launch. Leave default values for other options.
 9. Use the created Launch Profile to deploy the project to a device.
 10. Launch the build on the device - observe the crash during the startup sequence (while the splash screen is displayed).

I’m attaching a [full log][1] from a clean project created this way, from startup to crash.

I hope this is enough information to reproduce this issue. If you need anything more, feel free to ask. I can also zip and upload the full project if required, but the repro steps should probably be sufficient to reproduce the issue.

Looking forward to hearing from you,

smallshake

90446-ios_crash_log.txt (39 KB)

7 posts - 3 participants