CamerAwesome icon indicating copy to clipboard operation
CamerAwesome copied to clipboard

Camera crashs after several capture request if the flashmode is ON

Open Warpath opened this issue 4 years ago • 1 comments

Steps to Reproduce

  1. Run the example project
  2. Set the flash mode to ON
  3. Press the capture button several times

Expected results

It should take photos as usual.

Actual results

The App crashed and exists.

About your device

Brand Model OS
Google Pixel 2 XL 11

E/AndroidRuntime(26872): FATAL EXCEPTION: main E/AndroidRuntime(26872): Process: com.apparence.camerawesome_example, PID: 26872 E/AndroidRuntime(26872): java.lang.IllegalArgumentException: supportsCameraApi:2340: Unknown camera ID 0 E/AndroidRuntime(26872): at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1001) E/AndroidRuntime(26872): at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:449) E/AndroidRuntime(26872): at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:485) E/AndroidRuntime(26872): at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:725) E/AndroidRuntime(26872): at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:653) E/AndroidRuntime(26872): at com.apparence.camerawesome.CameraStateManager.startCamera(CameraStateManager.java:70) E/AndroidRuntime(26872): at com.apparence.camerawesome.CameraStateManager.onError(CameraStateManager.java:157) E/AndroidRuntime(26872): at android.hardware.camera2.impl.CameraDeviceImpl.notifyError(CameraDeviceImpl.java:1629) E/AndroidRuntime(26872): at android.hardware.camera2.impl.CameraDeviceImpl.lambda$oDs27OTfKFfK18rUW2nQxxkPdV0(Unknown Source:0) E/AndroidRuntime(26872): at android.hardware.camera2.impl.-$$Lambda$CameraDeviceImpl$oDs27OTfKFfK18rUW2nQxxkPdV0.accept(Unknown Source:8) E/AndroidRuntime(26872): at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:278) E/AndroidRuntime(26872): at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:201) E/AndroidRuntime(26872): at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:97) E/AndroidRuntime(26872): at android.os.Handler.handleCallback(Handler.java:938) E/AndroidRuntime(26872): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(26872): at android.os.Looper.loop(Looper.java:223) E/AndroidRuntime(26872): at android.app.ActivityThread.main(ActivityThread.java:7656) E/AndroidRuntime(26872): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(26872): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) E/AndroidRuntime(26872): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) E/AndroidRuntime(26872): Caused by: android.os.ServiceSpecificException: supportsCameraApi:2340: Unknown camera ID 0 (code 3) E/AndroidRuntime(26872): at android.os.Parcel.createExceptionOrNull(Parcel.java:2387) E/AndroidRuntime(26872): at android.os.Parcel.createException(Parcel.java:2357) E/AndroidRuntime(26872): at android.os.Parcel.readException(Parcel.java:2340) E/AndroidRuntime(26872): at android.os.Parcel.readException(Parcel.java:2282) E/AndroidRuntime(26872): at android.hardware.ICameraService$Stub$Proxy.supportsCameraApi(ICameraService.java:906) E/AndroidRuntime(26872): at android.hardware.camera2.CameraManager.supportsCameraApiLocked(CameraManager.java:1054) E/AndroidRuntime(26872): at android.hardware.camera2.CameraManager.supportsCamera2ApiLocked(CameraManager.java:1030) E/AndroidRuntime(26872): at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:422) E/AndroidRuntime(26872): ... 18 more

Warpath avatar Jul 30 '21 06:07 Warpath

Thank you reporting this. We are currently in vacations but we will try reproducing this as soon as we can.

g-apparence avatar Aug 17 '21 16:08 g-apparence

This should be fixed with the reworked version #150

g-apparence avatar Nov 25 '22 14:11 g-apparence