Sunday, October 15, 2017

gpus_ReturnGuiltyForHardwareRestart Crash in [EAGLContext presentRenderbuffer]

Leave a Comment

I'm getting a lot of crashes in EAGLContext presentRenderbuffer on iOS 11, but only on iPhone 6/6+ and older.

As per this post, I think we've already ruled out VBO-related problems by rewriting everything to not use VBO/VAOs, but the crash wasn't fixed by that.

There are a few other questions on SO about this but no solution -- has anyone else been seeing the uptick in this crash and been able to resolve it?


TL;DR:

Here is what we know so far:

  • The crash is specific to iOS11, iPhone 5S/6/6+. It doesn’t occur on 6S and up.
  • The core of the OpenGL stack returns gpus_ReturnGuiltyForHardwareRestart
  • It occurs when we attempt to invoke [EAGLContext presentRenderbuffer] from a CAEAGLLayer
  • We don’t have a repro.

What we have tried so far:

  • Remove any reference to VBO/VAO in our rendering stack. Didn’t help.
  • We have tried reproing with a large range of drawing scenarios (rotation, resize, background/foreground). No luck.
  • As far as we can tell, there is nothing specific in our application logic between the iPhone 6 family and the iPhone 6S family.

Some clues (that could be relevant but not necessarily):

  • We know that when the presentRenderBuffer is invoked off main thread, and some CATransaction are occurring at the same time on the main thread, the crash rate goes up.
  • When presentRenderBuffer is invoked on main thread (along with the whole drawing pipeline), the crash rate goes slightly down but not drastically.
  • A substantial chunk (~20%) of the crashes occurs when the layer goes off screen and/or gets out of the view hierarchy.

Here is the stack trace:

  libGPUSupportMercury.dylib gpus_ReturnGuiltyForHardwareRestart  1 AGXGLDriver gldUpdateDispatch 2 libGPUSupportMercury.dylib gpusSubmitDataBuffers 3 AGXGLDriver gldUpdateDispatch 4 GLEngine gliPresentViewES_Exec 5 OpenGLES -[EAGLContext presentRenderbuffer:] 

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment