Jiaxin Peng
Jiaxin Peng
Same issue here, see #1606
It's likely to be a bug introduced in a recent Windows 11 update. I did a temporary fix: https://github.com/xxr0ss/jadx/tree/fix-broken-filedialog.
@jpstotz @skylot I've debugged FileDialog and it turned out to be a bug in `javax.swing.JFileChooser`. Here's the quick fix: Add `-Djava.util.Arrays.useLegacyMergeSort=true` to JVM_OPTS
So here's the detail @jpstotz : `ShellFolder` is being sorted when the exception throws. JFileChooser use Arrays.sort() to sort `ShellFolder`. The **NEW** TimSort is introduced in JDK 7, which requires...
@jpstotz I don't have an account in OpenJDK Community and I cann't even find where to sign up one😓. And I've being a bit busy lately. It'll be nice of...
Understood👍@jpstotz I will also try to find out what's so special about the `ShellFolder`s on my computer that causes TimSort to fail, just when I have time.
@jpstotz 😵I'm sorry I messed things up!! I debugged again and `FILE_COMPARATOR` is not used. The comparison that is used is in `sun.awt.shell.Win32ShellFolderManager2` ```java static int compareShellFolders(Win32ShellFolder2 sf1, Win32ShellFolder2 sf2)...
@jpstotz are there any ShellFolders on your computer that have the same name, while one is a special entry and the other not? I logged `isSpecial()` for ShellFolders being compared....
@jpstotz Oh! I just stopped getting the exception after I removed all special folders (Documents, Pictures ...) from Quick Access. And I went to `C:\Users\` and added them all (Documents,...
@serpilliere I see. I'll keep this issue open and hopefully someone can participate in this subject, or I will have a try when I have time.