Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Camera2 always crashes after Permission Dialog #1

Closed
andhie opened this issue Sep 10, 2016 · 4 comments
Closed

Camera2 always crashes after Permission Dialog #1

andhie opened this issue Sep 10, 2016 · 4 comments
Labels

Comments

@andhie
Copy link

andhie commented Sep 10, 2016

  1. Build and run the Demo app
  2. When the Permission dialog pops up, just accept it
  3. Demo app crashes immediately
    --- or ---
  4. Revoke the Permission from Setting and re-enter the app,
  5. after the Permission Rationale dialog is shown, just accept the Permission Dialog
  6. watch it crash again.

Device: Nexus 5x running on Nougat (NRD90M)

https://github.com/google/cameraview/blob/master/library/src/main/camera2/com/google/android/cameraview/Camera2.java#L132

09-11 07:05:44.562 23963-23963/com.google.android.cameraview.demo E/AndroidRuntime: FATAL EXCEPTION: main
     Process: com.google.android.cameraview.demo, PID: 23963
     java.lang.IllegalStateException: Session has been closed; further changes are illegal.
         at android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:606)
         at android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:227)
         at com.google.android.cameraview.Camera2$3.onConfigured(Camera2.java:132)
         at java.lang.reflect.Method.invoke(Native Method)
         at android.hardware.camera2.dispatch.InvokeDispatcher.dispatch(InvokeDispatcher.java:39)
         at android.hardware.camera2.dispatch.HandlerDispatcher$1.run(HandlerDispatcher.java:65)
         at android.os.Handler.handleCallback(Handler.java:751)
         at android.os.Handler.dispatchMessage(Handler.java:95)
         at android.os.Looper.loop(Looper.java:154)
         at android.app.ActivityThread.main(ActivityThread.java:6077)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
@AlirezaAkbarix
Copy link

I faced this problem too!

@suryakencana007
Copy link

suryakencana007 commented Sep 14, 2016

same with me, i got this error too

@yaraki yaraki added the bug label Sep 15, 2016
@pzhangleo
Copy link

same error

@matghazaryan
Copy link

Is anyone know how to fix it?

ivacf added a commit to monzo/cameraview that referenced this issue Sep 27, 2016
ivacf added a commit to monzo/cameraview that referenced this issue Oct 2, 2016
@yaraki yaraki closed this as completed in ebc1772 Oct 4, 2016
oskaratcodedesign pushed a commit to studiocodedesign/cameraview that referenced this issue Oct 27, 2017
Fix crash when click on rotate camera icon + take pic fast
ewolfox pushed a commit to ewolfox/cameraview that referenced this issue Apr 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants