Mariovc / ImagePicker

Android library to easily pick an image from gallery or camera app. The users can select their prefered gallery/camera app on a unique Intent. Initial gist:
https://gist.github.com/Mariovc/f06e70ebe8ca52fbbbe2
Apache License 2.0
158 stars 52 forks source link

Version 1.1.0: Crash on Acer Iconia Tab 10 when selecting image from "Gallery" app #25

Closed seasox closed 7 years ago

seasox commented 7 years ago

Worked with ImagePicker 1.0.5:

06-07 15:04:29.230 26432-26432/de.myapp.app E/AndroidRuntime: FATAL EXCEPTION: main Process: de.myapp.app, PID: 26432 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=131306, result=-1, data=Intent { dat=content://media/external/images/media/885 flg=0x1 }} to activity {de.myapp.app/de.myapp.app.activity.MainActivity}: java.lang.ArrayIndexOutOfBoundsException: length=4; index=4 at android.app.ActivityThread.deliverResults(ActivityThread.java:3929) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3972) at android.app.ActivityThread.-wrap16(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1537) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5728) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749) Caused by: java.lang.ArrayIndexOutOfBoundsException: length=4; index=4 at com.mvc.imagepicker.ImagePicker.decodeBitmap(ImagePicker.java:304) at com.mvc.imagepicker.ImagePicker.getImageFromResult(ImagePicker.java:222) at de.myapp.app.vehicle.VehicleDetailsFragment.onActivityResult(VehicleDetailsFragment.java:243) at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:164) at android.app.Activity.dispatchActivityResult(Activity.java:6461) at android.app.ActivityThread.deliverResults(ActivityThread.java:3925) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3972)  at android.app.ActivityThread.-wrap16(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1537)  at android.os.Handler.dispatchMessage(Handler.java:111)  at android.os.Looper.loop(Looper.java:207)  at android.app.ActivityThread.main(ActivityThread.java:5728)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749) 

Mariovc commented 7 years ago

You was right. Thank you for the report. It was an important crash now fixed on version 1.1.1.