在做Android 开发时候,遇到一个奇怪问题:
// java.lang.IllegalStateException: Unable to release texture contents (see logcat for details)
// at android.graphics.SurfaceTexture.nativeReleaseTexImage(Native Method)
// at android.graphics.SurfaceTexture.releaseTexImage(SurfaceTexture.java:249)
出问题时候打印如下log信息:
GLConsumer: [SurfaceTexture-4-6668-1] checkAndUpdateEglState: invalid current EGLDisplay
monkey测试很容易出现问题。在执行release texture之前我们并没有去释放EglCore和EGLSurface。 不知道为何会出现这样的结果。