jayrambhia / CropperNoCropper

Instagram Style Image Cropper for Android (Library)
http://www.jayrambhia.com/project/nocropper-library
Apache License 2.0
474 stars 99 forks source link

java.lang.IllegalArgumentException: y must be >= 0 #27

Closed iammert closed 6 years ago

iammert commented 7 years ago

Version 0.1.7 works as intented but after updating v0.2 I get this exception.

Fatal Exception: java.lang.IllegalArgumentException: y must be >= 0
       at android.graphics.Bitmap.checkXYSign(Bitmap.java:366)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:683)
       at com.fenchtose.nocropper.CropperImageView.getCroppedBitmap(SourceFile:861)
       at com.fenchtose.nocropper.CropperImageView.cropBitmap(SourceFile:679)
       at com.fenchtose.nocropper.CropperView.getCroppedBitmap(SourceFile:100)
prajwal-appiness commented 7 years ago

Same is happening for me too. And the app is crashing.

jayrambhia commented 6 years ago

Fixed in 0.2.1

Tanv33rA commented 5 years ago

This crash is occurring in 0.3.0 .

Fatal Exception: java.lang.IllegalArgumentException: x must be >= 0 at android.graphics.Bitmap.checkXYSign(Bitmap.java:405) at android.graphics.Bitmap.createBitmap(Bitmap.java:800) at android.graphics.Bitmap.createBitmap(Bitmap.java:769) at com.fenchtose.nocropper.BitmapUtils.getCroppedBitmap(BitmapUtils.java:14) at com.fenchtose.nocropper.CropperImageView.getCroppedBitmap(CropperImageView.java:776) at com.fenchtose.nocropper.CropperImageView.getCroppedBitmap(CropperImageView.java:782) at com.fenchtose.nocropper.CropperImageView.cropBitmap(CropperImageView.java:665) at com.fenchtose.nocropper.CropperView.getCroppedBitmap(CropperView.java:113) at com.example.boss.plantify.ui.CroppingActivity.cropImage(CroppingActivity.java:66) at com.example.boss.plantify.ui.CroppingActivity.lambda$onCreate$0(CroppingActivity.java:55) at com.example.boss.plantify.ui.-$$Lambda$CroppingActivity$zXSJ9yWXkMMgVHnkrIWVtuFsquk.onClick(Unknown Source:2) at android.view.View.performClick(View.java:6897) at android.widget.TextView.performClick(TextView.java:12653) at android.view.View$PerformClick.run(View.java:26097) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6940) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)