[ ] An Observatory debugger and profiler on Redmi Note 8 Pro is available at: http://127.0.0.1:62833/Db369jd81Ig=/
[ +836 ms] E/ion ( 7463): ioctl c0044901 failed with code -1: Invalid argument
[ +29 ms] The Flutter DevTools debugger and profiler on Redmi Note 8 Pro is available at: http://127.0.0.1:9102?uri=http://127.0.0.1:62833/Db369jd81Ig=/
[+2168 ms] I/BufferQueueConsumer( 7463): [](id:1d2700000000,api:0,p:-1,c:7463) connect(): controlledByApp=true
[ +23 ms] V/PhoneWindow( 7463): DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@9d812f7, this = DecorView@8d18564[MainActivity]
[ +13 ms] I/BufferQueueConsumer( 7463): [](id:1d2700000001,api:0,p:-1,c:7463) connect(): controlledByApp=true
[ ] W/Camera ( 7463): The selected imageFormatGroup is not supported by Android. Defaulting to yuv420
[ ] I/BufferQueueConsumer( 7463): [](id:1d2700000002,api:0,p:-1,c:7463) connect(): controlledByApp=true
[ +3 ms] E/libc ( 7463): Access denied finding property "persist.vendor.camera.privapp.list"
[ +7 ms] E/CameraManagerGlobal( 7463): Camera 61 is not available. Ignore physical camera status change
[ +5 ms] W/CameraManagerGlobal( 7463): ignore the torch status update of camera: 21
[ ] W/CameraManagerGlobal( 7463): ignore the torch status update of camera: 22
[ ] W/CameraManagerGlobal( 7463): ignore the torch status update of camera: 61
[ +3 ms] I/Camera ( 7463): startPreview
[ +87 ms] I/BufferQueueProducer( 7463): [SurfaceTexture-0-7463-0](id:1d2700000000,api:4,p:845,c:7463) connect(): api=4 producerControlledByApp=true
[ ] I/BufferQueueProducer( 7463): [ImageReader-640x480f100m1-7463-0](id:1d2700000001,api:4,p:845,c:7463) connect(): api=4
producerControlledByApp=false
[ +5 ms] I/Camera ( 7463): CameraCaptureSession onConfigured
[ ] I/Camera ( 7463): Updating builder settings
[ ] D/Camera ( 7463): Updating builder with feature: ExposureLockFeature
[ ] D/Camera ( 7463): Updating builder with feature: ExposurePointFeature
[ ] D/Camera ( 7463): Updating builder with feature: ZoomLevelFeature
[ ] D/Camera ( 7463): Updating builder with feature: AutoFocusFeature
[ ] D/Camera ( 7463): Updating builder with feature: NoiseReductionFeature
[ ] I/Camera ( 7463): updateNoiseReduction | currentSetting: fast
[ ] D/Camera ( 7463): Updating builder with feature: FocusPointFeature
[ ] D/Camera ( 7463): Updating builder with feature: ResolutionFeature
[ ] D/Camera ( 7463): Updating builder with feature: SensorOrientationFeature
[ ] D/Camera ( 7463): Updating builder with feature: FlashFeature
[ ] D/Camera ( 7463): Updating builder with feature: ExposureOffsetFeature
[ +1 ms] D/Camera ( 7463): Updating builder with feature: FpsRangeFeature
[ ] I/Camera ( 7463): refreshPreviewCaptureSession
[ +400 ms] I/mali_config( 7463): @get_buffer_dataspace_setting: update dataspace (0x10020000 -> 0x08020000)
[ +66 ms] I/mali_config( 7463): @get_buffer_dataspace_setting: update dataspace (0x10020000 -> 0x08020000)
[ +83 ms] I/mali_config( 7463): @get_buffer_dataspace_setting: update dataspace (0x10020000 -> 0x08020000)
[ +66 ms] I/mali_config( 7463): @get_buffer_dataspace_setting: update dataspace (0x10020000 -> 0x08020000)
[ +66 ms] I/mali_config( 7463): @get_buffer_dataspace_setting: update dataspace (0x10020000 -> 0x08020000)
[ +66 ms] I/mali_config( 7463): @get_buffer_dataspace_setting: update dataspace (0x10020000 -> 0x08020000)
[ +451 ms] I/mali_config( 7463): @get_buffer_dataspace_setting: update dataspace (0x10020000 -> 0x08020000)
[ +586 ms] I/mali_config( 7463): @get_buffer_dataspace_setting: update dataspace (0x10020000 -> 0x08020000)
[+2107 ms] I/r_application_( 7463): ProcessProfilingInfo new_methods=0 is saved saved_to_disk=0 resolve_classes_delay=8000
[ +378 ms] I/Camera ( 7463): runPictureAutoFocus
[ ] I/Camera ( 7463): lockAutoFocus
[ +7 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +7 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +7 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: null | aeState: null
[ +21 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +6 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +8 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: null | aeState: null
[ +18 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +11 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +7 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: null | aeState: null
[ +18 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +12 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +5 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: null | aeState: null
[ +14 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +6 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
[ +8 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: null | aeState: null
[ +24 ms] D/CameraCaptureCallback( 7463): CameraCaptureCallback | state: STATE_WAITING_FOCUS | afState: 2 | aeState: 2
Hi! I found a bug on my android device. If you call
_cameraController.takePicture()before calling_cameraController.pausePreview(), then thetakePicturefunction will not complete.Device: Redmi Note 8 Pro, Android 11
Expected results: the snapshot was saved successfully
Actual results: the function
takePictureis not completed.Code sample
The example is taken from https://docs.flutter.dev/cookbook/plugins/picture-using-camera and supplemented with a line
await _controller.pausePreview();beforefinal image = await _controller.takePicture();Logs
flutter doctor -v