RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.81k stars 405 forks source link

dequeueBuffer: BufferQueue has been abandoned error on rooted device #301

Closed dineshvg closed 5 years ago

dineshvg commented 5 years ago

On a Nexus 5 rooted device using the FotoApparat to take a picture causes this error.

I am on a particular fragment and I take a picture and am trying to save the bitmap to show it in the next fragment.

09-25 12:07:39.837 24489-24506/? E/BufferQueueProducer: [unnamed-24489-0] dequeueBuffer: BufferQueue has been abandoned
09-25 12:07:39.837 24489-24624/? E/BufferQueueProducer: [unnamed-24489-0] dequeueBuffer: BufferQueue has been abandoned
09-25 12:07:39.837 24489-24678/? E/BufferQueueProducer: [unnamed-24489-0] dequeueBuffer: BufferQueue has been abandoned
09-25 12:07:39.838 24489-24505/? E/BufferQueueProducer: [unnamed-24489-0] dequeueBuffer: BufferQueue has been abandoned
09-25 12:07:39.838 24489-24506/? E/BufferQueueProducer: [unnamed-24489-0] dequeueBuffer: BufferQueue has been abandoned
09-25 12:07:39.838 24489-24624/? E/BufferQueueProducer: [unnamed-24489-0] dequeueBuffer: BufferQueue has been abandoned

Implemented code:

private void takePicture(WhenDoneListener<BitmapPhoto> callback) {
        fotoApp.takePicture()
                .toBitmap(
                        new Function1<Resolution, Resolution>() {
                            @Override
                            public Resolution invoke(Resolution resolution) {
                                return scaled((float) cameraView.getWidth() / (float) resolution.width).invoke(resolution);
                            }
                        }
                ).whenDone(callback);
    }

This works without any problem on non-rooted devices. Tested with Andorid 6-9.

dineshvg commented 5 years ago

Not an issue.