skylot / jadx

Dex to Java decompiler
Apache License 2.0
41.72k stars 4.88k forks source link

java.lang.NullPointerException: Cannot invoke "sun.awt.shell.Win32ShellFolder2.getIShellFolder()" because the return value of "sun.awt.shell.Win32ShellFolderManager2.getNetwork()" is null #1657

Open Joker2HAO opened 2 years ago

Joker2HAO commented 2 years ago

Please describe what you did before the error occurred. IMPORTANT! If the error occurs with a specific APK file please attach or provide link to apk file!

java.lang.NullPointerException: Cannot invoke "sun.awt.shell.Win32ShellFolder2.getIShellFolder()" because the return value of "sun.awt.shell.Win32ShellFolderManager2.getNetwork()" is null
    at java.desktop/sun.awt.shell.Win32ShellFolder2.getFileSystemPath(Win32ShellFolder2.java:628)
    at java.desktop/sun.awt.shell.Win32ShellFolder2$10.call(Win32ShellFolder2.java:836)
    at java.desktop/sun.awt.shell.Win32ShellFolder2$10.call(Win32ShellFolder2.java:827)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.desktop/sun.awt.shell.Win32ShellFolderManager2$ComInvoker$1.run(Win32ShellFolderManager2.java:595)
    at java.base/java.lang.Thread.run(Thread.java:833)
jpstotz commented 2 years ago

Thanks for reporting this problem. Unfortunately this is yet another bug in the Java provided file dialog on Windows 10/11.

This means it is a bug in the Java run-time library, not a problem of Jadx - there is nothing we can do in Jadx to fix this problem. The latest version contains a workaround for a different file dialog bug on Windows 10/11, but I don't think that it will have an impact on this problem. Anyway, please try Jadx 1.4.4.

skylot commented 1 month ago

Possible workarounds: