Skip to content

[core] RenameVisitor: Can't change package for inner class #1997

@leumasme

Description

@leumasme

Issue details

Using the new --mappings-path cli argument (using main branch at 2c92c6b), I attempted to apply a .tiny mappings file.
Instead, I got the below error and the output code was generated without mappings applied.

Relevant log output or stacktrace

ERROR - Visitor init failed: RenameVisitor
jadx.core.utils.exceptions.JadxRuntimeException: Can't change package for inner class
        at jadx.core.dex.info.ClassInfo.changePkg(ClassInfo.java:82)
        at jadx.core.dex.nodes.ClassNode.onParentPackageUpdate(ClassNode.java:624)
        at jadx.core.dex.nodes.PackageNode.updatePackages(PackageNode.java:129)
        at jadx.core.dex.nodes.PackageNode.onParentPackageUpdate(PackageNode.java:117)
        at jadx.core.dex.nodes.PackageNode.updatePackages(PackageNode.java:126)
        at jadx.core.dex.nodes.PackageNode.onParentPackageUpdate(PackageNode.java:117)
        at jadx.core.dex.nodes.PackageNode.updatePackages(PackageNode.java:126)
        at jadx.core.dex.nodes.PackageNode.updatePackages(PackageNode.java:121)
        at jadx.core.dex.nodes.RootNode.runPackagesUpdate(RootNode.java:444)
        at jadx.core.dex.visitors.rename.RenameVisitor.checkNames(RenameVisitor.java:78)
        at jadx.core.dex.visitors.rename.RenameVisitor.process(RenameVisitor.java:45)
        at jadx.core.dex.visitors.rename.RenameVisitor.init(RenameVisitor.java:39)
        at jadx.core.dex.nodes.RootNode.runPreDecompileStage(RootNode.java:333)
        at jadx.api.JadxDecompiler.load(JadxDecompiler.java:126)
        at jadx.cli.JadxCLI.processAndSave(JadxCLI.java:50)
        at jadx.cli.JadxCLI.execute(JadxCLI.java:37)
        at jadx.cli.JadxCLI.main(JadxCLI.java:21)

Provide sample and class/method full name

No response

Jadx version

jadx-1.4.7.224-2c92c6b0 (nightly)

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions