java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference

GitHub | remq | 4 months ago
  1. 0

    NULL reference exception on takePicture()

    GitHub | 4 months ago | remq
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference
  2. 0

    GitHub comment 55#268214701

    GitHub | 1 month ago | DaviddeMiguel
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference
  3. 0

    Taking images camera2api

    Stack Overflow | 8 months ago | Štěpán Kaspar
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Failed to create capture session; configuration failed

    GitHub | 5 months ago | plastic-kai
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference
  6. 0

    NPE com.commonsware.cwac.cam2.CameraTwoEngine$CapturePictureTransaction.unlockFocus (CameraTwoEngine.java:714)

    GitHub | 2 months ago | shahzadyounas
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference

    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.NullPointerException

      Attempt to invoke virtual method 'int android.hardware.camera2.CameraCaptureSession.capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession$CaptureCallback, android.os.Handler)' on a null object reference

      at com.google.android.cameraview.Camera2.unlockFocus()
    2. com.google.android
      Camera2$6.onCaptureCompleted
      1. com.google.android.cameraview.Camera2.unlockFocus(Camera2.java:625)
      2. com.google.android.cameraview.Camera2.access$900(Camera2.java:45)
      3. com.google.android.cameraview.Camera2$6.onCaptureCompleted(Camera2.java:609)
      3 frames
    3. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    4. Android
      HandlerDispatcher$1.run
      1. android.hardware.camera2.dispatch.InvokeDispatcher.dispatch(InvokeDispatcher.java:39)
      2. android.hardware.camera2.dispatch.HandlerDispatcher$1.run(HandlerDispatcher.java:65)
      2 frames
    5. Android Platform
      ActivityThread.main
      1. android.os.Handler.handleCallback(Handler.java:739)
      2. android.os.Handler.dispatchMessage(Handler.java:95)
      3. android.os.Looper.loop(Looper.java:135)
      4. android.app.ActivityThread.main(ActivityThread.java:5569)
      4 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:931)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:726)
      2 frames