I got a little problem with having multiple preview output surfaces. I got 2 surfaces, GLSurfaceView and an ImageReader. What I tried so far;
remove the ImageReader as preview target [works great]
remove the GLSurfaceView leaving the imageReader alone [doesnt work]
putting the 2 together as preview target. [doesnt work]
last 2 things have the same issue, the imageReader receive image, but only 7 frames, after that an error is thrown in the setRepeating CaptureCallback which has a failure reason REASON_ERROR.
I am sure they both share the same size 1024 x 768
Im still not sure why but after acquiring the image by calling acquireNextImage(), the error was gone. By the way, you need to close the acquire image.