trafficstars
Hi tech folks. I am getting this bug again and again in some devices. I tried many times to solve that, but it's still happening for some reason. Anyone having this issue? then please help me solve it.
- CameraView version: 2.7.2
- Camera engine used: camera2
- Reproducible in official demo app: no
- Device / Android version: Samsung devices mostly with API 30+
- I have read the FAQ page: yes
To Reproduce
It's not reproduceable sadly, I am getting it from the play store app although I didn't apply any proguard.
Expected behavior
A clear and concise description of what you expected to happen.
XML layout
Part of the XML layout with the CameraView declaration, so we can read its attributes.
<com.otaliastudios.cameraview.CameraView
android:id="@+id/cameraView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:animateLayoutChanges="true"
android:keepScreenOn="true"
app:cameraAudio="on"
app:cameraAutoFocusMarker="@string/cameraview_default_autofocus_marker"
app:cameraEngine="camera2"
app:cameraExperimental="true"
app:cameraFacing="back"
app:cameraGestureLongTap="none"
app:cameraGesturePinch="zoom"
app:cameraGestureScrollVertical="exposureCorrection"
app:cameraHdr="on"
app:cameraMode="picture"
app:cameraPictureMetering="false"
app:cameraPlaySounds="false"
app:cameraPreview="glSurface"
app:cameraPreviewFrameRate="30"
app:cameraPreviewFrameRateExact="true"
app:cameraRequestPermissions="false"/>
Screenshots
If applicable, add screenshots to help explain your problem.
Logs
'java.lang.IllegalArgumentException:
at android.hardware.camera2.utils.SurfaceUtils.getSurfaceSize (SurfaceUtils.java:86)
at android.hardware.camera2.params.OutputConfiguration. (OutputConfiguration.java:261)
at android.hardware.camera2.params.OutputConfiguration. (OutputConfiguration.java:146)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession (CameraDeviceImpl.java:510)
at com.otaliastudios.cameraview.engine.Camera2Engine.onStartBind (Camera2Engine.java)
at com.otaliastudios.cameraview.engine.CameraEngine.lambda$startBind$6 (CameraEngine.java)
at com.google.firebase.remoteconfig.RemoteConfigComponent$$InternalSyntheticLambda$0$d228a10f0bfc04a1b739ea48d80802ecf7272e74fc5ce324d3912daa6c3f699e$0.call$bridge (RemoteConfigComponent.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraStateOrchestrator$1.call (CameraStateOrchestrator.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraStateOrchestrator$1.call (CameraStateOrchestrator.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator.lambda$execute$3 (CameraOrchestrator.java)
at androidx.room.QueryInterceptorDatabase$$InternalSyntheticLambda$1$85f7b0b96741a667a52972e7efd273be6767278122378fbc929e6702d78486b0$0.run$bridge (QueryInterceptorDatabase.java)
at com.otaliastudios.cameraview.internal.WorkerHandler.run (WorkerHandler.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator.execute (CameraOrchestrator.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator.lambda$sync$1 (CameraOrchestrator.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator$$InternalSyntheticLambda$1$8b677079dbbaae903a74c190d1ab73dae346936de4769c0e3a915f12c512d38e$0.run$bridge (CameraOrchestrator.java)
at android.os.Handler.handleCallback (Handler.java:914)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:225)
at android.os.HandlerThread.run (HandlerThread.java:67)
Caused by: android.hardware.camera2.legacy.LegacyExceptionUtils$BufferQueueAbandonedException:
at android.hardware.camera2.legacy.LegacyExceptionUtils.throwOnError (LegacyExceptionUtils.java:73)
at android.hardware.camera2.legacy.LegacyCameraDevice.getSurfaceSize (LegacyCameraDevice.java:637)
at android.hardware.camera2.utils.SurfaceUtils.getSurfaceSize (SurfaceUtils.java:84)
at android.hardware.camera2.params.OutputConfiguration. (OutputConfiguration.java:261)
at android.hardware.camera2.params.OutputConfiguration. (OutputConfiguration.java:146)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession (CameraDeviceImpl.java:510)
at com.otaliastudios.cameraview.engine.Camera2Engine.onStartBind (Camera2Engine.java)
at com.otaliastudios.cameraview.engine.CameraEngine.lambda$startBind$6 (CameraEngine.java)
at com.google.firebase.remoteconfig.RemoteConfigComponent$$InternalSyntheticLambda$0$d228a10f0bfc04a1b739ea48d80802ecf7272e74fc5ce324d3912daa6c3f699e$0.call$bridge (RemoteConfigComponent.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraStateOrchestrator$1.call (CameraStateOrchestrator.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraStateOrchestrator$1.call (CameraStateOrchestrator.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator.lambda$execute$3 (CameraOrchestrator.java)
at androidx.room.QueryInterceptorDatabase$$InternalSyntheticLambda$1$85f7b0b96741a667a52972e7efd273be6767278122378fbc929e6702d78486b0$0.run$bridge (QueryInterceptorDatabase.java)
at com.otaliastudios.cameraview.internal.WorkerHandler.run (WorkerHandler.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator.execute (CameraOrchestrator.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator.lambda$sync$1 (CameraOrchestrator.java)
at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator$$InternalSyntheticLambda$1$8b677079dbbaae903a74c190d1ab73dae346936de4769c0e3a915f12c512d38e$0.run$bridge (CameraOrchestrator.java)
at android.os.Handler.handleCallback (Handler.java:914)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:225)
at android.os.HandlerThread.run (HandlerThread.java:67)'