Skip to content

[camera] In Android take photo, unlockAutoFocus error Fatal Exception: java.lang.NullPointerException is thrown #82031

Description

@wisnuwiry

Steps to Reproduce

This issue was experienced by some / many of my users when taking photos of the force close application. And to get this issue just take normal photos on one of the following devices:

  1. vivo 1915
  2. Oppo A1k
  3. vivo 1724
  4. realme C15
  5. Oppo F7
  6. vivo 1915
  7. Galaxy A50s

Another way to get this error might be by:

  1. Take capture continuously.

Dependencies in pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
  dartz: ^0.10.0-nullsafety.1
  dio: ^4.0.0
  equatable: ^2.0.0
  flutter_bloc: ^7.0.0
  flutter_html: ^2.0.0-nullsafety.0
  formz: ^0.4.0-nullsafety.0
  get_it: ^6.1.0
  hive: ^2.0.2
  image_picker: ^0.7.4
  path_provider: ^2.0.1
  file_picker: ^3.0.1
  rxdart: ^0.26.0
  open_file: ^3.1.0
  pdf: ^3.2.0
  firebase_core: ^1.0.3
  firebase_messaging: ^9.1.1
  firebase_crashlytics: ^2.0.0
  firebase_performance: ^0.7.0
  firebase_analytics: ^8.0.0
  root_detector: ^0.0.3
  geolocator: ^7.0.2
  firebase_remote_config: ^0.10.0-dev.0
  package_info: ^2.0.0
  url_launcher: ^6.0.3
  shimmer: ^2.0.0
  intl: ^0.17.0
  camera: ^0.8.1
  google_maps_flutter: ^2.0.3
  timeline_tile: ^2.0.0
  permission_handler: ^7.1.0

Expected results:

Actual results:

image

Logs
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference
       at io.flutter.plugins.camera.Camera.unlockAutoFocus(Camera.java:26)
       at io.flutter.plugins.camera.Camera.access$1900(Camera.java)
       at io.flutter.plugins.camera.Camera$4.onCaptureCompleted(Camera.java:2)
       at java.lang.reflect.Method.invoke(Method.java)
       at android.hardware.camera2.dispatch.InvokeDispatcher.dispatch(InvokeDispatcher.java:39)
       at android.hardware.camera2.dispatch.HandlerDispatcher$1.run(HandlerDispatcher.java:65)
       at android.os.Handler.handleCallback(Handler.java:790)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:192)
       at android.app.ActivityThread.main(ActivityThread.java:6702)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)
## Running Verbose When Error:##

 +465 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[        ] W/ArrayUtils(20811): Ignoring invalid value asd
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[  +31 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[        ] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[        ] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[ +140 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[        ] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[   +1 ms] I/Camera  (20811): [FPS Range Available] is:[7500, 30000]
[   +1 ms] I/Camera  (20811): [FPS Range] is:[7500, 30000]
[ +345 ms] I/art     (20811): Thread[1,tid=20811,WaitingForJniOnLoad,Thread*=0xb7d270e8,peer=0x776d1000,"main"] recursive attempt to load library "/system/lib/libmedia_jni.so"
[   +7 ms] D/MtpDeviceJNI(20811): register_android_mtp_MtpDevice
[   +4 ms] I/art     (20811): Thread[1,tid=20811,WaitingForJniOnLoad,Thread*=0xb7d270e8,peer=0x776d1000,"main"] recursive attempt to load library "/system/lib/libmedia_jni.so"
[   +1 ms] I/art     (20811): Thread[1,tid=20811,WaitingForJniOnLoad,Thread*=0xb7d270e8,peer=0x776d1000,"main"] recursive attempt to load library "/system/lib/libmedia_jni.so"
[ +175 ms] D/SensorManager(20811): registerListener :: 0, K303C Accelerometer Sensor, 200000, 0,  
[  +93 ms] W/Camera  (20811): The selected imageFormatGroup is not supported by Android. Defaulting to yuv420
[  +12 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[        ] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[  +21 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[        ] W/ArrayUtils(20811): Ignoring invalid value beauty
[        ] W/ArrayUtils(20811): Ignoring invalid value asd
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[ +278 ms] I/CameraManager(20811): Using legacy camera HAL.
[ +188 ms] I/art     (20811): Background sticky concurrent mark sweep GC freed 40364(1887KB) AllocSpace objects, 7(112KB) LOS objects, 17% free, 9MB/11MB, paused 1.457ms total 506.425ms
[ +236 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[        ] W/ArrayUtils(20811): Ignoring invalid value flowers
[        ] W/ArrayUtils(20811): Ignoring invalid value AR
[ +203 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[        ] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[        ] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[        ] W/ArrayUtils(20811): Ignoring invalid value neon
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[  +13 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state CONFIGURING
[  +13 ms] I/RequestThread-1(20811): Configure outputs: 2 surfaces configured.
[   +3 ms] D/Camera  (20811): app passed NULL surface
[  +51 ms] I/RequestThread-1(20811): configureOutputs - set take picture size to 1280x720
[ +183 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state IDLE
[  +19 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[        ] W/ArrayUtils(20811): Ignoring invalid value beauty
[        ] W/ArrayUtils(20811): Ignoring invalid value asd
[        ] W/ArrayUtils(20811): Ignoring invalid value backlight
[        ] W/ArrayUtils(20811): Ignoring invalid value flowers
[        ] W/ArrayUtils(20811): Ignoring invalid value AR
[  +17 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[        ] W/ArrayUtils(20811): Ignoring invalid value asd
[        ] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[  +14 ms] I/RequestQueue(20811): Repeating capture request set.
[  +13 ms] W/LegacyRequestMapper(20811): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
[   +4 ms] W/LegacyRequestMapper(20811): mapAeAndFlashMode - Ignore control.aeMode == ON_AUTO_FLASH;camera does not support it
[   +5 ms] W/LegacyRequestMapper(20811): convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
[  +58 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[        ] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[        ] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[+1037 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state CAPTURING
[+1367 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +221 ms] I/RequestQueue(20811): Repeating capture request cancelled.
[   +8 ms] I/RequestQueue(20811): Repeating capture request set.
[   +1 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +112 ms] W/LegacyRequestMapper(20811): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
[   +2 ms] W/LegacyRequestMapper(20811): mapAeAndFlashMode - Ignore control.aeMode == ON_AUTO_FLASH;camera does not support it
[        ] W/LegacyRequestMapper(20811): convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
[   +1 ms] I/RequestQueue(20811): Repeating capture request cancelled.
[  +28 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[  +86 ms] W/LegacyRequestMapper(20811): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
[   +2 ms] W/LegacyRequestMapper(20811): Only received metering rectangles with weight 0.
[   +3 ms] W/LegacyRequestMapper(20811): mapAeAndFlashMode - Ignore control.aeMode == ON_AUTO_FLASH;camera does not support it
[   +3 ms] W/LegacyRequestMapper(20811): convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
[  +35 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +160 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +151 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +294 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[  +47 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +134 ms] I/RequestThread-1(20811): Received jpeg.
[   +1 ms] I/RequestThread-1(20811): Producing jpeg buffer...
[  +19 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state IDLE
[  +46 ms] D/ImageReader_JNI(20811): ImageReader_imageSetup: Receiving JPEG in HAL_PIXEL_FORMAT_RGBA_8888 buffer.
[   +7 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +6 ms] I/RequestQueue(20811): Repeating capture request set.
[   +1 ms] I/flutter (20811): /data/data/id.co.krista.mobile/cache/CAP-2063246489.jpg
[   +6 ms] W/LegacyRequestMapper(20811): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
[   +4 ms] W/LegacyRequestMapper(20811): mapAeAndFlashMode - Ignore control.aeMode == ON_AUTO_FLASH;camera does not support it
[   +3 ms] W/LegacyRequestMapper(20811): convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
[  +23 ms] I/RequestQueue(20811): Repeating capture request cancelled.
[+1386 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state CAPTURING
[ +336 ms] E/BufferQueueProducer(20811): [unnamed-20811-3] cancelBuffer: BufferQueue has been abandoned
[   +2 ms] E/BufferQueueProducer(20811): [unnamed-20811-3] cancelBuffer: BufferQueue has been abandoned
[   +1 ms] E/BufferQueueProducer(20811): [unnamed-20811-3] cancelBuffer: BufferQueue has been abandoned
[   +1 ms] E/BufferQueueProducer(20811): [unnamed-20811-3] cancelBuffer: BufferQueue has been abandoned
[   +1 ms] E/BufferQueueProducer(20811): [unnamed-20811-3] cancelBuffer: BufferQueue has been abandoned
[   +1 ms] E/BufferQueueProducer(20811): [unnamed-20811-3] cancelBuffer: BufferQueue has been abandoned
[ +303 ms] D/SensorManager(20811): unregisterListener ::   
[  +32 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[  +26 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +6 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[        ] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[        ] W/ArrayUtils(20811): Ignoring invalid value point-blue
[        ] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[        ] W/ArrayUtils(20811): Ignoring invalid value neon
[        ] W/ArrayUtils(20811): Ignoring invalid value beauty
[        ] W/ArrayUtils(20811): Ignoring invalid value asd
[        ] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[        ] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +1 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +1 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +1 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +2 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +1 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +1 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +1 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +9 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[        ] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[        ] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[   +2 ms] I/Camera  (20811): [FPS Range Available] is:[7500, 30000]
[        ] I/Camera  (20811): [FPS Range] is:[7500, 30000]
[  +17 ms] D/SensorManager(20811): registerListener :: 0, K303C Accelerometer Sensor, 200000, 0,  
[  +68 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[  +96 ms] W/Camera  (20811): The selected imageFormatGroup is not supported by Android. Defaulting to yuv420
[   +7 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[  +18 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[   +2 ms] I/CameraManager(20811): Using legacy camera HAL.
[ +179 ms] I/art     (20811): Background partial concurrent mark sweep GC freed 44229(2036KB) AllocSpace objects, 4(227KB) LOS objects, 24% free, 9MB/12MB, paused 1.341ms total 216.671ms
[  +66 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +4 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[  +91 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[   +2 ms] W/MessageQueue(20811): Handler (android.os.Handler) {2b3bd961} sending message to a Handler on a dead thread
[   +1 ms] W/MessageQueue(20811): java.lang.IllegalStateException: Handler (android.os.Handler) {2b3bd961} sending message to a Handler on a dead thread
[   +1 ms] W/MessageQueue(20811):       at android.os.MessageQueue.enqueueMessage(MessageQueue.java:325)
[        ] W/MessageQueue(20811):       at android.os.Handler.enqueueMessage(Handler.java:631)
[   +2 ms] W/MessageQueue(20811):       at android.os.Handler.sendMessageAtFrontOfQueue(Handler.java:623)
[   +1 ms] W/MessageQueue(20811):       at android.hardware.camera2.legacy.RequestThreadManager.quit(RequestThreadManager.java:941)
[  +22 ms] W/MessageQueue(20811):       at android.hardware.camera2.legacy.LegacyCameraDevice.close(LegacyCameraDevice.java:444)
[   +2 ms] W/MessageQueue(20811):       at android.hardware.camera2.legacy.LegacyCameraDevice.finalize(LegacyCameraDevice.java:468)
[   +1 ms] W/MessageQueue(20811):       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:209)
[   +2 ms] W/MessageQueue(20811):       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:192)
[   +1 ms] W/MessageQueue(20811):       at java.lang.Thread.run(Thread.java:818)
[   +4 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[        ] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +4 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[        ] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[        ] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +4 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[   +2 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state CONFIGURING
[   +4 ms] I/RequestThread-1(20811): Configure outputs: 2 surfaces configured.
[   +1 ms] D/Camera  (20811): app passed NULL surface
[        ] I/RequestThread-1(20811): configureOutputs - set take picture size to 1280x720
[   +3 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state IDLE
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[        ] W/ArrayUtils(20811): Ignoring invalid value neon
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value beauty
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value asd
[        ] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +3 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[        ] I/RequestQueue(20811): Repeating capture request set.
[        ] W/LegacyRequestMapper(20811): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
[   +1 ms] W/LegacyRequestMapper(20811): mapAeAndFlashMode - Ignore control.aeMode == ON_AUTO_FLASH;camera does not support it
[   +1 ms] W/LegacyRequestMapper(20811): convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value vintage-cold
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value point-blue
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value point-red-yellow
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value emboss
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value sketch
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value neon
[        ] W/ArrayUtils(20811): Ignoring invalid value beauty
[        ] W/ArrayUtils(20811): Ignoring invalid value asd
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value backlight
[   +2 ms] W/ArrayUtils(20811): Ignoring invalid value flowers
[   +1 ms] W/ArrayUtils(20811): Ignoring invalid value AR
[ +823 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state CAPTURING
[+1052 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +111 ms] I/RequestQueue(20811): Repeating capture request cancelled.
[   +2 ms] I/RequestQueue(20811): Repeating capture request set.
[  +85 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[  +42 ms] W/LegacyRequestMapper(20811): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
[   +6 ms] W/LegacyRequestMapper(20811): mapAeAndFlashMode - Ignore control.aeMode == ON_AUTO_FLASH;camera does not support it
[   +3 ms] W/LegacyRequestMapper(20811): convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
[  +79 ms] I/RequestQueue(20811): Repeating capture request cancelled.
[  +43 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[  +90 ms] W/LegacyRequestMapper(20811): convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
[   +1 ms] W/LegacyRequestMapper(20811): Only received metering rectangles with weight 0.
[        ] W/LegacyRequestMapper(20811): mapAeAndFlashMode - Ignore control.aeMode == ON_AUTO_FLASH;camera does not support it
[   +1 ms] W/LegacyRequestMapper(20811): convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
[ +189 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +189 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +198 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[ +167 ms] I/RequestThread-1(20811): Received jpeg.
[   +2 ms] I/RequestThread-1(20811): Producing jpeg buffer...
[   +2 ms] D/ImageReader_JNI(20811): ImageReader_imageSetup: Receiving JPEG in HAL_PIXEL_FORMAT_RGBA_8888 buffer.
[  +11 ms] I/flutter (20811): /data/data/id.co.krista.mobile/cache/CAP1233186859.jpg
[   +3 ms] I/CameraDeviceState(20811): Legacy camera service transitioning to state IDLE
[ +196 ms] D/SensorManager(20811): unregisterListener ::   
[   +2 ms] D/ViewRootImpl(20811): ViewPostImeInputStage ACTION_DOWN
[   +9 ms] D/AndroidRuntime(20811): Shutting down VM
[ +505 ms] D/TransportRuntime.SQLiteEventStore(20811): Storing event with priority=HIGHEST, name=FIREBASE_CRASHLYTICS_REPORT for destination cct
[  +17 ms] D/TransportRuntime.JobInfoScheduler(20811): Scheduling upload for context TransportContext(cct, HIGHEST,
MSRodHRwczovL2NyYXNobHl0aWNzcmVwb3J0cy1wYS5nb29nbGVhcGlzLmNvbS92MS9maXJlbG9nL2xlZ2FjeS9iYXRjaGxvZ1xBSXphU3lCcnBTWVQ0RkZMMDlyZUhKaTZIOUZZZGVpU25VVE92Mk0=) with jobId=-1909444295 in
1000ms(Backend next call timestamp 0). Attempt 1
[ +480 ms] E/AndroidRuntime(20811): FATAL EXCEPTION: main
[   +1 ms] E/AndroidRuntime(20811): Process: id.co.krista.mobile, PID: 20811
[   +2 ms] E/AndroidRuntime(20811): java.lang.NullPointerException: Attempt to invoke virtual method 'int
android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null 
object reference
[   +2 ms] E/AndroidRuntime(20811):     at io.flutter.plugins.camera.Camera.unlockAutoFocus(Camera.java:611)
[   +2 ms] E/AndroidRuntime(20811):     at io.flutter.plugins.camera.Camera.access$1900(Camera.java:74)
[   +1 ms] E/AndroidRuntime(20811):     at io.flutter.plugins.camera.Camera$4.onCaptureCompleted(Camera.java:589)
[   +2 ms] E/AndroidRuntime(20811):     at java.lang.reflect.Method.invoke(Native Method)
[   +1 ms] E/AndroidRuntime(20811):     at java.lang.reflect.Method.invoke(Method.java:372)
[   +3 ms] E/AndroidRuntime(20811):     at android.hardware.camera2.dispatch.InvokeDispatcher.dispatch(InvokeDispatcher.java:39)
[   +3 ms] E/AndroidRuntime(20811):     at android.hardware.camera2.dispatch.HandlerDispatcher$1.run(HandlerDispatcher.java:65)
[   +3 ms] E/AndroidRuntime(20811):     at android.os.Handler.handleCallback(Handler.java:739)
[   +1 ms] E/AndroidRuntime(20811):     at android.os.Handler.dispatchMessage(Handler.java:95)
[   +1 ms] E/AndroidRuntime(20811):     at android.os.Looper.loop(Looper.java:135)
[        ] E/AndroidRuntime(20811):     at android.app.ActivityThread.main(ActivityThread.java:5753)
[   +1 ms] E/AndroidRuntime(20811):     at java.lang.reflect.Method.invoke(Native Method)
[   +2 ms] E/AndroidRuntime(20811):     at java.lang.reflect.Method.invoke(Method.java:372)
[   +2 ms] E/AndroidRuntime(20811):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
[   +1 ms] E/AndroidRuntime(20811):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
[+7646 ms] W/art     (20811): Suspending all threads took: 53.210ms
[  +72 ms] W/MessageQueue(20811): Handler (android.os.Handler) {2470e404} sending message to a Handler on a dead thread
[   +1 ms] W/MessageQueue(20811): java.lang.IllegalStateException: Handler (android.os.Handler) {2470e404} sending message to a Handler on a dead thread
[        ] W/MessageQueue(20811):       at android.os.MessageQueue.enqueueMessage(MessageQueue.java:325)
[        ] W/MessageQueue(20811):       at android.os.Handler.enqueueMessage(Handler.java:631)
[        ] W/MessageQueue(20811):       at android.os.Handler.sendMessageAtFrontOfQueue(Handler.java:623)
[        ] W/MessageQueue(20811):       at android.hardware.camera2.legacy.RequestThreadManager.quit(RequestThreadManager.java:941)
[   +1 ms] W/MessageQueue(20811):       at android.hardware.camera2.legacy.LegacyCameraDevice.close(LegacyCameraDevice.java:444)
[   +2 ms] W/MessageQueue(20811):       at android.hardware.camera2.legacy.LegacyCameraDevice.finalize(LegacyCameraDevice.java:468)
[   +1 ms] W/MessageQueue(20811):       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:209)
[   +2 ms] W/MessageQueue(20811):       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:192)
[   +2 ms] W/MessageQueue(20811):       at java.lang.Thread.run(Thread.java:818)

[√] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19041.928], locale en-ID)
    • Flutter version 2.0.4 at C:\flutter
    • Framework revision b1395592de (5 weeks ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at C:\Users\wisnu\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java       
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.56.0)
    • VS Code at C:\Users\wisnu\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[√] Connected device (4 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • Windows (desktop)                  • windows       • windows-x64    • Microsoft Windows [Version 10.0.19041.928]
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 90.0.4430.93
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 90.0.818.49

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: productionIssues experienced in live production appsc: fatal crashCrashes that terminate the processp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    [PENDING] camera_android issues solved by camera_android_camerax

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions