skylot / jadx

Dex to Java decompiler
Apache License 2.0
41.91k stars 4.89k forks source link

[core] Mapping export failed #2327

Closed Gstalker closed 4 weeks ago

Gstalker commented 4 weeks ago

Issue details

Export mapping from a existing jadx project failed

Relevant log output or stacktrace

Jadx version : 1.5.0
Java version : 22.0.1
Java VM      : Homebrew OpenJDK 64-Bit Server VM
Platform     : Mac OS X (14.6.1 aarch64)
Max heap size: 22944 MB
Program args : -Xms128M -XX:MaxRAMPercentage=70.0 -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -Djava.util.Arrays.useLegacyMergeSort=true -Djdk.util.zip.disableZip64ExtraFieldValidation=true -XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.lang=ALL-UNNAMED

java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map$Entry.getValue()" is null
    at jadx.plugins.mappings.save.MappingExporter.exportMappings(MappingExporter.java:238)
    at jadx.gui.plugins.mappings.RenameMappingsGui.lambda$saveInBackground$11(RenameMappingsGui.java:247)
    at jadx.core.utils.tasks.TaskExecutor.wrapTask(TaskExecutor.java:166)
    at jadx.core.utils.tasks.TaskExecutor.runStages(TaskExecutor.java:142)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1570)

Provide sample and class/method full name

No response

Jadx version

1.5.0

Gstalker commented 4 weeks ago

https://github.com/skylot/jadx/issues/2226 solved by compile jadx from latest commit, this issue is closed.