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

Cannot execute app release with Proguard 7.4.2 #4391

Open
mahozad opened this issue Feb 29, 2024 · 1 comment
Open

Cannot execute app release with Proguard 7.4.2 #4391

mahozad opened this issue Feb 29, 2024 · 1 comment
Labels
bug Something isn't working desktop gradle Gradle plugin problems native distribution

Comments

@mahozad
Copy link
Contributor

mahozad commented Feb 29, 2024

Describe the bug
When trying to execute runReleaseDistributable, app fails with this error:

Exception in thread "main" java.lang.VerifyError: Bad return type
Exception Details:
  Location:
    androidx/compose/runtime/SnapshotStateKt__DerivedStateKt.derivedStateOf$102ee4b4(Landroidx/compose/runtime/SnapshotMutationPolicy;Lkotlin/jvm/functions/Function0;)Landroidx/compose/runtime/DerivedSnapshotState; @24: areturn
  Reason:
    Type 'androidx/compose/runtime/State' (current frame, stack[0]) is not assignable to 'androidx/compose/runtime/DerivedSnapshotState' (from method signature)
  Current Frame:
    bci: @24
    flags: { }
    locals: { 'androidx/compose/runtime/SnapshotMutationPolicy', 'kotlin/jvm/functions/Function0' }
    stack: { 'androidx/compose/runtime/State' }
  Bytecode:
    0000000: 2a12 07b8 0017 2b12 06b8 0017 bb00 0859
    0000010: 2b2a b700 12c0 000c b0                 

	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:50241)
	at androidx.compose.runtime.ComposerImpl.composeContent$runtime(Composer.kt:3236)
	at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:725)
	at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:1071)
	at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:633)
	at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:619)
	at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:219)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Affected platforms
Select one of the platforms below:

  • Desktop

Versions

  • Kotlin version*: 1.9.20 and 1.9.22
  • Compose Multiplatform version*: 1.5.10 and 1.5.12 and 1.6.0
  • OS version(s)* (required for Desktop and iOS issues): Windows 11
  • OS architecture (x86 or arm64): x86
  • JDK (for desktop issues): Oracle OpenJDK 21

Expected behavior
The app should run when executing runReleaseDistributable.

@mahozad mahozad added bug Something isn't working submitted labels Feb 29, 2024
@mahozad
Copy link
Contributor Author

mahozad commented Feb 29, 2024

For a workaround, I added this line to my rules.pro file:

-dontoptimize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working desktop gradle Gradle plugin problems native distribution
Projects
None yet
Development

No branches or pull requests

2 participants