Program: 35745
Project: 35745
Buggy source:
private void glRun(){
  EglHelper egl=new EglHelper();
  boolean ret=egl.createGLESWithSurface(new EGLConfigAttrs(),new EGLContextAttrs(),new SurfaceTexture(1));
  if (!ret) {
    return;
  }
  int mInputSurfaceTextureId=GpuUtils.createTextureID(true);
  SurfaceTexture mInputSurfaceTexture=new SurfaceTexture(mInputSurfaceTextureId);
  Point size=mProvider.open(mInputSurfaceTexture);
  AvLog.d(TAG,"String_Node_Str" + size.x + "String_Node_Str"+ size.y);
  if (size.x <= 0 || size.y <= 0) {
    destroyGL(egl);
synchronized (LOCK) {
      LOCK.notifyAll();
    }
    return;
  }
  int mSourceWidth=size.x;
  int mSourceHeight=size.y;
synchronized (LOCK) {
    LOCK.notifyAll();
  }
  if (mSourceWidth <= 0 || mSourceHeight <= 0) {
    error(1,"String_Node_Str");
    return;
  }
  if (mRenderer == null) {
    mRenderer=new WrapRenderer(null);
  }
  FrameBuffer sourceFrame=new FrameBuffer();
  mRenderer.create();
  mRenderer.sizeChanged(mSourceWidth,mSourceHeight);
  mRenderer.setFlag(mProvider.isLandscape() ? WrapRenderer.TYPE_CAMERA : WrapRenderer.TYPE_MOVE);
  RenderBean rb=new RenderBean();
  rb.egl=egl;
  rb.sourceWidth=mSourceWidth;
  rb.sourceHeight=mSourceHeight;
  rb.endFlag=false;
  rb.threadId=Thread.currentThread().getId();
  AvLog.d(TAG,"String_Node_Str");
  while (!mProvider.frame() && mGLThreadFlag) {
    mInputSurfaceTexture.updateTexImage();
    mInputSurfaceTexture.getTransformMatrix(mRenderer.getTextureMatrix());
    AvLog.d(TAG,"String_Node_Str" + mInputSurfaceTexture.getTimestamp());
    sourceFrame.bindFrameBuffer(mSourceWidth,mSourceHeight);
    GLES20.glViewport(0,0,mSourceWidth,mSourceHeight);
    mRenderer.draw(mInputSurfaceTextureId);
    sourceFrame.unBindFrameBuffer();
    rb.textureId=sourceFrame.getCacheTextureId();
    rb.timeStamp=mProvider.getTimeStamp();
    rb.textureTime=mInputSurfaceTexture.getTimestamp();
    observable.notify(rb);
  }
  AvLog.d(TAG,"String_Node_Str");
synchronized (LOCK) {
    rb.endFlag=true;
    observable.notify(rb);
    destroyGL(egl);
    LOCK.notifyAll();
    AvLog.d(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
private void glRun(){
  EglHelper egl=new EglHelper();
  boolean ret=egl.createGLESWithSurface(new EGLConfigAttrs(),new EGLContextAttrs(),new SurfaceTexture(1));
  if (!ret) {
    return;
  }
  int mInputSurfaceTextureId=GpuUtils.createTextureID(true);
  SurfaceTexture mInputSurfaceTexture=new SurfaceTexture(mInputSurfaceTextureId);
  Point size=mProvider.open(mInputSurfaceTexture);
  AvLog.d(TAG,"String_Node_Str" + size.x + "String_Node_Str"+ size.y);
  if (size.x <= 0 || size.y <= 0) {
    destroyGL(egl);
synchronized (LOCK) {
      LOCK.notifyAll();
    }
    return;
  }
  int mSourceWidth=size.x;
  int mSourceHeight=size.y;
synchronized (LOCK) {
    LOCK.notifyAll();
  }
  if (mSourceWidth <= 0 || mSourceHeight <= 0) {
    error(1,"String_Node_Str");
    return;
  }
  if (mRenderer == null) {
    mRenderer=new WrapRenderer(null);
  }
  FrameBuffer sourceFrame=new FrameBuffer();
  mRenderer.create();
  mRenderer.sizeChanged(mSourceWidth,mSourceHeight);
  mRenderer.setFlag(mProvider.isLandscape() ? WrapRenderer.TYPE_CAMERA : WrapRenderer.TYPE_MOVE);
  RenderBean rb=new RenderBean();
  rb.egl=egl;
  rb.sourceWidth=mSourceWidth;
  rb.sourceHeight=mSourceHeight;
  rb.endFlag=false;
  rb.threadId=Thread.currentThread().getId();
  AvLog.d(TAG,"String_Node_Str");
  while (!mProvider.frame() && mGLThreadFlag) {
    mInputSurfaceTexture.updateTexImage();
    mInputSurfaceTexture.getTransformMatrix(mRenderer.getTextureMatrix());
    AvLog.d(TAG,"String_Node_Str" + mInputSurfaceTexture.getTimestamp());
    sourceFrame.bindFrameBuffer(mSourceWidth,mSourceHeight);
    GLES20.glViewport(0,0,mSourceWidth,mSourceHeight);
    mRenderer.draw(mInputSurfaceTextureId);
    sourceFrame.unBindFrameBuffer();
    rb.textureId=sourceFrame.getCacheTextureId();
    rb.timeStamp=mProvider.getTimeStamp();
    rb.textureTime=mInputSurfaceTexture.getTimestamp();
    observable.notify(rb);
  }
  AvLog.d(TAG,"String_Node_Str");
synchronized (LOCK) {
    rb.endFlag=true;
    observable.notify(rb);
    mRenderer.destroy();
    destroyGL(egl);
    LOCK.notifyAll();
    AvLog.d(TAG,"String_Node_Str");
  }
}