New error in iOS12: "Execution of the command buffer was aborted due to an error during execution"

We have an app that uses MTL to render. This app works correctly on devices running iOS11. When using the same app on devices running iOS12, we started getting glitches and sometimes hangs in the rendering. We also tried recompiling for iOS12 and are getting the same bad behavior. On the console we are getting the following different messages:


2018-09-22 09:22:29.508576-0500 OurApp [1286:84481] Execution of the command buffer was aborted due to an error during execution. Discarded (victim of GPU error/recovery) (IOAF code 5)


2018-09-22 09:29:55.654426-0500 OurApp [1286:84625] Execution of the command buffer was aborted due to an error during execution. Caused GPU Hang Error (IOAF code 3)



2018-09-22 09:34:37.718054-0500 OurApp [1286:87354] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (IOAF code 4)


With the first two messages the rendering seems glitchy, where a blank screen is presented and then finally the rendering occurs on screen. With the last message the rendering doesn't actually occur and the message continues being displayed until we move to a different view.


This app uses SceneKit, instantiates a SCNView and uses a default CIContext. It also uses the Physically Based Lighting model, which forces the MTL renderer to be used. The app has a simple SCNNode geometry, a cylinder. Each geometry object of the cylinder gets a normal texture (3 in total). The same diffuse, metalness and roughness values are applied to all the geometry objects of the cylinder.


Has anybody ran into this problem? If so, how did you solve it?


Thanks


UPDATE: After a lot of debugging it was found that using an image for environment lighting in a scene (for more realistic reflections) is what is causing the GPU errors. Without environment lighting the GPU errors do not exist. This isn't really a workaround as our app needs realistic reflections.

yup.


same issue here!

If the .exr file is removed and replace the lights with ambient light etc no issues whatsoever.


Have you filed a bug report?

BTW: the "workaround" is not "good" for us either as we need this enviromental lighting...


thanks

I had the same Problem on older devices. Disabling jittering on the view fixed it for me.

What is "jittering"? is it anialiasing?

same issue, if .exr file is removed, the snapshot works as normal.

Hi, meet the same error. But I don't find the .exr file. where is it?

have you solved it? I meet the same problem. But I didn't find the .exr file. where is it?

the file structure is:

Flower

Flower File

appdelegate.swift

art.scnassets

gamescene.scn

ViewController.swift

Main.storyboard

ProductInfo.sks

Assets.xcassets

LaunchScreen.storyboard

info.plist

Product file

flower.app

We are having this same issue. We found that using a jpg instead of an exr also stopped these errors (not ideal, but gave us reflections)

Unfortunately I've tried .jpg, .png and .hdr images for .lightingEnvironment and they all seem to fail with GPU hangs on iOS 12.1.2 on iPhone XS and iPhone XR (i.e., A12 processor). I've not seen the problem on pre-A12 processor devices like the older iPads or iPhones.

New error in iOS12: "Execution of the command buffer was aborted due to an error during execution"
 
 
Q