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

[mappings] NullPointerException when exporting to any mappings format #2226

Closed
1 of 3 tasks
jjr90 opened this issue Jul 25, 2024 · 2 comments
Closed
1 of 3 tasks

[mappings] NullPointerException when exporting to any mappings format #2226

jjr90 opened this issue Jul 25, 2024 · 2 comments
Assignees
Milestone

Comments

@jjr90
Copy link

jjr90 commented Jul 25, 2024

Issue details

Example APK + project:
https://drive.google.com/file/d/1auQh998Hm_pjPg7XfV_d9vT5PDXdQBUX/view?usp=sharing

Affected versions: release 1.5.0 and unstable (r2212.a8d889d).

How to reproduce: Simply open the provided project and attempt to export to any mappings format. A NullPointerException occurs (see log below) and the output file is empty.

Seems related to #2220 (comment) , where his very last exception (MappingExporter.java:238) is identical to my log below.

This error doesn't happen in jadx 1.4.7, which I used to successfully save the mappings.

Jadx version : 1.5.0
Java version : 11.0.9
Java VM      : Oracle Corporation Java HotSpot(TM) 64-Bit Server VM
Platform     : Mac OS X (10.14.6 x86_64)
Max heap size: 11470 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
	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:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Jadx version

1.5.0 and unstable (r2212.a8d889d)

Java version

11.0.9

OS

  • Windows
  • Linux
  • macOS
@jjr90 jjr90 added bug GUI Issues in jadx-gui module labels Jul 25, 2024
@jjr90
Copy link
Author

jjr90 commented Jul 25, 2024

Updated the example archive (I had attached the wrong APK, so some mappings were dangling).

But the error happens regardless...

skylot added a commit that referenced this issue Jul 25, 2024
@skylot
Copy link
Owner

skylot commented Jul 25, 2024

@jjr90 I commit a fix and NPE shouldn't appear anymore.
Anyway, I still not understand a root cause of the issue, so some variables can be missing in mapping.
I will continue to work on improving this plugin and will add some tests to prevent future regressions.

@skylot skylot self-assigned this Jul 25, 2024
@skylot skylot added this to the TBD milestone Jul 25, 2024
@skylot skylot added rename jadx-plugin and removed GUI Issues in jadx-gui module labels Jul 25, 2024
@skylot skylot changed the title [gui] NullPointerException when exporting to any mappings format [mappings] NullPointerException when exporting to any mappings format Jul 25, 2024
@skylot skylot added mappings and removed rename labels Jul 25, 2024
@jjr90 jjr90 closed this as completed Jul 26, 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