I can't reproduce this bug consistently, but sometimes, when I try to take a video with the library, I just can't press stop. The button UI reacts but nothing happends, no logs, nothing.
All I can say is when I got this bug, if I finish the activity and try to reopen it I got a crash with this stack trace :
EDIT : way to reproduce the bug : Start a photo activity, take a photo (skipConfirm(), don't know if it's mandatory thought), start a video activity : start recording, can't stop the vidéo recording
Process: com.m360learning.android, PID: 9267
java.lang.IllegalStateException: CameraDevice was already closed
at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:1997)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSessionInternal(CameraDeviceImpl.java:542)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:476)
at com.commonsware.cwac.cam2.CameraTwoEngine$InitPreviewTransaction.onOpened(CameraTwoEngine.java:409)
at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:134)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
second kind of crash (lauch videoActivity, start recording, back relaunch activity, can't start recording, back again, few seconds later : crash)
Process: com.m360learning.android, PID: 10912
java.lang.IllegalStateException
at android.media.MediaRecorder.stop(Native Method)
at com.commonsware.cwac.cam2.ClassicCameraEngine.onInfo(ClassicCameraEngine.java:364)
at android.media.MediaRecorder$EventHandler.handleMessage(MediaRecorder.java:1036)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)