Skip to content

Sample code crashes #13

Description

@yakubbaev

Phone: Samsung Galaxy Nexus
OS: Android 4.1.2
Steps:

  1. Build & run app from Android Studio
  2. Click 'Take a picture!' button
  3. Take a picture
  4. Click checkmark on default take photo screen
    App crashes with stack trace:
09-07 17:46:56.007    2595-2595/de.ecotastic.android.camerautil.sample E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=100, result=-1, data=Intent { act=inline-data (has extras) }} to     activity {de.ecotastic.android.camerautil.sample/de.ecotastic.android.camerautil.sample.CameraIntentActivity}: java.lang.NullPointerException
            at android.app.ActivityThread.deliverResults(ActivityThread.java:3141)
            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3184)
            at android.app.ActivityThread.access$1100(ActivityThread.java:130)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1243)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.NullPointerException
            at de.ecotastic.android.camerautil.sample.util.BitmapHelper.readBitmap(BitmapHelper.java:115)
            at de.ecotastic.android.camerautil.sample.CameraIntentActivity$2.onPhotoUriFound(CameraIntentActivity.java:57)
            at de.ecotastic.android.camerautil.lib.CameraIntentHelper.onPhotoUriFound(CameraIntentHelper.java:354)
            at de.ecotastic.android.camerautil.lib.CameraIntentHelper.onCameraIntentResult(CameraIntentHelper.java:319)
            at de.ecotastic.android.camerautil.lib.CameraIntentHelper.onActivityResult(CameraIntentHelper.java:207)
            at de.ecotastic.android.camerautil.sample.CameraIntentActivity.onActivityResult(CameraIntentActivity.java:113)
            at android.app.Activity.dispatchActivityResult(Activity.java:5192)
            at android.app.ActivityThread.deliverResults(ActivityThread.java:3137)
            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3184)
            at android.app.ActivityThread.access$1100(ActivityThread.java:130)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1243)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
            at dalvik.system.NativeStart.main(Native Method)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions