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

[Bug]: Saving or opening a campaign broke on my PC, as well as any import or export #4320

Open
sasha-bai opened this issue Oct 4, 2023 · 2 comments
Assignees
Labels

Comments

@sasha-bai
Copy link

Describe the Bug

My MapTool application suddenly started to show me errors on Save Campaign and Open Campaign. Although I can open a recently saved campaign, I cannot save it, or open other campaigns, rendering the application practically impossible to use.

image

This (or at least very similar) error happens in the following cases:

File - Save Campaign
File - Save Campaign As
File - Save Chatlog History
File - Export - Screenshot - Browse
File - Export - Screenshot As - Browse
File - Export - Campaign Repository File
File - Add Resource to Library - ...
File - Add On Libraries - Add
Edit - Campaign Properties - Import
Edit - Campaign Properties - Export
Edit - Preferences - Application - File Sync Directory - ...
Map - Import Map
Map - Export Map
Map - import Unversal VTT

And possibly in some others. Looks like everything that has to ask access to my file system has issues.

To Reproduce

I'm not sure how to reproduce it on other machines.

Expected Behaviour

I was able to save and open campaigns before, but now this leads to error

Screenshots

No response

MapTool Info

Tried 1.13.2 and 1.14.0

Desktop

OS: Windows 11, Ukrainian localization, though I try hard not to have paths in cyrillic

Additional Context

A full error text:
java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.base/java.util.ComparableTimSort.mergeHi(Unknown Source) at java.base/java.util.ComparableTimSort.mergeAt(Unknown Source) at java.base/java.util.ComparableTimSort.mergeForceCollapse(Unknown Source) at java.base/java.util.ComparableTimSort.sort(Unknown Source) at java.base/java.util.Arrays.sort(Unknown Source) at java.desktop/sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source) at java.desktop/sun.awt.shell.ShellFolder.get(Unknown Source) at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxModel.addItem(Unknown Source) at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI.doDirectoryChanged(Unknown Source) at java.desktop/javax.swing.plaf.metal.MetalFileChooserUI$5.propertyChange(Unknown Source) at java.desktop/java.beans.PropertyChangeSupport.fire(Unknown Source) at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source) at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source) at java.desktop/java.awt.Component.firePropertyChange(Unknown Source) at java.desktop/javax.swing.JFileChooser.setCurrentDirectory(Unknown Source) at com.formdev.flatlaf.ui.FlatFileChooserUI$FlatShortcutsPanel.lambda$new$0(FlatFileChooserUI.java:457) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(Unknown Source) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.desktop/java.awt.Component.processMouseEvent(Unknown Source) at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source) at java.desktop/java.awt.Component.processEvent(Unknown Source) at java.desktop/java.awt.Container.processEvent(Unknown Source) at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:54) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source) at java.desktop/java.awt.Dialog.show(Unknown Source) at java.desktop/javax.swing.JFileChooser.showDialog(Unknown Source) at java.desktop/javax.swing.JFileChooser.showOpenDialog(Unknown Source) at net.rptools.maptool.client.AppActions$67.executeAction(AppActions.java:2523) at net.rptools.maptool.client.AppActions$ClientAction.execute(AppActions.java:3425) at net.rptools.maptool.client.AppActions$ClientAction.actionPerformed(AppActions.java:3457) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source) at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.desktop/java.awt.Component.processMouseEvent(Unknown Source) at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source) at java.desktop/java.awt.Component.processEvent(Unknown Source) at java.desktop/java.awt.Container.processEvent(Unknown Source) at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:54) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

I'm blaming my previous unsuccessful Strange Eons installation. It's an application unrelated to MT, but I thought it may have started the issue, cause it also showed some java-related errors an refused to work after the installation at all. Or, perhaps, some issue on my PC affected them both.

So far I tried uninstalling Strange Eons, re-installing and uninstalling Java, and uninstalling and re-installing MapTool to 1.13.2 and then to 1.14.0, but the issue stills remains.

Windows location:
'C:\Windows'

MapTool installation folder
'E:\MapTool'

Folder where I store my campaigns and maps:
'D:\Wargames and RPGs_MapTools saved campaigns'

When this issue happened, the path was
'D:\War+RPG_MapTools saved campaigns', and it worked for me before.

I removed the '+' symbol and renamed it to 'Wargames and RPGs' after @Jmr3366 recommendation on Discord server, and this did not fix the issue, but achived some results.

Now, when I'm trying to Open a campaign, I don't get the error immediately, instead MT shows me my Documents folder:
C:\Users\Shuriken\Documents

Clicking on any other folder either within the Documents or outside it immediately leads to the error described above.

Hovewer, if I place a .cmpgn file in the Documents folder, I can open it and even save it. But I cannot click on 'Save as' and save it elsewhere.

Also, afterI loading the campaign from the Documents folder, I cannot click Open anymore, this brings the error again, unless I restart the MapTool.

@sasha-bai sasha-bai added the bug label Oct 4, 2023
@sasha-bai
Copy link
Author

May have something to do with this Java bug
https://bugs.openjdk.org/browse/JDK-8305072

@sasha-bai
Copy link
Author

1.14.0-beta.2 added a workaround, which fixed this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Testing
Development

No branches or pull requests

2 participants