java.lang.IllegalStateException: CameraDevice was already closed

GitHub | cpritchard | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Cannot Flip between front and rear camera in still capture mode

    GitHub | 6 months ago | cpritchard
    java.lang.IllegalStateException: CameraDevice was already closed
  2. 0

    CameraDevice was already closed

    GitHub | 5 months ago | toidv
    java.lang.IllegalStateException: CameraDevice was already closed
  3. 0

    Camera2 API and java.lang.IllegalStateException

    Stack Overflow | 2 weeks ago | kobasek
    java.lang.IllegalStateException: CameraDevice was already closed
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 11#247780077

    GitHub | 6 months ago | ungesehn
    java.lang.IllegalStateException: Session has been closed; further changes are illegal.
  6. 0

    Camera2 always crashes after Permission Dialog

    GitHub | 6 months ago | andhie
    java.lang.IllegalStateException: Session has been closed; further changes are illegal.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      CameraDevice was already closed

      at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError()
    2. Android
      CameraCaptureSessionImpl.setRepeatingRequest
      1. android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:1997)
      2. android.hardware.camera2.impl.CameraDeviceImpl.submitCaptureRequest(CameraDeviceImpl.java:844)
      3. android.hardware.camera2.impl.CameraDeviceImpl.setRepeatingRequest(CameraDeviceImpl.java:899)
      4. android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:236)
      4 frames
    3. com.afollestad.materialcamera
      Camera2Fragment.onClick
      1. com.afollestad.materialcamera.internal.Camera2Fragment.onPreferencesUpdated(Camera2Fragment.java:678)
      2. com.afollestad.materialcamera.internal.BaseCameraFragment.invalidateFlash(BaseCameraFragment.java:422)
      3. com.afollestad.materialcamera.internal.BaseCameraFragment.onFlashModesLoaded(BaseCameraFragment.java:165)
      4. com.afollestad.materialcamera.internal.Camera2Fragment.openCamera(Camera2Fragment.java:631)
      5. com.afollestad.materialcamera.internal.BaseCameraFragment.onClick(BaseCameraFragment.java:387)
      6. com.afollestad.materialcamera.internal.Camera2Fragment.onClick(Camera2Fragment.java:73)
      6 frames
    4. Android Platform
      ActivityThread.main
      1. android.view.View.performClick(View.java:5204)
      2. android.view.View$PerformClick.run(View.java:21153)
      3. android.os.Handler.handleCallback(Handler.java:739)
      4. android.os.Handler.dispatchMessage(Handler.java:95)
      5. android.os.Looper.loop(Looper.java:148)
      6. android.app.ActivityThread.main(ActivityThread.java:5417)
      6 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      2 frames