-
Notifications
You must be signed in to change notification settings - Fork 468
Open
Description
ProGuard 7.3.2
Kotlin 1.9.0
Compose Multiplatform 1.5.0-dev1114
JDK Corretto 17.0.5
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
kotlinx/coroutines/channels/BufferOverflow.values$1bedace4()[I @3: invokevirtual
Reason:
Type '[I' (current frame, stack[0]) is not assignable to '[Ljava/lang/Object;'
Current Frame:
bci: @3
flags: { }
locals: { }
stack: { '[I' }
Bytecode:
0000000: b200 09b6 000d c000 05b0
Reproducer: https://github.com/AlexeyTsvetkov/compose-proguard-optimization-issue
To reproduce:
- Run
./gradlew runDistributable. The app runs normally without ProGuard. - Run
./gradlew runReleaseDistributable. The error above is thrown with ProGuard. - If
-dontoptimizeis added tocompose-desktop.pro, the app runs normally with ProGuard.
The configuration file passed to ProGuard can be found here (after runReleaseDistributable is run):
build/compose/tmp/proguardReleaseJars/root-config.pro
The ProGuard output jars can be found here (assuming ./gradlew runReleaseDistributable has run):
build/compose/binaries/main-release/app/proguard-optimizations-issue.app/Contents/app
The non-ProGuard output jars can be found here (assuming ./gradlew runDistributable has run):
build/compose/binaries/main/app/proguard-optimizations-issue.app/Contents/app