Status Update
Comments
ji...@gmail.com <ji...@gmail.com> #2
Thank you for the report and the supplied dump with the reproduction. I can confirm that the NPE is also present on HEAD, and I will look into it.
Quite a few of the class files in the dump has malformed inner-class attribute, where R8 reports e.g.:
Info in /tmp/tmpo67ucguh/program.jar:ofifmwrrhhmodsc/ψξψξψξξ.class:
Malformed inner-class attribute:
outerTypeInternal: ofifmwrrhhmodsc/ψξψξψξξ
innerTypeInternal: ofifmwrrhhmodsc/ψξψξψξξ$ψξξψξξξ
innerName: ψξψξψξξ$ψξξψξξξ
These are ignored, so they should not be the reason for the NPE, but something to also look into.
mk...@google.com <mk...@google.com> #3
Branch: main
commit e59500ca4445f5fb5d2ccc1114acbf66df11d196
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 09:48:55 2023
Insert patched frame instructions in the right place
Fixes:
Change-Id: Iae204ed529f9af5bf5fa3eaacba45128dfa6fd9e
M src/main/java/com/android/tools/r8/graph/LazyCfCode.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ji...@gmail.com <ji...@gmail.com> #4
Branch: main
commit 780c2e83c8c033e7594d61894fa1b3dbcad6630b
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 09:48:13 2023
Add reproduction of
Bug:
Change-Id: I7573883d6a649eed47b10d7bf0cdea2e11710268
M build.gradle
M src/main/java/com/android/tools/r8/cf/code/frame/UninitializedNew.java
A src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ji...@gmail.com <ji...@gmail.com> #5 Restricted
ji...@gmail.com <ji...@gmail.com> #6
Thank you very much for taking a look at this!
Is this fix related to the nullpointer or the malformed inner-class attributes ?
Do you have a separated ticket for it? Could you share it?
mk...@google.com <mk...@google.com> #7
Branch: 4.0
commit 6edb00fb23e41b28d4794cfa69d706d5c5aa3fba
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:55:01 2023
Version 4.0.56
Bug:
Change-Id: I88a20fc922ce892d38fa3a34f9a3f1f4714354ae
M src/main/java/com/android/tools/r8/Version.java
ji...@gmail.com <ji...@gmail.com> #8
Branch: 4.0
commit d9215af3b02f64d1207b9ebd63a6925229307b9d
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:54:50 2023
Insert patched frame instructions in the right place
Bug:
Change-Id: Iae204ed529f9af5bf5fa3eaacba45128dfa6fd9e
M src/main/java/com/android/tools/r8/graph/LazyCfCode.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ap...@google.com <ap...@google.com> #9
Branch: 4.0
commit 4fda9b9062c871ba0e31cb68d1518b13b993692f
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:54:33 2023
Add reproduction of
Bug:
Change-Id: I7573883d6a649eed47b10d7bf0cdea2e11710268
M build.gradle
M src/main/java/com/android/tools/r8/cf/code/frame/UninitializedNew.java
A src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ap...@google.com <ap...@google.com> #10
Branch: 8.0
commit 6686e7dffea83ea894438b496c065d0a18cda206
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:53:01 2023
Version 8.0.37
Bug:
Change-Id: I43a723a94638088d921cd3fb6e22ef6e41f07d5f
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #11
Branch: 8.0
commit 57f55fb70aa678a61f9c7ff1826fbc695faeac7d
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:52:27 2023
Insert patched frame instructions in the right place
Bug:
Change-Id: Iae204ed529f9af5bf5fa3eaacba45128dfa6fd9e
M src/main/java/com/android/tools/r8/graph/LazyCfCode.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ap...@google.com <ap...@google.com> #12
Branch: 8.0
commit cd00c053222b06bb27fdd90bbed56af9c9ef0744
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:51:57 2023
Add reproduction of
Bug:
Change-Id: I7573883d6a649eed47b10d7bf0cdea2e11710268
M build.gradle
M src/main/java/com/android/tools/r8/cf/code/frame/UninitializedNew.java
A src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ap...@google.com <ap...@google.com> #13
Branch: 4.0
commit d9215af3b02f64d1207b9ebd63a6925229307b9d
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:54:50 2023
Insert patched frame instructions in the right place
Bug:
Change-Id: Iae204ed529f9af5bf5fa3eaacba45128dfa6fd9e
M src/main/java/com/android/tools/r8/graph/LazyCfCode.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ap...@google.com <ap...@google.com> #14
Branch: 4.0
commit 4fda9b9062c871ba0e31cb68d1518b13b993692f
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 16:54:33 2023
Add reproduction of
Bug:
Change-Id: I7573883d6a649eed47b10d7bf0cdea2e11710268
M build.gradle
M src/main/java/com/android/tools/r8/cf/code/frame/UninitializedNew.java
A src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ap...@google.com <ap...@google.com> #15
Answer to
The malformed inner-class attributes is an issue with the input class files, and they where not related to the NPE. You will have to contact the supplier of the library where they are present if you would like to get rid of the "Info" messages (you will have to run ./gradlew --info ...
to see them). From what I can see the issue is that the innerName: ψξψξψξξ$ψξξψξξξ
should have been innerName: ψξξψξξξ
.
ap...@google.com <ap...@google.com> #16
Branch: 4.0
commit 49f738ff7377dacecf0fca39fec5146beb251ea3
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 18:14:15 2023
Version 4.0.57
Backport test to 4.0 test APIs.
Bug:
Change-Id: Iecf03a2ad9dcdbd53e6c572d2f08915248435682
M src/main/java/com/android/tools/r8/Version.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
ji...@gmail.com <ji...@gmail.com> #17
Branch: 8.0
commit c11ddf096e58245c2c67514dc9e5a2098dd8f705
Author: Søren Gjesse <sgjesse@google.com>
Date: Tue Mar 21 18:16:54 2023
Version 8.0.38
Backport test to 8.0 test APIs.
Bug:
Change-Id: I35ae6d701fa92a6a7a734f9c0296d1383fed8e20
M src/main/java/com/android/tools/r8/Version.java
M src/test/java/com/android/tools/r8/cf/frames/InitBeforeNewInInstructionStreamTest.java
Description
java.lang.ClassCastException: sg.bigo.live.ppi cannot be cast to sg.bigo.live.asd
at sg.bigo.live.c7q.get(Unknown Source:2)
at sg.bigo.live.xka.d(Unknown Source:11)
at sg.bigo.live.kka.u(Unknown Source:8)
at com.yy.iheima.startup.SplashAdvertView.onAttachedToWindow(SplashAdvertView.java:17)
at android.view.View.dispatchAttachedToWindow(View.java:20894)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3539)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3546)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2799)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2305)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9133)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1232)
at android.view.Choreographer.doCallbacks(Choreographer.java:1029)
at android.view.Choreographer.doFrame(Choreographer.java:934)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1217)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:344)
at android.app.ActivityThread.main(ActivityThread.java:8212)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
jadx disassemble result:
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import android.util.Base64;
import com.google.android.gms.internal.p001firebaseauthapi.zzwe;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.List;
import sg.bigo.live.t8l;
/* loaded from: classes.dex */
public class c7q implements asd, etr {
public static volatile c7q y;
public Object z;
public /* synthetic */ c7q(Context context) {
this.z = new HashMap();
this.z = context;
}
public /* synthetic */ c7q(Object obj, Object obj2) {
this.z = obj;
this.z = obj2;
}
public /* synthetic */ c7q(String str) {
this.z = new Intent();
this.z = str;
}
public /* synthetic */ c7q(asd asdVar, esd esdVar) {
this.z = asdVar;
this.z = esdVar;
}
public static c7q z(Context context) {
if (context == null) {
nwp.e("[TinyDataManager]:mContext is null, TinyDataManager.getInstance(Context) failed.");
return null;
}
if (y == null) {
synchronized (c7q.class) {
if (y == null) {
y = new c7q(context);
}
}
}
return y;
}
public void a(Context context) {
Class<?> x = t8l.y.z.x((String) this.z);
if (x != null) {
((Intent) this.z).setClass(context, x);
Intent intent = (Intent) this.z;
if (intent == null || intent.getComponent() == null) {
return;
}
Class[] l0 = qc.l0(x);
if (l0 != null && l0.length != 0) {
qc.I(intent);
if (context instanceof p17) {
new sg.bigo.mobile.android.srouter.api.interceptor.y(context, x, intent, -1).z();
return;
}
qc.g1(intent);
}
qc.v1(context, intent, -1, x);
}
}
public void b(Activity activity, int i) {
Class<?> x = t8l.y.z.x((String) this.z);
if (x != null) {
((Intent) this.z).setClass(activity, x);
Intent intent = (Intent) this.z;
if (intent == null || intent.getComponent() == null) {
return;
}
Class[] l0 = qc.l0(x);
if (l0 != null && l0.length != 0) {
qc.I(intent);
if (activity instanceof p17) {
new sg.bigo.mobile.android.srouter.api.interceptor.y(activity, x, intent, i).z();
return;
}
qc.g1(intent);
}
qc.v1(activity, intent, i, x);
}
}
@Override // sg.bigo.live.asd
public ft2 get(Object obj) {
ft2 ft2Var = ((asd) this.z).get(obj);
if (ft2Var == null) {
((esd) this.z).p();
} else {
((esd) this.z).c(obj);
}
return ft2Var;
}
public boolean u(
if (TextUtils.isEmpty(str)) {
nwp.w("pkgName is null or empty, upload ClientUploadDataItem failed.");
return false;
} else if (yyp.v(hnVar, false)) {
return false;
} else {
if (TextUtils.isEmpty(hnVar.d())) {
hnVar.f(yyp.y());
}
hnVar.g(str);
ozp.z((Context) this.z, hnVar);
return true;
}
}
@Override // sg.bigo.live.asd
public boolean v(rsh rshVar) {
return ((asd) this.z).v(rshVar);
}
@Override // sg.bigo.live.asd
public ft2 w(Object obj, ft2 ft2Var) {
((esd) this.z).k();
return ((asd) this.z).w(obj, ft2Var);
}
@Override // sg.bigo.live.etr
public void x(Object obj) {
bur burVar = (bur) obj;
String str = burVar.z;
msh.u(str);
List i = new com.google.android.gms.internal.p001firebaseauthapi.y(new du1(new kbr())).i(str);
if (i.size() < 2) {
throw new RuntimeException("Invalid idToken ".concat(str));
}
String str2 = (String) i.get(1);
try {
uur z = uur.z(new String(str2 == null ? null : Base64.decode(str2, 11), "UTF-8"));
zzwe zzweVar = new zzwe(burVar.y, burVar.z, Long.valueOf(z.y.longValue() - z.z.longValue()), "Bearer");
Object obj2 = this.z;
jqr.a((jqr) obj2, zzweVar, null, Boolean.FALSE, (b3r) obj2, this);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Unable to decode token", e);
}
}
@Override // sg.bigo.live.asd
public int y(rsh rshVar) {
return ((asd) this.z).y(rshVar);
}
@Override // sg.bigo.live.etr
public void zza(String str) {
((b3r) this.z).y(xoq.z(str));
}
}