Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

IllegalArgumentException: Stacks have different current sizes [0] and [1] when building with ProGuard optimizations #235

Closed
@cypressious

Description

@cypressious

Pulling this out of #206:

When building with Proguard optimizations on (getDefaultProguardFile('proguard-android-optimize.txt')), I get the following error:

java.lang.IllegalArgumentException: Stacks have different current sizes [0] and [1]
Unexpected error while performing partial evaluation:
Class = [org/jetbrains/anko/AsyncKt$doAsync$1]
Method = [invoke()Ljava/lang/Object;]
Exception = java.lang.IllegalArgumentException

This is also reported in https://youtrack.jetbrains.com/issue/KT-12866 and https://sourceforge.net/p/proguard/bugs/610/.

The problem lies in the usage of the elvis operator in the catch block in

exceptionHandler?.invoke(thr) ?: Unit

@yanex Although this is technically a ProGuard bug, would you consider rewriting the code without the elvis operator and releasing a bugfix build? In the meantime, we're not able to use ProGuard optimizations in our app.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions