# Chapter 20 GPU Error and App Crash

**URL:** <https://forums.kodeco.com/t/chapter-20-gpu-error-and-app-crash/69358>\
**Category:** ARKit by Tutorials\
**Created:** [May 2, 2019, 8:00pm UTC](https://forums.kodeco.com/t/chapter-20-gpu-error-and-app-crash/69358 "2019-05-02T20:00:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmmiller](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bmmiller/32/81494_2.png) [@bmmiller](https://forums.kodeco.com/u/bmmiller)\
**Post date:** [May 2, 2019, 8:00pm UTC](https://forums.kodeco.com/t/chapter-20-gpu-error-and-app-crash/69358/1 "2019-05-02T20:00:45Z")

</div>

When running the project on my device, and pressing the “Start Game” button, the screen goes black and an error message displays in the debug console.

xcode execution of the command buffer was aborted due to an error during execution caused gpu hang error ioaf code 3

If I comment out the isHidden = true for either the truckNode or the groundNode I do not get the error, but obviously both are needed for the app to be of use. Additionally, if I comment out the line:

scene.lightingEnvironment.contents = “MonsterTruck.scnassets/Textures/Environment\_CUBE.jpg”

in the initScene method, it seems to work, but then the truck is completely black.

Thoughts?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [May 3, 2019, 7:23am UTC](https://forums.kodeco.com/t/chapter-20-gpu-error-and-app-crash/69358/2 "2019-05-03T07:23:11Z")

</div>

@bmmiller Does this happen when you run the chapter sample project?

---

<div class="post-metadata">

**Author:** ![bmmiller](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bmmiller/32/81494_2.png) [@bmmiller](https://forums.kodeco.com/u/bmmiller)\
**Post date:** [May 3, 2019, 3:50pm UTC](https://forums.kodeco.com/t/chapter-20-gpu-error-and-app-crash/69358/3 "2019-05-03T15:50:03Z")

</div>

It does occur with the sample project. Though, I should have prefaced that I have been working through all of the projects, changing the target iOS version to 12, and overall no issues.

For this one, though, changing back to 11 allowed both the sample and my working projects to work as expected. I’m guessing it’s an iOS 12 issue.

That said, is there a better way of accomplishing or getting around this issue for 12? I mean, if I were to build something using similar techniques for a personal project?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 9, 2019, 12:08am UTC](https://forums.kodeco.com/t/chapter-20-gpu-error-and-app-crash/69358/4 "2019-07-09T00:08:46Z")

</div>

@chrislanguage Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![chrislanguage](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/chrislanguage/32/104184_2.png) [@chrislanguage](https://forums.kodeco.com/u/chrislanguage)\
**Post date:** [July 9, 2019, 8:25am UTC](https://forums.kodeco.com/t/chapter-20-gpu-error-and-app-crash/69358/5 "2019-07-09T08:25:00Z")

</div>

Hi there, we’re currently in the process of updating the book and source-code to support iOS13. I will take extra special notice with that chapter.

In the meantime, instead of supplying an environment texture manually, just use ARKit’s one instead. Just add this line of code when setting up the AR config.

```auto
if #available(iOS 12.0, *) { config.environmentTexturing = .automatic }

```
