Mindinventory / Lassi-Android

All in 1 picker library for android.
https://www.mindinventory.com/android-application-development.php
MIT License
201 stars 50 forks source link

FATAL EXCEPTION #108

Closed AndyDesign999 closed 7 months ago

AndyDesign999 commented 10 months ago

Facing crash when picking image from gallery with crop feature. Lassi-Android - v 1.3.0 Device : Android 13, API 33

 val imagePicker = Lassi(this@BusinessInfoActivity)
                            .with(LassiOption.CAMERA_AND_GALLERY)
                            .setMaxCount(1)
                            .setGridSize(3)
                            .setMediaType(MediaType.IMAGE)
                            .setCompressionRatio(Constants.IMAGE_PICKER_COMPRESSION_RATIO)
                            .setStatusBarColor(R.color.colorPrimaryDark)
                            .setToolbarResourceColor(R.color.colorPrimaryDark)
                            .setToolbarResourceColor(R.color.white)
                            .setProgressBarColor(R.color.loader_tint_color)
                            .setCropType(CropImageView.CropShape.RECTANGLE)
                            .enableFlip()
                            .enableRotate()
                            .enableActualCircleCrop()
java.lang.NullPointerException: Parameter specified as non-null is null: method com.lassi.presentation.cropper.CropImageContract.createIntent, parameter input
                                                                                                        at com.lassi.presentation.cropper.CropImageContract.createIntent(Unknown Source:7)
                                                                                                        at com.lassi.presentation.cropper.CropImageContract.createIntent(CropImageContract.kt:16)
                                                                                                        at androidx.activity.ComponentActivity$2.onLaunch(ComponentActivity.java:216)
                                                                                                        at androidx.activity.result.ActivityResultRegistry$2.launch(ActivityResultRegistry.java:175)
                                                                                                        at androidx.fragment.app.Fragment$10.launch(Fragment.java:3632)
                                                                                                        at androidx.activity.result.ActivityResultLauncher.launch(ActivityResultLauncher.java:47)
                                                                                                        at com.lassi.presentation.media.MediaFragment.croppingOptions(MediaFragment.kt:159)
                                                                                                        at com.lassi.presentation.media.MediaFragment.croppingOptions$default(MediaFragment.kt:155)
                                                                                                        at com.lassi.presentation.media.MediaFragment.onItemClick(MediaFragment.kt:220)
                                                                                                        at com.lassi.presentation.media.MediaFragment.access$onItemClick(MediaFragment.kt:44)
                                                                                                        at com.lassi.presentation.media.MediaFragment$mediaAdapter$2$1.invoke(MediaFragment.kt:47)
                                                                                                        at com.lassi.presentation.media.MediaFragment$mediaAdapter$2$1.invoke(MediaFragment.kt:47)
                                                                                                        at com.lassi.presentation.media.adapter.MediaAdapter$MyViewHolder.bind$lambda$3$lambda$2$lambda$1(MediaAdapter.kt:91)
                                                                                                        at com.lassi.presentation.media.adapter.MediaAdapter$MyViewHolder.$r8$lambda$JihE_yk2QvRcFUbgBl0HQ5IT_mY(Unknown Source:0)
                                                                                                        at com.lassi.presentation.media.adapter.MediaAdapter$MyViewHolder$$ExternalSyntheticLambda0.onClick(Unknown Source:8)
                                                                                                        at android.view.View.performClick(View.java:7558)
                                                                                                        at android.view.View.performClickInternal(View.java:7534)
                                                                                                        at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
                                                                                                        at android.view.View$PerformClick.run(View.java:29661)
                                                                                                        at android.os.Handler.handleCallback(Handler.java:942)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                        at android.os.Looper.loopOnce(Looper.java:240)
                                                                                                        at android.os.Looper.loop(Looper.java:351)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:8364)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
sanjay-mi commented 7 months ago

Hello @AndyDesign999

Thank you for using the Lassi Library.

We have resolved the issue in the latest Lassi version Kindly use version 1.4.0.

Thank you