wasabeef / picasso-transformations

An Android transformation library providing a variety of image transformations for Picasso

Repository from Github https://github.comwasabeef/picasso-transformationsRepository from Github https://github.comwasabeef/picasso-transformations

CropTransformation.java sometimes crashes

kutukoff opened this issue · comments

.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)

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

we have the same issue.