Status Update
Comments
jf...@block.xyz <jf...@block.xyz> #2
Oops, missed copying in some of the dex bytecode for the relevant class:
.class public final Lcom/squareup/example/RealClientAuthenticityProvider;
.super Ljava/lang/Object;
.source "RealClientAuthenticityProvider.kt"
# interfaces
.implements Lcom/squareup/example/ClientAuthenticityProvider;
# instance fields
.field public final authenticationProviderAccess:Lcom/squareup/authentication/AuthenticationProviderAccess;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end field
# direct methods
.method public constructor <init>()V
<snip>
.line 26
.line 27
new-instance p1, Lcom/squareup/authentication/AuthenticationProviderAccessFuture;
.line 28
.line 29
invoke-direct {p1}, Lcom/squareup/authentication/AuthenticationProviderAccessFuture;-><init>()V
.line 30
.line 31
.line 32
iput-object p1, p2, Lcom/squareup/authentication/AuthenticationProviderAccess;->provider:Lcom/squareup/authentication/AuthenticationProviderAccessCompat;
.line 41
.line 42 <-- this is the line that the stacktrace claims is bad
:goto_29
iput-object p2, p0, Lcom/squareup/example/RealClientAuthenticityProvider;->authenticationProviderAccess:Lcom/squareup/authentication/AuthenticationProviderAccess;
sg...@google.com <sg...@google.com> #3
Thank you for the report. From the face of it the error looks quite surprising.
Looking at the smali in provider
is on line 32, and line 42 is assigning a different field. Has the stack trace been retraced, or is it from the raw crash?
The constructor of AuthenticationProviderAccess
has been inlined into the RealClientAuthenticityProvider
constructor setting the provider field there. Do you know why you get pX
register names in the smali code? Normally that is only used for argument registers, but the <init>
only has one argument (this
in p0
) so I would have expected the rest to be using names vX
.
Will it be possible for you to share a [compiler dump] for us to reproduce building the DEX with the issue? If not can you share the full APK so we can inspect the DEX? You can share these artifacts privately with
To try to workaround the issue you can try to keep the AuthenticationProviderAccess
constructor to see if that makes a difference:
-keep class com.squareup.authentication.AuthenticationProviderAccess {
<init>();
}
sg...@google.com <sg...@google.com> #4
Just relaized that I forgot the link to
Description
Using AGP 8.7.1 we're seeing a strange runtime crash from a build that has been minified with R8:
R8 is mangling the private field in this class somehow that makes it crash:
The dex bytecode for those two classes are: