Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taping to focus on point after having stopped the camera which crash #185

Closed
Diolor opened this issue Jan 19, 2018 · 0 comments
Closed

Taping to focus on point after having stopped the camera which crash #185

Diolor opened this issue Jan 19, 2018 · 0 comments
Labels

Comments

@Diolor
Copy link
Member

Diolor commented Jan 19, 2018

FATAL EXCEPTION: pool-22-thread-1 Process: io.fotoapparat.sample, PID: 4653
        java.lang.RuntimeException: Camera is being used after Camera.release() was called
        at android.hardware.Camera.native_setParameters(Native Method)
        at android.hardware.Camera.setParameters(Camera.java:1945)
        at io.fotoapparat.hardware.CameraDevice.updateFocusingAreas(CameraDevice.kt:323)
        at io.fotoapparat.hardware.CameraDevice.setFocalPoint$suspendImpl(CameraDevice.kt:233)
        at io.fotoapparat.hardware.CameraDevice.setFocalPoint(Unknown Source:0)
        at io.fotoapparat.routine.focus.FocusOnPointRoutineKt$focusOnPoint$1.doResume(FocusOnPointRoutine.kt:14)
        at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:54)
        at kotlinx.coroutines.experimental.DispatchTask.run(CoroutineDispatcher.kt:129)
        at kotlinx.coroutines.experimental.EventLoopBase.processNextEvent(EventLoop.kt:147)
        at kotlinx.coroutines.experimental.BlockingCoroutine.joinBlocking(Builders.kt:236)
        at kotlinx.coroutines.experimental.BuildersKt.runBlocking(Builders.kt:174)
        at kotlinx.coroutines.experimental.BuildersKt.runBlocking$default(Builders.kt:167)
        at io.fotoapparat.routine.focus.FocusOnPointRoutineKt.focusOnPoint(FocusOnPointRoutine.kt:11)
        at io.fotoapparat.routine.camera.StartRoutineKt$start$2$1.run(StartRoutine.kt:63)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)

We should unassign the on tap listener when stoping camera

@Diolor Diolor added the bug label Jan 19, 2018
Diolor added a commit that referenced this issue Jan 19, 2018
@Diolor Diolor closed this as completed in 72dcec0 Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant