Reputation: 11
I'm investigating the issue with application hang. The issue is only reproducible on Samsung S22 with adaptive fps feature ON. My app uses opengl to render its content. Also we use VideoView widget from Android SDK to playback some short movies. The problem occurs in a moment while video playback is paused and moved out of the screen. As I can see, my app's native render thread hangs on eglSwapBuffers
call.
As I understand, Android render works roughly as following:
eglSwapBuffers
. This involves queueBuffer()
passing the data to SurfaceFlinger's BufferQueue, then waits for next free buffer in dequeueBuffer()
.acquireBuffer()
and pass it to the consumer (HWC I guess?).releaseBufferCallback()
From systrace dump I can see that at some point the SurfaceFlinger stops processing queued buffers, BufferQueue raises to its maximum and application hangs trying to dequeue next free buffer at eglSwapBuffers call. No more acquireBuffer()
or releaseBufferCallback()
happens.
The questions are: who is a Consumer side? How can I track which system fails? Why may SurfaceFlinger stop processing buffers?
Any suggestions are highly appreciated! Best regards!
Upvotes: 1
Views: 981