dzl
dzl

Reputation: 906

gpus_ReturnGuiltyForHardwareRestart Crash in [EAGLContext presentRenderbuffer]

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:

What we have tried so far:

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


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:]

Upvotes: 19

Views: 1530

Answers (1)

Arkadi Tolkun
Arkadi Tolkun

Reputation: 76

From my experience I get this sort of crashes in these cases:

  1. Calling OpenGL API when application is in UIApplicationStateBackground state.
  2. Using objects (textures, VBO, etc) that was created in OpenGL context that have different shareGroup. This can happened if you don't call [EAGLContext setCurrentContext:..] before rendering or other work with OpenGL object.
  3. Invalid geometry. For example this can happened if you allocate index buffer for bigger size that you need. Fill it with some values and then try to render with size that was used at allocation. Sometimes this works (tail of buffer is filled with 0, and you don't see any visual glitches). Sometimes it will crash (when tail of buffer filled with junk, and reference to point that is out of bounds).

Hope this helps in some way.

P.S. Maybe you tell some more info about your application? I write application that render vector maps at iOS and don't face any troubles with iOS 11 at this moment. Rendering pipeline is pretty simple CADisplayLink call our callback on main thread when we can render next frame. Each view with OpenGL scene can have several background contexts to load resources in background (ofc it have same shareGroup with main context).

Upvotes: 2

Related Questions