Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

This is an out of memory problem as it is indicated here:

11-08 18:28:31.347: W/Adreno-ES20(4749): <gl2_surface_swap:43>: GL_OUT_OF_MEMORY

android.view.Surface is making more updates then the GPU can handle. I am not sure that you can even try-catch this one.
I also believe that on many devices where there is no crash the users will experience occasional UI lags.

I faced a similar problem a few years ago. In my case, it was primarily lags, but I believe that the problem is the same.

To solve it I added a counter to measure the frame rate. I saw that the frame rate is high but then all of a sudden it falls badly, so I applied a balance-logic to search for the highest FPS that will not lag.

  • Start with 60 FPS
  • If its lags, divide the FPS by 2
  • If it's not, then set it to average between the last value and the current.
  • repeat until you are happy ;)

It's basically a binary search for the perfect FPS.

In your case, it's a bit more tricky, since you experience crashes, so you will have to persist the FPS counter, and be more careful with the search.

Send FPS logs to your server. Once you have enough data, you can be smarter with the FPS staring point per device module.

As far as putting your hands on the WebView SurfaceView I guess this is not trivial as well, but we are talking about Android 4.4.2, so there nothing you can't do with reflection :)