iOS Metal-based build crashes at launch

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)

SmallShake,

Thank you for creating such a thorough post. I went through your reproduction steps and pushed it to my iPad Air which is on iOS version 8.0. I did not receive a crash, I attempted this quite a few times by launch, package and by the project launcher steps that you provided, to see if there was a difference. Since I was unable to replicate this crash, would you zip a sample project up that it has occurred on so I can test your project.

Have you noticed this happening more in source or binary, or both the same?

Thanks!

Hi ,

Thanks for your interest in this issue. I’ve done some more tests and can provide more info now:

  • first to answer your question - I can’t comment on the frequency of the crash based on engine type, as I only tried it very few times on the binary version, but it seems that the engine type doesn’t matter.
  • I asked another developer on my team to go through the steps I listed in the original post (just to be sure I’m not going mad) and thankfully he reported seeing the same exact crash (this was on the same iPad Air 9.3).
  • Then I managed to get my hands on more devices and observed the following:
    • the crash occured on an iPhone 6+ with iOS 9.0
    • the crash did not occur on iPod 5th gen with iOS 8.3

The above makes me believe that this issue is specific to devices with iOS 9.x and that is probably why you didn’t see it happening on your end.

Additionally, just to be sure, i have zipped and uploaded the [test project I’ve been using][1].

https://…com/open?id=0B3ew2vsh0ccXc2IzZlEwdUhaaG8

Hey SmallShake,

I was able to reproduce it on devices over iOS version 9.0 (9.3.1 to be exact). The other devices I tested on were below 9.0 and the crash did not occur. I went ahead and submitted a for this issue. If you’d like to know if there has been any progress made on this issue, please refer to UE-30847.

Thanks!

Hi ,

any word on this issue? Has it maybe been fixed in 4.12?

Thanks,
smallshake

This hasn’t been fixed yet, it’s a priority 2 and it’s on our to do list. Thanks!

Its 2024 and we are still having this issue. In 2016 it was a priority 2. Any word on the solution to this?