Abhimanyu14 / compose-emoji-picker

Apache License 2.0
32 stars 1 forks source link

Fatal Exception: java.lang.IllegalArgumentException: Padding must be non-negative #2

Closed nizam-betterapp closed 7 months ago

nizam-betterapp commented 7 months ago

We are getting the following crash in the app. Can you please help us fix this issue? we are using alpha11 version

implementation "com.github.Abhimanyu14:compose-emoji-picker:1.0.0-alpha11"

Fatal Exception: java.lang.IllegalArgumentException: Padding must be non-negative
       at androidx.compose.foundation.layout.PaddingElement.<init>(Padding.kt:336)
       at androidx.compose.foundation.layout.PaddingElement.<init>(Padding.kt:64)
       at androidx.compose.foundation.layout.PaddingKt.padding-VpY3zN4(Padding.kt:85)
       at androidx.compose.foundation.layout.AlignmentLineKt.paddingFrom-4j6BHR0(AlignmentLine.kt:82)
       at androidx.compose.foundation.layout.PaddingKt.padding-VpY3zN4$default(Padding.kt:82)
       at com.makeappssimple.abhimanyu.composeemojipicker.ComposeEmojiPickerBottomSheetUIKt$ComposeEmojiPickerBottomSheetUI$2$2$1$1$2$1.invoke(ComposeEmojiPickerBottomSheetUI.kt:308)
       at com.makeappssimple.abhimanyu.composeemojipicker.ComposeEmojiPickerBottomSheetUIKt$ComposeEmojiPickerBottomSheetUI$2$2$1$1$2$1.invoke(ComposeEmojiPickerBottomSheetUI.kt:298)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:118)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
       at androidx.compose.foundation.lazy.LazyListIntervalContent$item$3.invoke(LazyListIntervalContent.kt:59)
       at androidx.compose.foundation.lazy.LazyListIntervalContent$item$3.invoke(LazyListIntervalContent.kt:59)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:139)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
       at androidx.compose.foundation.lazy.LazyListItemProviderImpl$Item$1.invoke(LazyListItemProviderImpl.java:79)
       at androidx.compose.foundation.lazy.LazyListItemProviderImpl$Item$1.invoke(LazyListItemProviderImpl.java:77)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
       at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:213)
       at androidx.compose.foundation.lazy.layout.LazyLayoutPinnableItemKt.LazyLayoutPinnableItem(LazyLayoutPinnableItem.kt:58)
       at androidx.compose.foundation.lazy.LazyListItemProviderImpl.Item(LazyListItemProvider.kt:77)
       at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$SkippableItem$1.invoke(LazyLayoutItemContentFactory.kt:135)
       at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt$SkippableItem$1.invoke(LazyLayoutItemContentFactory.kt:134)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
       at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:213)
       at androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider(SaveableStateHolder.kt:84)
       at androidx.compose.foundation.lazy.layout.LazySaveableStateHolder.SaveableStateProvider(LazySaveableStateHolder.kt:85)
       at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt.SkippableItem-JVlU9Rs(LazyLayoutItemContentFactory.kt:134)
       at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactoryKt.access$SkippableItem-JVlU9Rs(LazyLayoutItemContentFactory.kt:1)
       at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactory$CachedItemContent$createContentLambda$1.invoke(LazyLayoutItemContentFactory.kt:101)
       at androidx.compose.foundation.lazy.layout.LazyLayoutItemContentFactory$CachedItemContent$createContentLambda$1.invoke(LazyLayoutItemContentFactory.java:91)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
       at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
       at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.java:192)
       at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2556)
       at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2827)
       at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3314)
       at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3265)
       at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:940)
       at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1155)
       at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:127)
       at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:583)
       at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.java:551)
       at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41)
       at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.java:109)
       at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.java:41)
       at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1341)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1352)
       at android.view.Choreographer.doCallbacks(Choreographer.java:952)
       at android.view.Choreographer.doFrame(Choreographer.java:878)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1326)
       at android.os.Handler.handleCallback(Handler.java:958)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:205)
       at android.os.Looper.loop(Looper.java:294)
       at android.app.ActivityThread.main(ActivityThread.java:8248)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Abhimanyu14 commented 7 months ago

Hi @nizam-betterapp, Can you please try version alpha12 and let me know if the issue persists?

nizam-betterapp commented 7 months ago

Thanks for the quick fix @Abhimanyu14 . We are not able to reproduce this issue consistently. we will roll this out and let u know if we see any new crashes from real users. Thanks!