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

[core] Use of static fields instead of enum constants #924

Closed
bagipro opened this issue May 4, 2020 · 3 comments
Closed

[core] Use of static fields instead of enum constants #924

bagipro opened this issue May 4, 2020 · 3 comments
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented May 4, 2020

Class com.google.android.gms.internal.vision.zzjd

package com.google.android.gms.internal.vision;

/*  JADX ERROR: JadxRuntimeException in pass: EnumVisitor
    jadx.core.utils.exceptions.JadxRuntimeException: Method arg registers not loaded: com.google.android.gms.internal.vision.zzje.<init>(java.lang.String, int, com.google.android.gms.internal.vision.zzji, int):void, class status: NOT_LOADED
    	at jadx.core.dex.nodes.MethodNode.getArgRegs(MethodNode.java:293)
    	at jadx.core.dex.attributes.nodes.SkipMethodArgsAttr.<init>(SkipMethodArgsAttr.java:47)
    	at jadx.core.dex.attributes.nodes.SkipMethodArgsAttr.skipArg(SkipMethodArgsAttr.java:27)
    	at jadx.core.dex.visitors.EnumVisitor.markArgsForSkip(EnumVisitor.java:346)
    	at jadx.core.dex.visitors.EnumVisitor.createEnumFieldByConstructor(EnumVisitor.java:302)
    	at jadx.core.dex.visitors.EnumVisitor.processEnumFieldByField(EnumVisitor.java:249)
    	at jadx.core.dex.visitors.EnumVisitor.extractEnumFields(EnumVisitor.java:216)
    	at jadx.core.dex.visitors.EnumVisitor.convertToEnum(EnumVisitor.java:142)
    	at jadx.core.dex.visitors.EnumVisitor.visit(EnumVisitor.java:77)
    */
public enum zzjd {
    public static final com.google.android.gms.internal.vision.zzjd zzabu = new com.google.android.gms.internal.vision.zzjd(com.google.android.gms.internal.vision.zzji.DOUBLE, 1);
    public static final com.google.android.gms.internal.vision.zzjd zzabv = new com.google.android.gms.internal.vision.zzjd(com.google.android.gms.internal.vision.zzji.FLOAT, 5);
    public static final com.google.android.gms.internal.vision.zzjd zzabw = new com.google.android.gms.internal.vision.zzjd(com.google.android.gms.internal.vision.zzji.LONG, 0);
    //...

APK: https://drive.google.com/file/d/1ICfL4A22K-KhVkw5RwvWdLJA8111iYvG/view?usp=sharing

@bagipro bagipro added bug Core Issues in jadx-core module labels May 4, 2020
@bagipro
Copy link
Collaborator Author

bagipro commented May 4, 2020

And one more error in the same app

package com.google.android.gms.internal.vision;

/* JADX INFO: Failed to restore enum class, 'enum' modifier removed */
final class zzje extends com.google.android.gms.internal.vision.zzjd {
    zzje(java.lang.String str, int i, com.google.android.gms.internal.vision.zzji zzji, int i2) {
        super(str, 8, zzji, 2, null);
    }
}

@skylot
Copy link
Owner

skylot commented May 4, 2020

@sergey-wowwow fixed.
zzjd class now looks correct and zzje inlined in zzjd, so zzje is not generated.

@skylot skylot closed this as completed May 4, 2020
@bagipro
Copy link
Collaborator Author

bagipro commented May 4, 2020

Thanks! Looks like there are a few more error cases, I will open new ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants