Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-9477

Android app crashes on image capture

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 5.1.1
    • None
    • cordova-plugin-camera
    • None
    • Android

    Description

      When doing a camera capture, after selecting okay on the image, the app crashes and it throws this error in the logcat.

      This is on a Moto G device running 4.4.4

      08-10 16:52:34.488 28126-28126/com.joltup.joltmobile E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: com.joltup.joltmobile, PID: 28126
      java.lang.RuntimeException: Unable to resume activity

      {com.joltup.joltmobile/com.joltup.joltmobile.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=-1, data=null} to activity {com.joltup.joltmobile/com.joltup.joltmobile.MainActivity}

      : java.lang.NullPointerException
      at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2812)
      at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2845)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2262)
      at android.app.ActivityThread.access$800(ActivityThread.java:139)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:136)
      at android.app.ActivityThread.main(ActivityThread.java:5086)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:515)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
      at dalvik.system.NativeStart.main(Native Method)
      Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo

      {who=null, request=34, result=-1, data=null}

      to activity

      {com.joltup.joltmobile/com.joltup.joltmobile.MainActivity}

      : java.lang.NullPointerException
      at android.app.ActivityThread.deliverResults(ActivityThread.java:3432)
      at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2788)
                  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2845)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2262)
                  at android.app.ActivityThread.access$800(ActivityThread.java:139)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:136)
                  at android.app.ActivityThread.main(ActivityThread.java:5086)
                  at java.lang.reflect.Method.invokeNative(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:515)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
                  at dalvik.system.NativeStart.main(Native Method)
      Caused by: java.lang.NullPointerException
      at org.apache.cordova.camera.CameraLauncher.processResultFromCamera(CameraLauncher.java:445)
      at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:674)
      at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120)
      at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:320)
      at android.app.Activity.dispatchActivityResult(Activity.java:5446)
      at android.app.ActivityThread.deliverResults(ActivityThread.java:3428)
                  at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2788)
                  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2845)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2262)
                  at android.app.ActivityThread.access$800(ActivityThread.java:139)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:136)
                  at android.app.ActivityThread.main(ActivityThread.java:5086)
                  at java.lang.reflect.Method.invokeNative(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:515)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
                  at dalvik.system.NativeStart.main(Native Method)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              thuey100 Trevor Huey
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: