Fixed
Status Update
Comments
l....@gmail.com <l....@gmail.com> #2
Attached screenshot for split between OS version and device model information that we get from Playstore.
Let us know if you need anyother information.
Thanks,
Venkatesh.
Let us know if you need anyother information.
Thanks,
Venkatesh.
er...@google.com <er...@google.com> #3
Hi,
Are you using the shutdown method in CameraX? Thanks
sc...@google.com <sc...@google.com> #4
Caused by: java.lang.IllegalArgumentException:
at androidx.camera.camera2.internal.ZoomStateImpl.setZoomRatio (ZoomStateImpl.java:40)
at androidx.camera.camera2.internal.ZoomControl.<init> (ZoomControl.java:98)
something weird with the zoom on this devices
1.0 zoom ratio in not in the range of [ 1.0, getMaxDigitalZoom() ]
private static float getMaxDigitalZoom(CameraCharacteristics cameraCharacteristics) {
Float maxZoom = cameraCharacteristics.get(
CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM);
if (maxZoom == null) {
return MIN_ZOOM;
}
return maxZoom;
}
I think CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM) could return 0 on this devices which we did not handle it well.
at androidx.camera.camera2.internal.ZoomStateImpl.setZoomRatio (ZoomStateImpl.java:40)
at androidx.camera.camera2.internal.ZoomControl.<init> (ZoomControl.java:98)
something weird with the zoom on this devices
1.0 zoom ratio in not in the range of [ 1.0, getMaxDigitalZoom() ]
private static float getMaxDigitalZoom(CameraCharacteristics cameraCharacteristics) {
Float maxZoom = cameraCharacteristics.get(
CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM);
if (maxZoom == null) {
return MIN_ZOOM;
}
return maxZoom;
}
I think CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM) could return 0 on this devices which we did not handle it well.
sc...@google.com <sc...@google.com>
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit ce0f240daff678d89a2ed386fcd6c8d12e498609
Author: Scott Nien <scottnien@google.com>
Date: Tue Feb 23 13:32:58 2021
Fixed initialization failure on UMIDIGI BISON devices
on UMIDIGI BISON devices,
CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM returns
a value small than 1.0f. We should use 1.0f as the max zoom ratio
in this condition.
Relnote: "Fixed initialization failure on UMIDIGI BISON devices"
Bug: 180818665
Test: ZoomControlDeviceTest
Change-Id: I57d9e1c1e2ba1e4d585c3fcbba18820a65ab5562
M camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/ZoomControlDeviceTest.java
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/CropRegionZoomImpl.java
https://android-review.googlesource.com/1601076
Branch: androidx-main
commit ce0f240daff678d89a2ed386fcd6c8d12e498609
Author: Scott Nien <scottnien@google.com>
Date: Tue Feb 23 13:32:58 2021
Fixed initialization failure on UMIDIGI BISON devices
on UMIDIGI BISON devices,
CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM returns
a value small than 1.0f. We should use 1.0f as the max zoom ratio
in this condition.
Relnote: "Fixed initialization failure on UMIDIGI BISON devices"
Bug: 180818665
Test: ZoomControlDeviceTest
Change-Id: I57d9e1c1e2ba1e4d585c3fcbba18820a65ab5562
M camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/ZoomControlDeviceTest.java
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/CropRegionZoomImpl.java
Description
Please describe your issue and include details such as the version of CameraX you are using and any relevant logs related to your issue.
Crash is not reproducing locally and is reported from Production.
Playstore link:
Crash stack:
java.lang.ExceptionInInitializerError:
at androidx.camera.core.Preview.<clinit> (Preview.java:143)
at androidx.camera.core.Preview$Builder.build (Preview.java:678)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildPreviewUseCase (LensCameraX.java:722)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCases (LensCameraX.java:482)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCase (LensCameraX.java:482)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCases (LensCameraX.java:465)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildAllUseCases (LensCameraX.java:445)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.launch (LensCameraX.java:321)
at com.microsoft.office.lens.lenscapture.camera.CameraHandler.launchCamera (CameraHandler.java:99)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment.initializeAndStartCamera (CaptureFragment.java:614)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment.initializeAndStartCamera$default (CaptureFragment.java:591)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment$showNoAccessViewOrLaunchCamera$1.onGlobalLayout (CaptureFragment.java:392)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout (ViewTreeObserver.java:1056)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2747)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1791)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7932)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:967)
at android.view.Choreographer.doCallbacks (Choreographer.java:791)
at android.view.Choreographer.doFrame (Choreographer.java:726)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:952)
at android.os.Handler.handleCallback (Handler.java:883)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7386)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:980)
Caused by: java.lang.IllegalStateException:
at androidx.camera.core.CameraX.waitInitialized (CameraX.java:899)
at androidx.camera.core.CameraX.checkInitialized (CameraX.java:790)
at androidx.camera.core.CameraX.getSurfaceManager (CameraX.java:572)
at androidx.camera.core.Preview$Defaults.<clinit> (Preview.java:570)
at androidx.camera.core.Preview.<clinit> (Preview.java:143)
at androidx.camera.core.Preview$Builder.build (Preview.java:678)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildPreviewUseCase (LensCameraX.java:722)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCases (LensCameraX.java:482)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCase (LensCameraX.java:482)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCases (LensCameraX.java:465)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildAllUseCases (LensCameraX.java:445)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.launch (LensCameraX.java:321)
at com.microsoft.office.lens.lenscapture.camera.CameraHandler.launchCamera (CameraHandler.java:99)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment.initializeAndStartCamera (CaptureFragment.java:614)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment.initializeAndStartCamera$default (CaptureFragment.java:591)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment$showNoAccessViewOrLaunchCamera$1.onGlobalLayout (CaptureFragment.java:392)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout (ViewTreeObserver.java:1056)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2747)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1791)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7932)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:967)
at android.view.Choreographer.doCallbacks (Choreographer.java:791)
at android.view.Choreographer.doFrame (Choreographer.java:726)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:952)
at android.os.Handler.handleCallback (Handler.java:883)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7386)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:980)
Caused by: java.util.concurrent.ExecutionException:
at androidx.concurrent.futures.AbstractResolvableFuture.getDoneValue (AbstractResolvableFuture.java:518)
at androidx.concurrent.futures.AbstractResolvableFuture.get (AbstractResolvableFuture.java:391)
at androidx.concurrent.futures.CallbackToFutureAdapter$SafeFuture.get (CallbackToFutureAdapter.java:205)
at androidx.camera.core.impl.utils.futures.ChainingListenableFuture.get (ChainingListenableFuture.java:132)
at androidx.camera.core.CameraX.waitInitialized (CameraX.java:897)
at androidx.camera.core.CameraX.checkInitialized (CameraX.java:790)
at androidx.camera.core.CameraX.getSurfaceManager (CameraX.java:572)
at androidx.camera.core.Preview$Defaults.<clinit> (Preview.java:570)
at androidx.camera.core.Preview.<clinit> (Preview.java:143)
at androidx.camera.core.Preview$Builder.build (Preview.java:678)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildPreviewUseCase (LensCameraX.java:722)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCases (LensCameraX.java:482)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCase (LensCameraX.java:482)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildCameraUseCases (LensCameraX.java:465)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.buildAllUseCases (LensCameraX.java:445)
at com.microsoft.office.lens.lenscapture.camera.LensCameraX.launch (LensCameraX.java:321)
at com.microsoft.office.lens.lenscapture.camera.CameraHandler.launchCamera (CameraHandler.java:99)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment.initializeAndStartCamera (CaptureFragment.java:614)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment.initializeAndStartCamera$default (CaptureFragment.java:591)
at com.microsoft.office.lens.lenscapture.ui.CaptureFragment$showNoAccessViewOrLaunchCamera$1.onGlobalLayout (CaptureFragment.java:392)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout (ViewTreeObserver.java:1056)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2747)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1791)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7932)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:967)
at android.view.Choreographer.doCallbacks (Choreographer.java:791)
at android.view.Choreographer.doFrame (Choreographer.java:726)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:952)
at android.os.Handler.handleCallback (Handler.java:883)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7386)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:980)
Caused by: androidx.camera.core.InitializationException:
at androidx.camera.core.CameraX.lambda$initInternal$6 (CameraX.java:1023)
at androidx.camera.core.CameraX.lambda$initInternal$5 (CameraX.java:1023)
at androidx.camera.core.CameraX.lambda$y1jcNMsD1zmP6OzlobtyvfeEG_U (CameraX.java)
at androidx.camera.core.-$$Lambda$CameraX$y1jcNMsD1zmP6OzlobtyvfeEG_U.run (Unknown Source:10)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:919)
Caused by: java.lang.IllegalArgumentException:
at androidx.camera.camera2.internal.ZoomStateImpl.setZoomRatio (ZoomStateImpl.java:40)
at androidx.camera.camera2.internal.ZoomControl.<init> (ZoomControl.java:98)
at androidx.camera.camera2.internal.Camera2CameraControl.<init> (Camera2CameraControl.java:125)
at androidx.camera.camera2.internal.Camera2CameraImpl.<init> (Camera2CameraImpl.java:198)
at androidx.camera.camera2.internal.Camera2CameraFactory.getCamera (Camera2CameraFactory.java:61)
at androidx.camera.core.impl.CameraRepository.init (CameraRepository.java:68)
at androidx.camera.core.CameraX.lambda$initInternal$6 (CameraX.java:1017)
at androidx.camera.core.CameraX.lambda$initInternal$5 (CameraX.java:1017)
at androidx.camera.core.CameraX.lambda$y1jcNMsD1zmP6OzlobtyvfeEG_U (CameraX.java)
at androidx.camera.core.-$$Lambda$CameraX$y1jcNMsD1zmP6OzlobtyvfeEG_U.run (Unknown Source:10)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:919)
// If at all possible, capture an Android logcat (
CAMERAX VERSION (ex - 1.0.0-alpha07)
Beta-05
CAMERA APPLICATION NAME AND VERSION: (Settings > Apps > (app name) > version)
Microsoft Office Lens
ANDROID OS BUILD NUMBER: (Settings > About > Build number)
OS independent but mostly reported on OS 10 and then 9
DEVICE NAME: (Nexus 5X, Samsung S6, etc)
Most of them are from "UMIDIGI BISON" devices.
DESCRIPTION:
LIST ANY EXPERIMENTAL FEATURES: (As an example - @ExperimentalCamera2Interop)
STEPS TO REPRODUCE:
1.
2.
3.
OBSERVED RESULTS:
EXPECTED RESULTS:
REPRODUCIBILITY: (5 of 5, 1 of 100, etc)
ADDITIONAL INFORMATION:
CODE FRAGMENTS (this will help us troubleshoot your issues):