Skip to content

VerifyError with Compose Multiplatform project #349

@AlexeyTsvetkov

Description

@AlexeyTsvetkov

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:

  1. Run ./gradlew runDistributable. The app runs normally without ProGuard.
  2. Run ./gradlew runReleaseDistributable. The error above is thrown with ProGuard.
  3. If -dontoptimize is added to compose-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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions