natario1/CameraView

Exception: com.otaliastudios.cameraview.CameraException: java.lang.RuntimeException: start failed

Shamyyoun opened this issue · 0 comments

Hi,
I've received a lot of reported non-fatals with the following Exception and the camera can't open:

Non-fatal Exception: com.otaliastudios.cameraview.CameraException: java.lang.RuntimeException: start failed.
       at com.otaliastudios.cameraview.engine.CameraBaseEngine.onVideoResult(CameraBaseEngine.java:670)
       at com.otaliastudios.cameraview.engine.Camera1Engine.onVideoResult(Camera1Engine.java:468)
       at com.otaliastudios.cameraview.video.VideoRecorder.dispatchResult(VideoRecorder.java:138)
       at com.otaliastudios.cameraview.video.FullVideoRecorder.onStop(FullVideoRecorder.java:359)
       at com.otaliastudios.cameraview.video.VideoRecorder.stop(VideoRecorder.java:98)
       at com.otaliastudios.cameraview.video.FullVideoRecorder.onStart(FullVideoRecorder.java:320)
       at com.otaliastudios.cameraview.video.VideoRecorder.start(VideoRecorder.java:80)
       at com.otaliastudios.cameraview.engine.Camera1Engine.onTakeVideo(Camera1Engine.java:426)
       at com.otaliastudios.cameraview.engine.CameraBaseEngine$5.run(CameraBaseEngine.java:605)
       at com.otaliastudios.cameraview.engine.orchestrator.CameraStateOrchestrator$3.run(CameraStateOrchestrator.java:100)
       at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator$1.call(CameraOrchestrator.java:84)
       at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator$1.call(CameraOrchestrator.java:81)
       at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator$3.run(CameraOrchestrator.java:152)
       at com.otaliastudios.cameraview.internal.WorkerHandler.run(WorkerHandler.java:137)
       at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator.execute(CameraOrchestrator.java:147)
       at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator.access$100(CameraOrchestrator.java:34)
       at com.otaliastudios.cameraview.engine.orchestrator.CameraOrchestrator$2.run(CameraOrchestrator.java:137)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:264)
       at android.os.HandlerThread.run(HandlerThread.java:67)

XML:

<com.otaliastudios.cameraview.CameraView
            android:id="@+id/camera_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:keepScreenOn="true"
            app:cameraAudio="off"
            app:cameraFacing="front"
            app:cameraFlash="off"
            app:cameraGestureLongTap="none"
            app:cameraGesturePinch="none"
            app:cameraGestureScrollHorizontal="exposureCorrection"
            app:cameraGestureScrollVertical="none"
            app:cameraGrid="off"
            app:cameraMode="video"
            app:cameraPlaySounds="false"
            app:cameraVideoSizeSmallest="true" />