3.5.5 won't save logs correctly.

I upgraded from 3.5.3 to 3.5.5 this morning (and will likely be going backwards). Every log I save gives me an error like the 1st attachment. A sample log for this error is shown below: Please note that this happened when I did logs in games created in 3.5.3.

java.nio.file.FileSystemException: C:\Users\User\Dropbox\Gaming\VASSAL\PbEM\LnL Tactical\LnL Stephane & Joshua\Test.vlog: The process cannot access the file because it is being used by another process
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:384)
at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
at java.base/java.nio.file.Files.move(Files.java:1426)
at VASSAL.tools.io.ZipWriter.close(ZipWriter.java:112)
at VASSAL.build.module.BasicLogger.write(BasicLogger.java:401)
at VASSAL.build.module.BasicLogger$1.actionPerformed(BasicLogger.java:571)
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:1022)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1066)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6617)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6382)
at java.desktop/java.awt.Container.processEvent(Container.java:2264)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4563)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
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)

This is because you’re trying to save to Dropbox. Dropbox is very aggressive about watching files and taking locks on them. What’s happened for you is that VASSAL started writing your log and Dropbox locked it and started syncing it before VASSAL was finished writing the log—and because Dropbox took an exclusive lock, that prevents VASSAL from writing the rest of the log.

There will be a workaround for Dropbox’s aggravating, unfriendly behavior in 3.5.6. When using any version prior to 3.5.6, I recommend not saving directly to Dropbox.

To be clear, you could have this problem with any program writing files to Dropbox, not just VASSAL. The fact that we’re having to take extraordinary measures against interference from Dropbox is, well, extraordinary.

Interesting to read. Until a few months ago, I was opening log files in my dropbox folder and never had an issue (on Mac).
I still use it to host modules that I am editing and without issue, to my knowledge… and the module is getting written a lot more frequently that a log file gets closed.

Thus spake marktb1961:

Interesting to read. Until a few months ago, I was opening log files in
my dropbox folder and never had an issue (on Mac).
I still use it to host modules that I am editing and without issue, to
my knowledge… and the module is getting written a lot more frequently
that a log file gets closed.

None of this is relevant on Unix. It’s a Windows-only problem.


J.