Do you want to request a feature or report a bug?
Bug?
What is the current behavior?
Crash
What is the expected behavior?
No crash
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Put GestureCrop image in layout and set image programmatically
Please attach any image files, URL and stack trace that can be used to reproduce the bug.
java.lang.NullPointerException: Attempt to get length of null array
at android.graphics.Matrix.mapPoints(Matrix.java:668)
at com.yalantis.ucrop.view.TransformImageView.updateCurrentImagePoints(TransformImageView.java:336)
at com.yalantis.ucrop.view.TransformImageView.setImageMatrix(TransformImageView.java:200)
at com.yalantis.ucrop.view.TransformImageView.postTranslate(TransformImageView.java:221)
at com.yalantis.ucrop.view.GestureCropImageView$GestureListener.onScroll(GestureCropImageView.java:136)
at android.view.GestureDetector.onTouchEvent(GestureDetector.java:714)
at com.yalantis.ucrop.view.GestureCropImageView.onTouchEvent(GestureCropImageView.java:80)
at android.view.View.dispatchTouchEvent(View.java:14309)
...
Which versions of uCrop, and which Android API versions are affected by this issue? Did this work in previous versions of uCrop?
2.2.6
Investigation
Looks like the initialisation in this scenario doesn't finish/go in the right way.
Do you want to request a feature or report a bug? Bug?
What is the current behavior? Crash
What is the expected behavior? No crash
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Put GestureCrop image in layout and set image programmatically
Please attach any image files, URL and
stack trace
that can be used to reproduce the bug. java.lang.NullPointerException: Attempt to get length of null array at android.graphics.Matrix.mapPoints(Matrix.java:668) at com.yalantis.ucrop.view.TransformImageView.updateCurrentImagePoints(TransformImageView.java:336) at com.yalantis.ucrop.view.TransformImageView.setImageMatrix(TransformImageView.java:200) at com.yalantis.ucrop.view.TransformImageView.postTranslate(TransformImageView.java:221) at com.yalantis.ucrop.view.GestureCropImageView$GestureListener.onScroll(GestureCropImageView.java:136) at android.view.GestureDetector.onTouchEvent(GestureDetector.java:714) at com.yalantis.ucrop.view.GestureCropImageView.onTouchEvent(GestureCropImageView.java:80) at android.view.View.dispatchTouchEvent(View.java:14309) ...Which versions of uCrop, and which Android API versions are affected by this issue? Did this work in previous versions of uCrop? 2.2.6
Investigation Looks like the initialisation in this scenario doesn't finish/go in the right way.