Possible Vassal Mod 3.2.15 bug

Working on a module I noticed that if I try and add a plain text help file to the HELP MENU and save it all is well. I can continue to work and save with no problem. BUT if I open the plain text help file and then close it and try to add something else to module and save I get an error unable to write. I tried opening and closing file and saving then and I still get the error. I thought it was just something going on with this module but it happens on other modules not created by me when I open the help file and do above. I can close the module and re-open it and continue to add stuff to it as long as I don’t open the help text file (okay I hear the solution now, “don’t open the text file”). I thought you might want to know about it though.

Here is the error report:

java.io.IOException: Unable to overwrite C:\Program Files (x86)\Vassal games\Next War India Pakistan\NWIP_Vassal_playtest_4.9.vmod: Data written to C:\Program Files (x86)\Vassal games\Next War India Pakistan\tmp1280894858139098905.zip instead.
at VASSAL.tools.io.ZipArchive.writeToDisk(ZipArchive.java:508)
at VASSAL.tools.io.ZipArchive.flush(ZipArchive.java:382)
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:240)
at VASSAL.tools.ArchiveWriter.save(ArchiveWriter.java:231)
at VASSAL.build.GameModule.save(GameModule.java:1010)
at VASSAL.build.GameModule.save(GameModule.java:989)
at VASSAL.launch.ModuleEditorWindow$2.run(ModuleEditorWindow.java:100)
at VASSAL.launch.EditorWindow.saver(EditorWindow.java:303)
at VASSAL.launch.ModuleEditorWindow.save(ModuleEditorWindow.java:98)
at VASSAL.launch.EditorWindow$2.actionPerformed(EditorWindow.java:186)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: Unable to delete file: C:\Program Files (x86)\Vassal games\Next War India Pakistan\NWIP_Vassal_playtest_4.9.vmod
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2106)
at VASSAL.tools.io.ZipArchive.writeToDisk(ZipArchive.java:490)
… 46 more

Cheers
Kevin

Hi Kevin,

The problem is actually being caused by the fact that Vassal can’t delete or overwrite your module file when you try and save it. Most likely because you are saving the module file in the Program Files directory on a Windows system which is very problematic. Windows applies special controls to prevent programs from being overwritten. C:\Program Files (x86) is for programs and executable files, you should never store data that needs to be overwritten there.

Move your module storage area out of C:\Program Files (x86) to a data area (in your My Documents folder, or on your D: drive for example) and you should find this problem will go away.

Regards,
Brent.

Ahh, thank you Brent! So many things crossed my mind that could be wrong and one tends to miss the stuff under ones nose. That’s exactly where I am saving them too.

Cheers
Kevin