MasayukiSuda / CameraRecorder-android

Video Recording with Camera2 and apply video filter.
MIT License
254 stars 73 forks source link

Fatal Exception: java.lang.NullPointerException (Android 11) #36

Open shrini-getwasabi opened 3 years ago

shrini-getwasabi commented 3 years ago

Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference com.daasuu.camerarecorder.CameraThread.stopPreview (CameraThread.java:255) com.daasuu.camerarecorder.CameraHandler.handleMessage (CameraHandler.java:86)

shrini-getwasabi commented 3 years ago

Fatal Exception: java.lang.IllegalStateException CameraDevice was already closed

android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError (CameraDeviceImpl.java:2285) android.hardware.camera2.impl.CameraDeviceImpl.submitCaptureRequest (CameraDeviceImpl.java:1163) android.hardware.camera2.impl.CameraDeviceImpl.setRepeatingRequest (CameraDeviceImpl.java:1236) android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest (CameraCaptureSessionImpl.java:313) com.daasuu.camerarecorder.CameraThread.updatePreview (CameraThread.java:132) com.daasuu.camerarecorder.CameraThread.access$300 (CameraThread.java:31) com.daasuu.camerarecorder.CameraThread$2.onConfigured (CameraThread.java:113) android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.lambda$onConfigured$0$CallbackProxies$SessionStateCallbackProxy (CallbackProxies.java:53) android.hardware.camera2.impl.-$$Lambda$CallbackProxies$SessionStateCallbackProxy$soW0qC12Osypoky6AfL3P2-TeDw.run (-.java:4) android.os.Handler.handleCallback (Handler.java:938)