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

Test with ProGuard #591

Merged
merged 3 commits into from
Jan 8, 2025
Merged

Test with ProGuard #591

merged 3 commits into from
Jan 8, 2025

Conversation

JakeWharton
Copy link
Owner

@JakeWharton JakeWharton commented Dec 29, 2024

Refs #536


  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

@JakeWharton
Copy link
Owner Author

Blocked on:

java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    kotlinx/coroutines/JobKt.invokeOnCompletion(Lkotlinx/coroutines/Job;ZLkotlinx/coroutines/JobNode;)Lkotlinx/coroutines/DisposableHandle; @40: invokeinterface
  Reason:
    Type 'kotlin/jvm/functions/Function1' (current frame, stack[3]) is not assignable to 'kotlinx/coroutines/JobKt__JobKt$invokeOnCompletion$1'
  Current Frame:
    bci: @40
    flags: { }
    locals: { 'kotlinx/coroutines/Job', integer, 'kotlinx/coroutines/JobNode' }
    stack: { 'kotlinx/coroutines/Job', integer, integer, 'kotlin/jvm/functions/Function1' }
  Bytecode:
    0000000: 2a1b 2c4d 3c59 4bc1 0007 9900 0d2a c000
    0000010: 071b 2cb6 000a b02a 2cb6 0009 1bbb 0005
    0000020: 592c b700 08c0 0002 b900 0b04 00b0
  Stackmap Table:
    same_frame(@23)

    at kotlinx.coroutines.JobKt__JobKt.invokeOnCompletion$default$7beb268f(Job.kt:351)
    at kotlinx.coroutines.CancellableContinuationImpl.installParentHandle(CancellableContinuationImpl.kt:23001)
    at kotlinx.coroutines.CancellableContinuationImpl.initCancellability(CancellableContinuationImpl.kt:126)
    at kotlinx.coroutines.DelayKt.delay-VtjQ1oo(Delay.kt:2178)

which I think is a ProGuard bug.

29: new           #5                  // class kotlinx/coroutines/JobKt__JobKt$invokeOnCompletion$1
32: dup
33: aload_2
34: invokespecial #8                  // Method kotlinx/coroutines/JobKt__JobKt$invokeOnCompletion$1."<init>":(Lkotlinx/coroutines/JobNode;)V
37: checkcast     #2                  // class kotlin/jvm/functions/Function1
40: invokeinterface #11,  4           // InterfaceMethod kotlinx/coroutines/Job.invokeOnCompletion$87b5a68:(ZZLkotlinx/coroutines/JobKt__JobKt$invokeOnCompletion$1;)Lkotlinx/coroutines/DisposableHandle;

The checkcast is entirely useless here.

@JakeWharton JakeWharton marked this pull request as ready for review January 8, 2025 15:19
@JakeWharton JakeWharton enabled auto-merge (squash) January 8, 2025 15:30
@JakeWharton JakeWharton merged commit 9f634c5 into trunk Jan 8, 2025
12 checks passed
@JakeWharton JakeWharton deleted the jw.proguard.2024-12-28 branch January 8, 2025 15:36
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

Successfully merging this pull request may close these issues.

1 participant