natario1/CameraView

IllegalStateException: Unable to update texture contents

EzequielAdrianM opened this issue · 3 comments

This issue is appearing in multiple android versions and multiple devices in my production environment.

Exception java.lang.IllegalStateException: Unable to update texture contents (see logcat for details)
  at android.graphics.SurfaceTexture.nativeUpdateTexImage (SurfaceTexture.java)
  at android.graphics.SurfaceTexture.updateTexImage (SurfaceTexture.java:249)
  at com.otaliastudios.cameraview.overlay.OverlayDrawer.draw (OverlayDrawer.java:81)
  at com.otaliastudios.cameraview.video.encoding.TextureMediaEncoder.onFrame (TextureMediaEncoder.java:218)
  at com.otaliastudios.cameraview.video.encoding.TextureMediaEncoder.onEvent (TextureMediaEncoder.java:146)
  at com.otaliastudios.cameraview.video.encoding.MediaEncoder$3.run (MediaEncoder.java:244)
  at android.os.Handler.handleCallback (Handler.java:955)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loopOnce (Looper.java:206)
  at android.os.Looper.loop (Looper.java:296)
  at android.os.HandlerThread.run (HandlerThread.java:67)

Unfortunately this is making the app crash. Please take a look if you have some time.

I don't unfortunately, but a try-catch seems like the right thing to do.

Just passing here to inform you that I've created a fork with some try/catch fix. I will be temporarily implementing this fix in my production environment, if fix is successful, I will update you here.

EzequielAdrianM@8f250d1

Pull Request here: #1232