You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Camera fails to start on some devices, App throws Attempt to invoke virtual method 'void android.media.ImageReader.setOnImageAvailableListener(android.media.ImageReader$OnImageAvailableListener, android.os.Handler)' on a null object reference. #105200
Camera won't start on Xiaomi POCO X4 Pro 5G device, it fails to start the example application from the library.
Error
Attempt to invoke virtual method 'void android.media.ImageReader.setOnImageAvailableListener(android.media.ImageReader$OnImageAvailableListener, android.os.Handler)' on a null object reference.
Steps to Reproduce
Flutter version 2.8.0
Camera version 0.9.7+1
1. I'm running the example from the library.
2. After clicking on the back camera, it displays the error message.
Hi @RobertApikyan, I run the camera example code on a Poco X3 NFC and the camera starts as expected. Is this the only device you're experiencing this issue on?
Also, you appear appear to be on an older version of flutter. Can you try upgrading to the latest version of flutter to see whether or not you still experience this issue?
@maheshmnj thanks for quick response, you are right the exception is the same, but please pay attention that I'm running the original example application from the library, the same sample works perfectly for the other devices, but not for the Xiaomi POCO X4 Pro 5G. Unfortunately, In the issue #29116 I can not find the answer for my question.
Hi @RobertApikyan, I run the camera example code on a Poco X3 NFC and the camera starts as expected. Is this the only device you're experiencing this issue on?
Also, you appear appear to be on an older version of flutter. Can you try upgrading to the latest version of flutter to see whether or not you still experience this issue?
Thank you
video
Hi @danagbemava-nc thanks for the answer, yes this seems only for the Xiaomi POCO X4 Pro 5G. Ok, I will update the flutter to the latest version and let you know about results.
Hi @RobertApikyan, please provide the output of flutter run -v that captures the exception and the list of devices you have tested on and whether or not they reproduce the issue.
Hi, I'm also facing the exact same issue on Redmi 11 Pro + 5G. even the Camera example app not working from pub.dev
Other third-party camera apps are working fine on that device.
Reacted by Robert Apikyan, Josh Ooi, 윤종학, NghiepNguyenKafi, Indra Prastha, Marko Milutinovic and Kauê Murakami
Hi, I'm also facing the exact same issue on Redmi 11 Pro + 5G. even the Camera example app not working from pub.dev Other third-party camera apps are working fine on that device.
Same story, the latest version of the "camera awesome" library is working without any problem, however it seems abandoned, and the last update there was at Jun 2 of 2021.
When capturing image from back camera it is take 5-8 second to capture the image which is a lot but working fine for front camera and i am getting the following log.
Slow Binder: BpBinder transact took 379 ms, interface=android.hardware.camera2.ICameraDeviceUser, code=1 oneway=false . D/Camera ( 6038): Updating builder with feature: FocusPointFeature
D/Camera ( 6038): Updating builder with feature: ResolutionFeature
D/Camera ( 6038): Updating builder with feature: SensorOrientationFeature
D/Camera ( 6038): Updating builder with feature: FlashFeature
D/Camera ( 6038): Updating builder with feature: ExposureOffsetFeature
D/Camera ( 6038): Updating builder with feature: FpsRangeFeature
I/Camera ( 6038): sending capture request
11
D/CameraCaptureCallback( 6038): CameraCaptureCallback | state: STATE_CAPTURING | afState: 2 | aeState: 2
I/Camera ( 6038): unlockAutoFocus
I/Camera ( 6038): refreshPreviewCaptureSession
5
D/CameraCaptureCallback( 6038): CameraCaptureCallback | state: STATE_CAPTURING | afState: 2 | aeState: 2
I/Camera ( 6038): onImageAvailable
2
W/System ( 6038): A resource failed to call end.
W/System ( 6038): A resource failed to call release.
I/Camera ( 6038): CameraCaptureSession onClosed
2
I/Camera ( 6038): dispose
I/Camera ( 6038): close
2
I/flutter ( 6038): Initialising connection
W/BpBinder( 6038): Slow Binder: BpBinder transact took 342 ms, interface=android.hardware.camera2.ICameraDeviceUser, code=1 oneway=false
I/Camera ( 6038): open | onClosed
Activity
maheshj01 commentedon Jun 2, 2022
see #29116
danagbemava-nc commentedon Jun 2, 2022
Hi @RobertApikyan, I run the camera example code on a
Poco X3 NFCand the camera starts as expected. Is this the only device you're experiencing this issue on?Also, you appear appear to be on an older version of flutter. Can you try upgrading to the latest version of flutter to see whether or not you still experience this issue?
Thank you
video
video_2022-06-02_08-56-32.mp4
RobertApikyan commentedon Jun 2, 2022
@maheshmnj thanks for quick response, you are right the exception is the same, but please pay attention that I'm running the original example application from the library, the same sample works perfectly for the other devices, but not for the Xiaomi POCO X4 Pro 5G. Unfortunately, In the issue #29116 I can not find the answer for my question.
RobertApikyan commentedon Jun 2, 2022
Hi @danagbemava-nc thanks for the answer, yes this seems only for the Xiaomi POCO X4 Pro 5G. Ok, I will update the flutter to the latest version and let you know about results.
RobertApikyan commentedon Jun 2, 2022
@danagbemava-nc I have upgraded the flutter version to 3.0.1, but the issue still exist, it displays the same error.
danagbemava-nc commentedon Jun 2, 2022
Hi @RobertApikyan, please provide the output of
flutter run -vthat captures the exception and the list of devices you have tested on and whether or not they reproduce the issue.Thank you
ManuverGujjar commentedon Jun 2, 2022
Hi, I'm also facing the exact same issue on Redmi 11 Pro + 5G. even the Camera example app not working from pub.dev
Other third-party camera apps are working fine on that device.
RobertApikyan commentedon Jun 2, 2022
Same story, the latest version of the "camera awesome" library is working without any problem, however it seems abandoned, and the last update there was at Jun 2 of 2021.
79 remaining items
shivam-modi commentedon Feb 25, 2023
Any updates to this issue, above suggested method fork the plugin is not working
try to fix flutter/flutter#105200
singlapriyanka315 commentedon Jul 19, 2023
When capturing image from back camera it is take 5-8 second to capture the image which is a lot but working fine for front camera and i am getting the following log.
Slow Binder: BpBinder transact took 379 ms, interface=android.hardware.camera2.ICameraDeviceUser, code=1 oneway=false . D/Camera ( 6038): Updating builder with feature: FocusPointFeature
D/Camera ( 6038): Updating builder with feature: ResolutionFeature
D/Camera ( 6038): Updating builder with feature: SensorOrientationFeature
D/Camera ( 6038): Updating builder with feature: FlashFeature
D/Camera ( 6038): Updating builder with feature: ExposureOffsetFeature
D/Camera ( 6038): Updating builder with feature: FpsRangeFeature
I/Camera ( 6038): sending capture request
11
D/CameraCaptureCallback( 6038): CameraCaptureCallback | state: STATE_CAPTURING | afState: 2 | aeState: 2
I/Camera ( 6038): unlockAutoFocus
I/Camera ( 6038): refreshPreviewCaptureSession
5
D/CameraCaptureCallback( 6038): CameraCaptureCallback | state: STATE_CAPTURING | afState: 2 | aeState: 2
I/Camera ( 6038): onImageAvailable
2
W/System ( 6038): A resource failed to call end.
W/System ( 6038): A resource failed to call release.
I/Camera ( 6038): CameraCaptureSession onClosed
2
I/Camera ( 6038): dispose
I/Camera ( 6038): close
2
I/flutter ( 6038): Initialising connection
W/BpBinder( 6038): Slow Binder: BpBinder transact took 342 ms, interface=android.hardware.camera2.ICameraDeviceUser, code=1 oneway=false
I/Camera ( 6038): open | onClosed
[camera_android] Provides a default exposure point if null. (#3851)
[camera_android] Provides a default exposure point if null. (flutter#…
[camera_android] Provides a default exposure point if null. (flutter#…