title: EGL API19 fine, but >API 21 got error 3008
body: <p>Thank you for your reading!</p>
  
  <p>I use the github project GLRecorder as a library and put it to my project for recording.</p>
  
  <p>GLRecorder :<a href="https://github.com/lokii/GLRecorder" rel="nofollow noreferrer">https://github.com/lokii/GLRecorder</a></p>
  
  <p>I could run it on my api 19 android phone.But I run it on api 21 to api 25, they all got crashing!</p>
  
  <p><strong>Error Info:</strong></p>
  
  <blockquote>
    <p>E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY) Process:
    com.example.chankim.vrcam, PID: 5812
                                                                             java.lang.RuntimeException: eglCreateWindowSurface: EGL error: 0x3008
                                                                                 at
    com.research.GLRecorder.gles.EglCore.checkEglError(EglCore.java:209)
                                                                                 at
    com.research.GLRecorder.gles.EglCore.createWindowSurface(EglCore.java:72)
                                                                                 at
    com.research.GLRecorder.gles.EglSurfaceBase.createWindowSurface(EglSurfaceBase.java:64)
                                                                                 at
    com.research.GLRecorder.gles.WindowSurface.(WindowSurface.java:41)
                                                                                 at
    com.research.GLRecorder.GLRecorder.startEncoder(GLRecorder.java:234)
                                                                                 at
    com.research.GLRecorder.GLRecorder.setRecordingEnabled(GLRecorder.java:147)
                                                                                 at
    com.research.GLRecorder.GLRecorder.startRecording(GLRecorder.java:128)
                                                                                 at
    com.example.chankim.vrcam.MainActivity.changeIcon(MainActivity.java:319)
                                                                                 at
    com.example.chankim.vrcam.MainActivity$8.onClick(MainActivity.java:178)
                                                                                 at android.view.View.performClick(View.java:5204)
                                                                                 at android.view.View$PerformClick.run(View.java:21153)
                                                                                 at android.os.Handler.handleCallback(Handler.java:739)
                                                                                 at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                 at android.os.Looper.loop(Looper.java:148)
                                                                                 at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                                 at
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)</p>
  </blockquote>
  
  <p>so how could I solve this?</p>