android-Camera2Basic icon indicating copy to clipboard operation
android-Camera2Basic copied to clipboard

"BufferQueue has been abandoned" Errors in LogCat

Open commonsguy opened this issue 11 years ago • 4 comments

To reproduce this, run the app (tested on Nexus 7 2013 running Android 5.1), then press the BACK button to exit the app. Lines like the following will appear in LogCat:

05-07 16:02:31.527  14879-14895/com.example.android.camera2basic E/BufferQueueProducer﹕ [unnamed-14879-2] queueBuffer: BufferQueue has been abandoned
05-07 16:02:31.595  14879-14992/com.example.android.camera2basic E/BufferQueueProducer﹕ [unnamed-14879-2] queueBuffer: BufferQueue has been abandoned
05-07 16:02:31.661  14879-14896/com.example.android.camera2basic E/BufferQueueProducer﹕ [unnamed-14879-2] queueBuffer: BufferQueue has been abandoned
05-07 16:02:31.728  14879-14895/com.example.android.camera2basic E/BufferQueueProducer﹕ [unnamed-14879-2] queueBuffer: BufferQueue has been abandoned
05-07 16:02:31.796  14879-14992/com.example.android.camera2basic E/BufferQueueProducer﹕ [unnamed-14879-2] queueBuffer: BufferQueue has been abandoned

Based on some experiments, it appears that these messages come about after the CameraDevice is closed in closeCamera().

Do you know how we can get rid of those messages?

Thanks!

commonsguy avatar May 07 '15 20:05 commonsguy

FYI, also reproducible on a Nexus 4 running Android 5.1. Not reproducible on a Nexus 5 or a Nexus 6, also running Android 5.1.

commonsguy avatar May 07 '15 20:05 commonsguy

I'm seeing this issue as well on some devices. It's getting even worse. If I try to create a new CaptureSession then this error occurs:

BufferQueueProducer [unnamed-2556-0] connect(P): already connected (cur=4 req=4)

In the disconnect method in BufferQueueProdcuer.cpp I can see this line:

if (mCore->mIsAbandoned) {
    // It's not really an error to disconnect after the surface has
    // been abandoned; it should just be a no-op.
    return NO_ERROR;
}

vRallev avatar May 13 '15 07:05 vRallev

I am facing the same issue now as well. How you solved it @commonsguy @vRallev

AishwaryaSurana avatar Aug 01 '18 07:08 AishwaryaSurana

This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).

As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.

If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!

codingjeremy avatar Sep 19 '19 23:09 codingjeremy