Since 9th march 2023, the bug window is prompt everytime when I try to load or save a file, or either I try to begin a log. However I haver loaded save files and log directly by the window explorer. The bug seems to be when the window for selecting a file is opened.
The text show in the exception is:
2023-03-13 19:32:09,115 [19196-main] INFO VASSAL.launch.StartUp - Starting
2023-03-13 19:32:09,138 [19196-main] INFO VASSAL.launch.StartUp - OS Windows 11 10.0 amd64
2023-03-13 19:32:09,138 [19196-main] INFO VASSAL.launch.StartUp - Java version 19.0.2
2023-03-13 19:32:09,138 [19196-main] INFO VASSAL.launch.StartUp - Java home C:\Program Files\VASSAL-3.6.14\jre
2023-03-13 19:32:09,138 [19196-main] INFO VASSAL.launch.StartUp - VASSAL version 3.6.14
2023-03-13 19:32:09,263 [19196-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2023-03-13 19:32:12,551 [19196-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file C:\Users\duduy\Documents\Wargames\Empire of the Sun\EOTS_5.10.2.1.vmod
2023-03-13 19:32:12,764 [19196-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2023-03-13 19:32:12,765 [19196-SwingWorker-pool-2-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module Empire of the Sun (2nd Edition)
2023-03-13 19:32:12,774 [19196-SwingWorker-pool-2-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching C:\Program Files\VASSAL-3.6.14\jre\bin\java -Xms512M -Xmx512M -Duser.home=C:\Users\duduy -Duser.dir=C:\Program Files\VASSAL-3.6.14 -cp lib\Vengine.jar VASSAL.launch.Player --load – C:\Users\duduy\Documents\Wargames\Empire of the Sun\EOTS_5.10.2.1.vmod
2023-03-13 19:32:13,701 [16996-main] INFO VASSAL.launch.StartUp - Starting
2023-03-13 19:32:13,716 [16996-main] INFO VASSAL.launch.StartUp - OS Windows 11 10.0 amd64
2023-03-13 19:32:13,716 [16996-main] INFO VASSAL.launch.StartUp - Java version 19.0.2
2023-03-13 19:32:13,716 [16996-main] INFO VASSAL.launch.StartUp - Java home C:\Program Files\VASSAL-3.6.14\jre
2023-03-13 19:32:13,717 [16996-main] INFO VASSAL.launch.StartUp - VASSAL version 3.6.14
2023-03-13 19:32:13,717 [16996-main] INFO VASSAL.launch.Launcher - Player
2023-03-13 19:32:16,955 [16996-AWT-EventQueue-0] INFO VASSAL.build.GameModule - Empire of the Sun (2nd Edition) version 5.10.2.1
2023-03-13 19:32:36,655 [16996-AWT-EventQueue-0] ERROR VASSAL.tools.ErrorDialog -
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.base/java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:870)
at java.base/java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:487)
at java.base/java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:413)
at java.base/java.util.ComparableTimSort.sort(ComparableTimSort.java:213)
at java.base/java.util.Arrays.sort(Arrays.java:1041)
at java.desktop/sun.awt.shell.Win32ShellFolderManager2.get(Win32ShellFolderManager2.java:315)
at java.desktop/sun.awt.shell.ShellFolder.get(ShellFolder.java:274)
at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel.addItem(MetalFileChooserUI.java:1031)
at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI.doDirectoryChanged(MetalFileChooserUI.java:719)
at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI$5.propertyChange(MetalFileChooserUI.java:808)
at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
at java.desktop/java.awt.Component.firePropertyChange(Component.java:8716)
at java.desktop/javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:610)
at java.desktop/javax.swing.JFileChooser.(JFileChooser.java:364)
at java.desktop/javax.swing.JFileChooser.(JFileChooser.java:310)
at VASSAL.tools.filechooser.FileChooser$SwingFileChooser.(FileChooser.java:157)
at VASSAL.tools.filechooser.FileChooser.createFileChooser(FileChooser.java:86)
at VASSAL.configure.DirectoryConfigurer.initFileChooser(DirectoryConfigurer.java:37)
at VASSAL.configure.FileConfigurer.(FileConfigurer.java:62)
at VASSAL.configure.FileConfigurer.(FileConfigurer.java:48)
at VASSAL.configure.DirectoryConfigurer.(DirectoryConfigurer.java:32)
at VASSAL.build.module.GameState.getSavedGameDirectoryPreference(GameState.java:1555)
at VASSAL.build.GameModule.getFileChooser(GameModule.java:1527)
at VASSAL.build.module.BasicLogger.getSaveFile(BasicLogger.java:439)
at VASSAL.build.module.BasicLogger.beginOutput(BasicLogger.java:493)
at VASSAL.build.module.BasicLogger$2.actionPerformed(BasicLogger.java:649)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1029)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1073)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6620)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
at java.desktop/java.awt.Component.processEvent(Component.java:6385)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4995)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
My computer is a laptop with Windows 11 Home with 16 GB in RAM.
Current java version is 8u361.
The bug is detected in at least in this two versions and modules:
VASSAL 3.4.6 with Gloomhaven
VASSAL 3.6.8 and 3.6.14 with Empire of the Sun (2nd Edition)
I have tried to deinstall all VASSAL, modules and java, and install from zero. The bug exception is still happening.
Other functions of VASSAL (and modules) works properly (as far I know).
Could you help me?
This isn’t the version of Java that Vassal is using. From 3.3.0 onward, the Java Vassal uses is packaged with it on Windows.
There are almost no problems for which reinstalling Vassal will help. It’s a thing I’d recommend against doing when troubleshooting, unless you have a specific reason to think you have corrupted files.
The reason you’re seeing the problem with several versions of Vassal is that the problem is a Java bug, and one that exists across many versions of Java. The reason you weren’t seeing the problem previously is that something changed on your system so that the file dialog receives a list of files which contains a duplicate entry, and the file dialog was not written to handle duplicate entries.
The cause of the bug is described here.
Thanks for your fast answer. I have not idea about that java bug.
Unfortunatly, I don’t understand how to solve it. However I am near to solve it, I will try later
The link I gave doesn’t supply a solution. I’m not sure what to do about this at present.
I’m looking into a workaround.
It might be possible to work around this problem, but only if someone who is having the problem can work with me to get some diagnostic data.
Here’s what you need to do:
-
Download this test program.
-
Open a terminal. (Go to Run on the Start menu. Run command
.)
-
In your terminal run the following, which you will have to adjust to match the paths on your machine:
"C:\Program Files\VASSAL-3.6.14\jre\bin\java.exe" --add-opens java.desktop/sun.awt.shell=ALL-UNNAMED -cp Downloads Test
This assumes that you are in your user directory, and that you have put Test.class
in your Downloads
directory.
Running the program should print a list of directories as output. Please post whatever output there is.
Here’s an example of what I get when I run this in my Windows 10 VM:
The second run is the one where I’m using the correct command line, and you can see what was printed as output below that.
This is the result of your instructions:
You’ve left out part of the command line. (The first command run in the terminal in the screenshot is not the one you’re supposed to run.)
The command line should be:
"C:\Program Files\VASSAL-3.6.14\jre\bin\java.exe" --add-opens java.desktop/sun.awt.shell=ALL-UNNAMED -cp Downloads Test
Please try again with the right command line.
Sorry, my fault. This time, the command line is right.
To the extent I understand the discussion on Github, this looks like it might be the source of the problem:
How can there be 2 identically-named things in your Documents folder? Is one of them some special service for syncing to a form of cloud storage, maybe?
The duplicate entries might be the cause, yeah, but I need some additional information to be able to trace things through the code in the JDK and reproduce the problem myself.
Please run Test1.class the same way as above and show me the output produce by that. (It ought to be the same as above, but with some additional lines saying true
or false
.)
Command:
"C:\Program Files\VASSAL-3.6.14\jre\bin\java.exe" --add-opens java.desktop/sun.awt.shell=ALL-UNNAMED -cp Downloads Test1
The output of the command is too long for a screenshot, so I copy here all the text output.
C:\Users\duduy>“C:\Program Files\VASSAL-3.6.14\jre\bin\java.exe” --add-opens java.desktop/sun.awt.shell=ALL-UNNAMED -cp Downloads Test1 C:\Users\duduy\Documents true true Este equipo false true C:\Users\duduy true false Bibliotecas false true Red false true C:\Users\duduy\OneDrive true false C:\Users\duduy\Documents\MEGAsync true false C:\Users\duduy\Documents\MEGAsync true false C:\Users\duduy\Dropbox true false C:\Users\duduy\Music true false C:\Users\duduy\Downloads true false C:\Users\duduy\Pictures true false C:\Users\duduy\Videos true false C:\Users\duduy\Desktop true false C:\Users\duduy\Desktop\Curse of Strahd - Acceso directo.lnk true false C:\Users\duduy\Desktop\Darkest Dungeon®.url true false C:\Users\duduy\Desktop\descuento vodafone 2021-2022.txt true false C:\Users\duduy\Desktop\Discord.lnk true false C:\Users\duduy\Desktop\gasolina 2021.rtf true false C:\Users\duduy\Desktop\ISDEFE.txt true false C:\Users\duduy\Desktop\MEGAsync.lnk true false C:\Users\duduy\Desktop\Microsoft Teams.lnk true false C:\Users\duduy\Desktop\Navegador Opera.lnk true false C:\Users\duduy\Desktop\Night in the Woods.url true false C:\Users\duduy\Desktop\para imprimir true false C:\Users\duduy\Desktop\Personal - Edge.lnk true false C:\Users\duduy\Desktop\Precio bus VS electrico.txt true false C:\Users\duduy\Desktop\Solicitud Voto correo elecciones 2021.pdf true false C:\Users\duduy\Desktop\Stellaris.url true false C:\Users\duduy\Desktop\Sunless Sea.url true false C:\Users\duduy\Desktop\uncaught exception.jpg true false C:\Users\duduy\Desktop\VASSAL 3.4.6.lnk true false C:\Users\duduy\Desktop\VASSAL 3.6.14.lnk true false C:\Users\Public\Desktop\Adobe Acrobat.lnk true false C:\Users\Public\Desktop\Avira.lnk true false C:\Users\Public\Desktop\Brother Utilities.lnk true false C:\Users\Public\Desktop\calibre 64bit - E-book management.lnk true false C:\Users\Public\Desktop\Epic Games Launcher.lnk true false C:\Users\Public\Desktop\Google Chrome.lnk true false C:\Users\Public\Desktop\Microsoft Edge.lnk true false C:\Users\Public\Desktop\Paradox Launcher.lnk true false C:\Users\Public\Desktop\Steam.lnk true false C:\Users\duduy\Documents Este equipo Red Bibliotecas C:\Users\duduy C:\Users\duduy\Desktop C:\Users\duduy\Desktop\Curse of Strahd - Acceso directo.lnk C:\Users\duduy\Desktop\Darkest Dungeon®.url C:\Users\duduy\Desktop\descuento vodafone 2021-2022.txt C:\Users\duduy\Desktop\Discord.lnk C:\Users\duduy\Desktop\gasolina 2021.rtf C:\Users\duduy\Desktop\ISDEFE.txt C:\Users\duduy\Desktop\MEGAsync.lnk C:\Users\duduy\Desktop\Microsoft Teams.lnk C:\Users\duduy\Desktop\Navegador Opera.lnk C:\Users\duduy\Desktop\Night in the Woods.url C:\Users\duduy\Desktop\para imprimir C:\Users\duduy\Desktop\Personal - Edge.lnk C:\Users\duduy\Desktop\Precio bus VS electrico.txt C:\Users\duduy\Desktop\Solicitud Voto correo elecciones 2021.pdf C:\Users\duduy\Desktop\Stellaris.url C:\Users\duduy\Desktop\Sunless Sea.url C:\Users\duduy\Desktop\uncaught exception.jpg C:\Users\duduy\Desktop\VASSAL 3.4.6.lnk C:\Users\duduy\Desktop\VASSAL 3.6.14.lnk C:\Users\duduy\Documents\MEGAsync C:\Users\duduy\Documents\MEGAsync C:\Users\duduy\Downloads C:\Users\duduy\Dropbox C:\Users\duduy\Music C:\Users\duduy\OneDrive C:\Users\duduy\Pictures C:\Users\duduy\Videos C:\Users\Public\Desktop\Adobe Acrobat.lnk C:\Users\Public\Desktop\Avira.lnk C:\Users\Public\Desktop\Brother Utilities.lnk C:\Users\Public\Desktop\calibre 64bit - E-book management.lnk C:\Users\Public\Desktop\Epic Games Launcher.lnk C:\Users\Public\Desktop\Google Chrome.lnk C:\Users\Public\Desktop\Microsoft Edge.lnk C:\Users\Public\Desktop\Paradox Launcher.lnk C:\Users\Public\Desktop\Steam.lnk
Maybe this duplication is the problem, I will try to check why there are two instead only one.
Are you still able to reproduce the original problem by running Vassal 3.6.14? I was expecting both of the tests to trigger the exception you were seeing originally.
If you can still reproduce the problem, please do not try to fix it before we can determine the cause.
Duplication of the MEGAsync element is removed so only one input is listed.
However bug is still happening when I tried to load.
I have put again the command line with this result:
C:\Users\duduy>“C:\Program Files\VASSAL-3.6.14\jre\bin\java.exe” --add-opens java.desktop/sun.awt.shell=ALL-UNNAMED -cp Downloads Test1 C:\Users\duduy\Documents true true Este equipo false true C:\Users\duduy true false Bibliotecas false true Red false true C:\Users\duduy\OneDrive true false C:\Users\duduy\Documents\MEGAsync true false C:\Users\duduy\Dropbox true false C:\Users\duduy\Music true false C:\Users\duduy\Downloads true false C:\Users\duduy\Pictures true false C:\Users\duduy\Videos true false C:\Users\duduy\Desktop true false C:\Users\duduy\Desktop\Curse of Strahd - Acceso directo.lnk true false C:\Users\duduy\Desktop\Darkest Dungeon®.url true false C:\Users\duduy\Desktop\descuento vodafone 2021-2022.txt true false C:\Users\duduy\Desktop\Discord.lnk true false C:\Users\duduy\Desktop\gasolina 2021.rtf true false C:\Users\duduy\Desktop\ISDEFE.txt true false C:\Users\duduy\Desktop\MEGAsync.lnk true false C:\Users\duduy\Desktop\Microsoft Teams.lnk true false C:\Users\duduy\Desktop\Navegador Opera.lnk true false C:\Users\duduy\Desktop\Night in the Woods.url true false C:\Users\duduy\Desktop\para imprimir true false C:\Users\duduy\Desktop\Personal - Edge.lnk true false C:\Users\duduy\Desktop\Precio bus VS electrico.txt true false C:\Users\duduy\Desktop\Solicitud Voto correo elecciones 2021.pdf true false C:\Users\duduy\Desktop\Stellaris.url true false C:\Users\duduy\Desktop\Sunless Sea.url true false C:\Users\duduy\Desktop\uncaught exception.jpg true false C:\Users\duduy\Desktop\VASSAL 3.4.6.lnk true false C:\Users\duduy\Desktop\VASSAL 3.6.14.lnk true false C:\Users\Public\Desktop\Adobe Acrobat.lnk true false C:\Users\Public\Desktop\Avira.lnk true false C:\Users\Public\Desktop\Brother Utilities.lnk true false C:\Users\Public\Desktop\calibre 64bit - E-book management.lnk true false C:\Users\Public\Desktop\Epic Games Launcher.lnk true false C:\Users\Public\Desktop\Google Chrome.lnk true false C:\Users\Public\Desktop\Microsoft Edge.lnk true false C:\Users\Public\Desktop\Paradox Launcher.lnk true false C:\Users\Public\Desktop\Steam.lnk true false C:\Users\duduy\Documents Este equipo Red Bibliotecas C:\Users\duduy C:\Users\duduy\Desktop C:\Users\duduy\Desktop\Curse of Strahd - Acceso directo.lnk C:\Users\duduy\Desktop\Darkest Dungeon®.url C:\Users\duduy\Desktop\descuento vodafone 2021-2022.txt C:\Users\duduy\Desktop\Discord.lnk C:\Users\duduy\Desktop\gasolina 2021.rtf C:\Users\duduy\Desktop\ISDEFE.txt C:\Users\duduy\Desktop\MEGAsync.lnk C:\Users\duduy\Desktop\Microsoft Teams.lnk C:\Users\duduy\Desktop\Navegador Opera.lnk C:\Users\duduy\Desktop\Night in the Woods.url C:\Users\duduy\Desktop\para imprimir C:\Users\duduy\Desktop\Personal - Edge.lnk C:\Users\duduy\Desktop\Precio bus VS electrico.txt C:\Users\duduy\Desktop\Solicitud Voto correo elecciones 2021.pdf C:\Users\duduy\Desktop\Stellaris.url C:\Users\duduy\Desktop\Sunless Sea.url C:\Users\duduy\Desktop\uncaught exception.jpg C:\Users\duduy\Desktop\VASSAL 3.4.6.lnk C:\Users\duduy\Desktop\VASSAL 3.6.14.lnk C:\Users\duduy\Documents\MEGAsync C:\Users\duduy\Downloads C:\Users\duduy\Dropbox C:\Users\duduy\Music C:\Users\duduy\OneDrive C:\Users\duduy\Pictures C:\Users\duduy\Videos C:\Users\Public\Desktop\Adobe Acrobat.lnk C:\Users\Public\Desktop\Avira.lnk C:\Users\Public\Desktop\Brother Utilities.lnk C:\Users\Public\Desktop\calibre 64bit - E-book management.lnk C:\Users\Public\Desktop\Epic Games Launcher.lnk C:\Users\Public\Desktop\Google Chrome.lnk C:\Users\Public\Desktop\Microsoft Edge.lnk C:\Users\Public\Desktop\Paradox Launcher.lnk C:\Users\Public\Desktop\Steam.lnk
For reference, here is the version of Win32ShellFolderManager2
from Java 19.0.2.
Line 315 is the call to Arrays.sort
, which matches the stack trace:
File[] secondLevelFolders = checkFiles(desktop.listFiles());
Arrays.sort(secondLevelFolders);
desktop
comes from a call to getDesktop()
at line 301.
This is the (current) contents of the test program:
import java.lang.reflect.Method;
import java.io.File;
import java.util.Arrays;
class Test2 {
public static void main(String[] args) throws Exception {
final Class<?> c = Class.forName("sun.awt.shell.Win32ShellFolderManager2");
final Method getDesktop = c.getDeclaredMethod("getDesktop");
getDesktop.setAccessible(true);
final Method checkFiles = c.getDeclaredMethod("checkFiles", File[].class);
checkFiles.setAccessible(true);
final Class<?> fc = Class.forName("sun.awt.shell.Win32ShellFolder2");
final Method isFileSystem = fc.getMethod("isFileSystem");
isFileSystem.setAccessible(true);
final Method isSpecial = fc.getMethod("isSpecial");
isSpecial.setAccessible(true);
final File desktop = (File) getDesktop.invoke(null);
final File[] files = (File[]) checkFiles.invoke(null, (Object) desktop.listFiles());
for (File f: files) {
System.out.println(f);
if (fc.isInstance(f)) {
System.out.println(isFileSystem.invoke(f));
System.out.println(isSpecial.invoke(f));
}
}
Arrays.sort(files);
}
}
It’s using reflection to prise out of the JDK the classes involved in the original stack trace. The last statement, the call to Arrays.sort()
, ought to trigger the exception just as happens with the file dialog.
Please run Test2.class the same way as above.
Command:
"C:\Program Files\VASSAL-3.6.14\jre\bin\java.exe" --add-opens java.desktop/sun.awt.shell=ALL-UNNAMED -cp Downloads Test2
I hope this produces the exception you saw originally.
I run the command as you suggest. This is the result:
C:\Users\duduy>“C:\Program Files\VASSAL-3.6.14\jre\bin\java.exe” --add-opens java.desktop/sun.awt.shell=ALL-UNNAMED -cp Downloads Test2
C:\Users\duduy\Documents
true
true
Este equipo
false
true
C:\Users\duduy
true
false
Bibliotecas
false
true
Red
false
true
C:\Users\duduy\OneDrive true false
C:\Users\duduy\Documents\MEGAsync true false
C:\Users\duduy\Dropbox true false
C:\Users\duduy\Music true false
C:\Users\duduy\Downloads true false
C:\Users\duduy\Pictures true false
C:\Users\duduy\Videos true false
C:\Users\duduy\Desktop true false
C:\Users\duduy\Desktop\Curse of Strahd - Acceso directo.lnk true false
C:\Users\duduy\Desktop\Darkest Dungeon®.url true false
C:\Users\duduy\Desktop\descuento vodafone 2021-2022.txt true false
C:\Users\duduy\Desktop\Discord.lnk true false
C:\Users\duduy\Desktop\gasolina 2021.rtf true false
C:\Users\duduy\Desktop\ISDEFE.txt true false
C:\Users\duduy\Desktop\MEGAsync.lnk true false
C:\Users\duduy\Desktop\Microsoft Teams.lnk true false
C:\Users\duduy\Desktop\Navegador Opera.lnk true false
C:\Users\duduy\Desktop\Night in the Woods.url true false
C:\Users\duduy\Desktop\para imprimir true false
C:\Users\duduy\Desktop\Personal - Edge.lnk true false
C:\Users\duduy\Desktop\Precio bus VS electrico.txt true false
C:\Users\duduy\Desktop\result 3.txt true false
C:\Users\duduy\Desktop\Solicitud Voto correo elecciones 2021.pdf true false
C:\Users\duduy\Desktop\Stellaris.url true false
C:\Users\duduy\Desktop\Sunless Sea.url true false
C:\Users\duduy\Desktop\uncaught exception.jpg true false
C:\Users\duduy\Desktop\VASSAL 3.4.6.lnk true false
C:\Users\duduy\Desktop\VASSAL 3.6.14.lnk true false
C:\Users\Public\Desktop\Adobe Acrobat.lnk true false
C:\Users\Public\Desktop\Avira.lnk true false
C:\Users\Public\Desktop\Brother Utilities.lnk true false
C:\Users\Public\Desktop\calibre 64bit - E-book management.lnk true false
C:\Users\Public\Desktop\Epic Games Launcher.lnk true false
C:\Users\Public\Desktop\Google Chrome.lnk true false
C:\Users\Public\Desktop\Microsoft Edge.lnk true false
C:\Users\Public\Desktop\Paradox Launcher.lnk true false
C:\Users\Public\Desktop\Steam.lnk true false
Does the problem happen with file dialogs in the Module Manager, e.g., the one you get from File > Open Module?
We need to take a different approach to finding out what arguments Arrays.sort()
receives when you open a file dialog. Please try Test3.
The command line for Test3 is shorter than before:
"C:\Program Files\VASSAL-3.6.14\jre\bin\java.exe" -cp Downloads Test3
Here’s the source code:
import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
class Test3 {
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(() -> {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JFileChooser fd = new JFileChooser();
fd.setCurrentDirectory(new File("C:\\Users\\duduy"));
fd.showOpenDialog(null);
}
catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
});
}
}
What the program will try to do is show you a file dialog. If there is an exception, that should be printed to the terminal.
What happens when you run this? Do you get an exception?
Well, first of all. In the Module Manage, the problem does not happen. So when selected File > Open Module, the window opens and I can select a vassal module without problem.
This is the screenshot of the result (this time is shoter)
That’s a welcome result. Now we have a minimal test case that can reproduce the problem. Next I’ll work on getting you a program that can dump the input to Arrays.sort()
, which is what we need to find out what’s causing the problem.