wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.96k stars 1.31k forks source link

Crash report 5.6: IAE in com.yalantis.ucrop.task.BitmapCropTask.crop #4454

Closed maxme closed 7 years ago

maxme commented 8 years ago

It comes from the com.yalantis.ucrop library, but it's one of the top crash, we should fix the lib.

Fatal Exception: java.lang.RuntimeException: An error occured while executing doInBackground()
       at android.os.AsyncTask$3.done(AsyncTask.java:300)
       at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
       at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
       at java.util.concurrent.FutureTask.run(FutureTask.java:242)
       at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)
Caused by java.lang.IllegalArgumentException: width must be > 0
       at android.graphics.Bitmap.checkWidthHeight(Bitmap.java:373)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:664)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:633)
       at com.yalantis.ucrop.task.BitmapCropTask.crop(BitmapCropTask.java:144)
       at com.yalantis.ucrop.task.BitmapCropTask.doInBackground(BitmapCropTask.java:88)
       at com.yalantis.ucrop.task.BitmapCropTask.doInBackground(BitmapCropTask.java:24)
       at android.os.AsyncTask$2.call(AsyncTask.java:288)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)
hypest commented 7 years ago

It seems there is a newer version of the lib and it might have fixed this issue as well. See https://github.com/Yalantis/uCrop/issues/134#issuecomment-228707026

I'll work on upgrading the app to the newer lib.

aforcier commented 7 years ago

It looks like #4564 fixed the issue: I'm not seeing any crashes after 5.8.1. Can we close this @hypest?