wasabeef / picasso-transformations

An Android transformation library providing a variety of image transformations for Picasso
Apache License 2.0
1.69k stars 238 forks source link

CropTransformation.java sometimes crashes #25

Open kutukoff opened 8 years ago

kutukoff commented 8 years ago

.transform(new CropTransformation(1.2f, CropTransformation.GravityHorizontal.CENTER, CropTransformation.GravityVertical.TOP))

Fatal Exception: java.lang.RuntimeException
Transformation CropTransformation(width=600, height=451, mWidthRatio=0.0, mHeightRatio=0.0, mAspectRatio=1.33, gravityHorizontal=CENTER, mGravityVertical=TOP) crashed with exception.

Caused by java.lang.NullPointerException
android.graphics.Canvas. (Canvas.java:136)
jp.wasabeef.picasso.transformations.CropTransformation.transform (CropTransformation.java:301)
com.squareup.picasso.BitmapHunter.applyCustomTransformations (BitmapHunter.java:429)
com.squareup.picasso.BitmapHunter.hunt (BitmapHunter.java:238)
com.squareup.picasso.BitmapHunter.run (BitmapHunter.java:159)
java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:422)
java.lang.Thread.run (Thread.java:848)
com.squareup.picasso.Utils$PicassoThread.run (Utils.java:411)
DenK91 commented 7 years ago

The same issue is reproduced on Blur case only on 4.4.2: stat crash.txt

vahid-m commented 5 years ago

we have the same issue.