java.lang.RuntimeException: eglSwapBuffers failed: EGL_SUCCESS

后端 未结 4 527
伪装坚强ぢ
伪装坚强ぢ 2021-02-07 00:34

I\'ve an OpenGL application in the Google Play Store and I\'m facing a daily exception:

java.lang.RuntimeException: eglSwapBuffers failed: EGL_SUCCESS
at android         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-07 00:55

    The solution I ended up implementing was to add a global exception handler to catch this error (since it's thrown outside of any thread I have control over).

    Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {...})
    

    So at least the application doesn't crash and I can put up a message explaining the situation.

提交回复
热议问题