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] Cannot Decompile Single Classes Using the Fallback Mode #2276

Closed
thekief opened this issue Sep 13, 2024 · 1 comment
Closed

[core] Cannot Decompile Single Classes Using the Fallback Mode #2276

thekief opened this issue Sep 13, 2024 · 1 comment
Assignees

Comments

@thekief
Copy link

thekief commented Sep 13, 2024

Issue details

For a small show case I converted a small code sample using d8. After successfully creating a classes.dex file, I can decompile the file without passing any options. When trying to generate code using the fallback-mode an exception is thrown.

Relevant log output or stacktrace

jadx -f classes.dex
INFO  - loading ...
ERROR - Process error:
jadx.core.utils.exceptions.JadxRuntimeException: Ordering pass not found: CodeRenameVisitor, listed in 'runBefore' of pass: KotlinMetadataDecompile
 all passes: [AttachTryCatchVisitor, AttachCommentsVisitor, ProcessInstructionsVisitor, FallbackModeVisitor]
        at jadx.core.utils.PassMerge.searchInsertPos(PassMerge.java:97)
        at jadx.core.utils.PassMerge.merge(PassMerge.java:44)
        at jadx.core.dex.nodes.RootNode.mergePasses(RootNode.java:325)
        at jadx.api.JadxDecompiler.load(JadxDecompiler.java:124)
        at jadx.cli.JadxCLI.processAndSave(JadxCLI.java:51)
        at jadx.cli.JadxCLI.execute(JadxCLI.java:38)
        at jadx.cli.JadxCLI.main(JadxCLI.java:22)

Provide sample and class/method full name

class Example {
    static void main() {

        int a = 3;
        int b = 5;
        int c = a + b;

        System.out.println("Hello, World!" + c);
    }
}

Jadx version

1.5.0

@skylot
Copy link
Owner

skylot commented Sep 13, 2024

Fixed.
@thekief please check latest unstable build: https://nightly.link/skylot/jadx/workflows/build-artifacts/master

I disabled passes injection from plugins for predefined decompilation modes (fallback and simple for now).

Also, I opened a new issue #2277 with a feature to disable plugins, this should provide a simple workaround if plugin causes issues.

@skylot skylot closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants