Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[core] JadxRuntimeException: Path cross not found for blocks #2240

Closed
pubiqq opened this issue Aug 5, 2024 · 1 comment
Closed

[core] JadxRuntimeException: Path cross not found for blocks #2240

pubiqq opened this issue Aug 5, 2024 · 1 comment
Assignees
Labels
bug Core Issues in jadx-core module

Comments

@pubiqq
Copy link
Contributor

pubiqq commented Aug 5, 2024

Issue details

After 821cc66, jadx started throwing "JadxRuntimeException: Path cross not found for blocks" when decompiling some methods.

Relevant log output or stacktrace

Stacktraces

    /*  JADX ERROR: JadxRuntimeException in pass: ConstructorVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Path cross not found for blocks: B:17:0x0058 and B:15:0x0046
        	at jadx.core.dex.visitors.ConstructorVisitor.insertPhiInsn(ConstructorVisitor.java:110)
        	at jadx.core.dex.visitors.ConstructorVisitor.processInvoke(ConstructorVisitor.java:78)
        	at jadx.core.dex.visitors.ConstructorVisitor.replaceInvoke(ConstructorVisitor.java:50)
        	at jadx.core.dex.visitors.ConstructorVisitor.visit(ConstructorVisitor.java:36)
        */
    /* renamed from: a */
    public static final ml.C6510f m16199a(
    /*  JADX ERROR: JadxRuntimeException in pass: ConstructorVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Path cross not found for blocks: B:17:0x0058 and B:15:0x0046
        	at jadx.core.dex.visitors.ConstructorVisitor.insertPhiInsn(ConstructorVisitor.java:110)
        	at jadx.core.dex.visitors.ConstructorVisitor.processInvoke(ConstructorVisitor.java:78)
        	at jadx.core.dex.visitors.ConstructorVisitor.replaceInvoke(ConstructorVisitor.java:50)
        */
    /*  JADX ERROR: Method generation error
        jadx.core.utils.exceptions.JadxRuntimeException: Code variable not set in r4v0 ??
        	at jadx.core.dex.instructions.args.SSAVar.getCodeVar(SSAVar.java:238)
        	at jadx.core.codegen.MethodGen.addMethodArguments(MethodGen.java:223)
        	at jadx.core.codegen.MethodGen.addDefinition(MethodGen.java:168)
        	at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:401)
        	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:335)
        	at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$3(ClassGen.java:301)
        	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        	at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
        	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
        */

Provide sample and class/method full name

Smali

# direct methods
.method public static final a(Ljava/lang/Class;)Lml/f;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class<",
            "*>;)",
            "Lml/f;"
        }
    .end annotation

    const/4 v0, 0x0

    :goto_1
    invoke-virtual {p0}, Ljava/lang/Class;->isArray()Z

    move-result v1

    if-eqz v1, :cond_13

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {p0}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;

    move-result-object p0

    const-string v1, "currentClass.componentType"

    invoke-static {p0, v1}, Lve/e;->l(Ljava/lang/Object;Ljava/lang/String;)V

    goto :goto_1

    :cond_13
    invoke-virtual {p0}, Ljava/lang/Class;->isPrimitive()Z

    move-result v1

    if-eqz v1, :cond_68

    sget-object v1, Ljava/lang/Void;->TYPE:Ljava/lang/Class;

    invoke-static {p0, v1}, Lve/e;->g(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_31

    new-instance p0, Lml/f;

    sget-object v1, Lgk/k$a;->e:Lhl/c;

    invoke-virtual {v1}, Lhl/c;->i()Lhl/b;

    move-result-object v1

    invoke-static {v1}, Lhl/a;->l(Lhl/b;)Lhl/a;

    move-result-object v1

    invoke-direct {p0, v1, v0}, Lml/f;-><init>(Lhl/a;I)V

    return-object p0

    :cond_31
    invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object p0

    invoke-static {p0}, Lpl/b;->c(Ljava/lang/String;)Lpl/b;

    move-result-object p0

    invoke-virtual {p0}, Lpl/b;->r()Lgk/i;

    move-result-object p0

    const-string v1, "get(currentClass.name).primitiveType"

    invoke-static {p0, v1}, Lve/e;->l(Ljava/lang/Object;Ljava/lang/String;)V

    new-instance v1, Lml/f;

    if-lez v0, :cond_58

    .line 1
    iget-object p0, p0, Lgk/i;->d:Ljj/d;

    invoke-interface {p0}, Ljj/d;->getValue()Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lhl/b;

    .line 2
    invoke-static {p0}, Lhl/a;->l(Lhl/b;)Lhl/a;

    move-result-object p0

    add-int/lit8 v0, v0, -0x1

    invoke-direct {v1, p0, v0}, Lml/f;-><init>(Lhl/a;I)V

    return-object v1

    .line 3
    :cond_58
    iget-object p0, p0, Lgk/i;->c:Ljj/d;

    invoke-interface {p0}, Ljj/d;->getValue()Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lhl/b;

    .line 4
    invoke-static {p0}, Lhl/a;->l(Lhl/b;)Lhl/a;

    move-result-object p0

    invoke-direct {v1, p0, v0}, Lml/f;-><init>(Lhl/a;I)V

    return-object v1

    :cond_68
    invoke-static {p0}, Lpk/b;->b(Ljava/lang/Class;)Lhl/a;

    move-result-object p0

    sget-object v1, Lik/c;->a:Lik/c;

    invoke-virtual {p0}, Lhl/a;->b()Lhl/b;

    move-result-object v2

    const-string v3, "javaClassId.asSingleFqName()"

    invoke-static {v2, v3}, Lve/e;->l(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {v1, v2}, Lik/c;->f(Lhl/b;)Lhl/a;

    move-result-object v1

    if-nez v1, :cond_7e

    goto :goto_7f

    :cond_7e
    move-object p0, v1

    :goto_7f
    new-instance v1, Lml/f;

    invoke-direct {v1, p0, v0}, Lml/f;-><init>(Lhl/a;I)V

    return-object v1
.end method

Jadx version

821cc66

@skylot
Copy link
Owner

skylot commented Aug 9, 2024

Fixed

@skylot skylot closed this as completed Aug 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants