Fixed
Status Update
Comments
l....@gmail.com <l....@gmail.com> #2
Another alternative may be to add a MergeAdapter.Config.Builder
constructor that accepts a seed configuration as a parameter, so that one could write
mAdapter = MergeAdapter(
MergeAdapter.Config.Builder(MergeAdapter.Config.DEFAULT)
.setStableIdMode(ISOLATED_STABLE_IDS)
.build(),
adapter1,
adapter2
)
etc.
er...@google.com <er...@google.com> #3
Sorry for the delay.
I think this is a very good point. Forwarding onto a colleague to see what they think.
sc...@google.com <sc...@google.com> #4
this makes sense but a bit risky because it will be a behavior change and we usually don't do those in beta. on the other hand, if not now, it will be never so might be better to just make the change instead.
sc...@google.com <sc...@google.com>
ap...@google.com <ap...@google.com> #5
in fact, the docs say isolateViewTypes
defaults to true which it does not :).
I'll try to fix this before rc
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):