Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default value passed to the compose parameters does not work. #2223

Open
DueDDSPhinX opened this issue Nov 20, 2024 · 0 comments
Open

The default value passed to the compose parameters does not work. #2223

DueDDSPhinX opened this issue Nov 20, 2024 · 0 comments

Comments

@DueDDSPhinX
Copy link

DueDDSPhinX commented Nov 20, 2024

I have upgraded the KSP to "2.0.21-1.0.28"

And now, I have faced a problem whenever I add the default value to the Composable's parameters:

@Composable
fun TabViewContent(
	viewModel: TabViewContentViewModel,
	uiState: BaseViewState<*>,
	navigator: NavigationProvider,
	dismissSearchGuidance: () -> Unit = {},
	onSortingSelectionChange: (GroupSortingMenuItem?) -> Unit = {},
	updateSavedSearchCondition: (SavedSearchCriteriaModel?) -> Unit = {},
	drawerIsClosed: () -> Unit = {},
	eventLogging: EventLogging,
	directNavigateToCarNames: (CarSearchMakerListParams?) -> Unit = {},
	homeIsInitialized: () -> Unit = {},
) {}

The Android Runtime throws an error:

2024-11-20 11:21:46.666 15587-15587 AndroidRuntime          abc.app.xyz.dev          D  Shutting down VM
2024-11-20 11:21:46.667 15587-15587 AndroidRuntime          abc.app.xyz.dev          E  FATAL EXCEPTION: main
                                                                                                    Process: abc.app.xyz.dev, PID: 15587
                                                                                                    java.lang.VerifyError: Verifier rejected class abc.app.xyz.presentation.tabs.tabview.views.TabViewContentKt: void abc.app.xyz.presentation.tabs.tabview.views.TabViewContentKt.TabViewContent(abc.app.xyz.presentation.tabs.tabview.views.TabViewContentViewModel, abc.app.xyz.commons.architecture.base.mvi.BaseViewState, abc.app.xyz.commons.providers.NavigationProvider, kotlin.jvm.functions.Function0, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function0, abc.app.xyz.data.logging.EventLogging, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function0, androidx.compose.runtime.Composer, int, int) failed to verify: void abc.app.xyz.presentation.tabs.tabview.views.TabViewContentKt.TabViewContent(abc.app.xyz.presentation.tabs.tabview.views.TabViewContentViewModel, abc.app.xyz.commons.architecture.base.mvi.BaseViewState, abc.app.xyz.commons.providers.NavigationProvider, kotlin.jvm.functions.Function0, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function0, abc.app.xyz.data.logging.EventLogging, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function0, androidx.compose.runtime.Composer, int, int): [0xBC1] copy1 v3<-v289 type=Reference: kotlin.jvm.functions.Function1 cat=1 (declaration of 'abc.app.xyz.presentation.tabs.tabview.views.TabViewContentKt' appears in /data/app/~~IcUUXqcQzYmpruxFswfYGA==/abc.app.xyz.dev-NoDGExKJzDweM2YT8zX_Rw==/base.apk!classes16.dex)
                                                                                                        at abc.app.xyz.destinations.TabViewContainerDestination.Content(TabViewContainerDestination.kt:33)
                                                                                                        at com.ramcosta.composedestinations.spec.DestinationStyleKt.CallComposable(DestinationStyle.kt:263)
                                                                                                        at com.ramcosta.composedestinations.spec.DestinationStyleKt.access$CallComposable(DestinationStyle.kt:1)
                                                                                                        at com.ramcosta.composedestinations.spec.DestinationStyle$Animated$addComposable$1.invoke(DestinationStyle.kt:122)
                                                                                                        at com.ramcosta.composedestinations.spec.DestinationStyle$Animated$addComposable$1.invoke(DestinationStyle.kt:118)
                                                                                                        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:139)
                                                                                                        at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                        at androidx.navigation.compose.NavHostKt$NavHost$32$1.invoke(NavHost.kt:694)
                                                                                                        at androidx.navigation.compose.NavHostKt$NavHost$32$1.invoke(NavHost.kt:693)
                                                                                                        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:401)
                                                                                                        at androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider(SaveableStateHolder.kt:85)
                                                                                                        at androidx.navigation.compose.NavBackStackEntryProviderKt.SaveableStateProvider(NavBackStackEntryProvider.kt:65)
                                                                                                        at androidx.navigation.compose.NavBackStackEntryProviderKt.access$SaveableStateProvider(NavBackStackEntryProvider.kt:1)
                                                                                                        at androidx.navigation.compose.NavBackStackEntryProviderKt$LocalOwnersProvider$1.invoke(NavBackStackEntryProvider.kt:52)
                                                                                                        at androidx.navigation.compose.NavBackStackEntryProviderKt$LocalOwnersProvider$1.invoke(NavBackStackEntryProvider.kt:51)
                                                                                                        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:380)
                                                                                                        at androidx.navigation.compose.NavBackStackEntryProviderKt.LocalOwnersProvider(NavBackStackEntryProvider.kt:47)
                                                                                                        at androidx.navigation.compose.NavHostKt$NavHost$32.invoke(NavHost.kt:693)
                                                                                                        at androidx.navigation.compose.NavHostKt$NavHost$32.invoke(NavHost.kt:674)
2024-11-20 11:21:46.668 15587-15587 AndroidRuntime          abc.app.xyz.dev          E      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.animation.AnimatedContentKt$AnimatedContent$6$1$5.invoke(AnimatedContent.kt:803)
                                                                                                        at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$5.invoke(AnimatedContent.kt:792)
                                                                                                        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.animation.AnimatedVisibilityKt.AnimatedEnterExitImpl(AnimatedVisibility.kt:771)
                                                                                                        at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1.invoke(AnimatedContent.kt:774)
                                                                                                        at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1.invoke(AnimatedContent.kt:757)
                                                                                                        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.animation.AnimatedContentKt.AnimatedContent(AnimatedContent.kt:816)
                                                                                                        at androidx.navigation.compose.NavHostKt.NavHost(NavHost.kt:646)
                                                                                                        at androidx.navigation.compose.NavHostKt.NavHost(NavHost.kt:212)
                                                                                                        at com.ramcosta.composedestinations.DefaultNavHostEngine.NavHost(DefaultNavHostEngine.kt:56)
                                                                                                        at com.ramcosta.composedestinations.DestinationsNavHostKt.DestinationsNavHost(DestinationsNavHost.kt:76)
                                                                                                        at abc.app.xyz.presentation.tabs.tabview.TabViewKt$TabView$2$1.invoke(TabView.kt:51)
                                                                                                        at abc.app.xyz.presentation.tabs.tabview.TabViewKt$TabView$2$1.invoke(TabView.kt:50)
                                                                                                        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.material.SurfaceKt$Surface$1.invoke(Surface.kt:134)
                                                                                                        at androidx.compose.material.SurfaceKt$Surface$1.invoke(Surface.kt:114)
                                                                                                        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:380)
                                                                                                        at androidx.compose.material.SurfaceKt.Surface-F-jzlyU(Surface.kt:111)
                                                                                                        at abc.app.xyz.presentation.tabs.tabview.TabViewKt$TabView$2.invoke(TabView.kt:50)
                                                                                                        at abc.app.xyz.presentation.tabs.tabview.TabViewKt$TabView$2.invoke(TabView.kt:49)
                                                                                                        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:401)
                                                                                                        at androidx.compose.material3.TextKt.ProvideTextStyle(Text.kt:349)
                                                                                                        at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:69)
                                                                                                        at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:68)
                                                                                                        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:380)
                                                                                                        at androidx.compose.material3.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:60)
                                                                                                        at abc.app.xyz.commons.theme.ThemeKt$AppTheme$2.invoke(Theme.kt:97)
                                                                                                        at abc.app.xyz.commons.theme.ThemeKt$AppTheme$2.invoke(Theme.kt:96)
                                                                                                        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:401)
2024-11-20 11:21:46.669 15587-15587 AndroidRuntime          abc.app.xyz.dev          E      at abc.app.xyz.commons.theme.ThemeKt.AppTheme(Theme.kt:94)
                                                                                                        at abc.app.xyz.presentation.tabs.tabview.TabViewKt.TabView(TabView.kt:49)
                                                                                                        at abc.app.xyz.presentation.tabs.TabActivity$onCreate$1.invoke(TabActivity.kt:48)
                                                                                                        at abc.app.xyz.presentation.tabs.TabActivity$onCreate$1.invoke(TabActivity.kt:46)
                                                                                                        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.ui.platform.ComposeView.Content(ComposeView.android.kt:441)
                                                                                                        at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:259)
                                                                                                        at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:258)
                                                                                                        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:380)
                                                                                                        at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:216)
                                                                                                        at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:132)
                                                                                                        at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:131)
                                                                                                        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:380)
                                                                                                        at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:121)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:155)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:154)
                                                                                                        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:401)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:154)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:133)
                                                                                                        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.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:97)
                                                                                                        at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3595)
                                                                                                        at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3522)
                                                                                                        at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:743)
                                                                                                        at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1122)
                                                                                                        at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:649)
                                                                                                        at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:635)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:124)
                                                                                                        at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1626)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:124)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:180)
                                                                                                        at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.jvm.kt:320)
2024-11-20 11:21:46.670 15587-15587 AndroidRuntime          abc.app.xyz.dev          E      at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.jvm.kt:198)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
                                                                                                        at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:124)
                                                                                                        at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1707)
                                                                                                        at android.view.View.dispatchAttachedToWindow(View.java:22860)
                                                                                                        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3492)
                                                                                                        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3499)
                                                                                                        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3499)
                                                                                                        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3499)
                                                                                                        at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3499)
                                                                                                        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3443)
                                                                                                        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2917)
                                                                                                        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10324)
                                                                                                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1406)
                                                                                                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
                                                                                                        at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
                                                                                                        at android.view.Choreographer.doFrame(Choreographer.java:945)
                                                                                                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
                                                                                                        at android.os.Handler.handleCallback(Handler.java:959)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:100)
                                                                                                        at android.os.Looper.loopOnce(Looper.java:232)
                                                                                                        at android.os.Looper.loop(Looper.java:317)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:8705)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant