VASSAL Preferences error

Good morning. Thanks to Robbie and J. for the help with my previous VASL post.

This one is about VASSAL 3.1.15, and the preferences.

I am using the following system:

I have VASSAL 3.1.15 running on a MacBook Pro. Mac OSX.6.5, with 2 NVidea graphics cards, 9400M and a 9600M GT, for a total of 756 MB, 4GB RAM and 60+ GB of free space on the hard drive.

About once a week, when I open VASSAL, I get an error message as follows:

Unable to write file

VASSAL was unable to write the file ‘/Users/steve/VASSAL/Preferences’.

java.io.IOException: Unable to overwrite /Users/steve/VASSAL/Preferences
Data stored in /Users/steve/VASSAL/temp2.zip
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:475)
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:266)
at VASSAL.preferences.PrefsEditor.write(PrefsEditor.java:235)
at VASSAL.preferences.Prefs.write(Prefs.java:207)
at VASSAL.preferences.Prefs.getGlobalPrefs(Prefs.java:233)
at VASSAL.i18n.Resources.(Resources.java:90)
at VASSAL.launch.ModuleManagerWindow.(ModuleManagerWindow.java:198)
at VASSAL.launch.ModuleManagerWindow.(ModuleManagerWindow.java:168)
at VASSAL.launch.ModuleManager.launch(ModuleManager.java:386)
at VASSAL.launch.ModuleManager$2.run(ModuleManager.java:281)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Normally I am playing A Victory Lost (ver 4.4.4) or Europe Engulfed (ver 1.7), but this happens before I open the module. It may be the cause of AVL now seeing me as a spectator instead of the Russian player, I don’t know.

Any thoughts?

Thank you to the moderators for all of your time and work in helping all of us Java-clueless gamers.

Steve

On Jan 5, 2011, at 6:17 AM, sgtsteve wrote:

[Mac System]

About once a week, when I open VASSAL, I get an error message as
follows:

Unable to write file

VASSAL was unable to write the file ‘/Users/steve/VASSAL/Preferences’.

java.io.IOException: Unable to overwrite /Users/steve/VASSAL/
Preferences
Data stored in /Users/steve/VASSAL/temp2.zip

I have also run into this problem on occasion.

It turns out that in spite of the error message, the preferences file
has, in fact, been successfully written and is identical to what is
stored in the temp.zip file.

It has not been fully diagnosed, but I can think of two possible causes.

  1. The preferences file is being saved more than once from different
    threads in Vassal, and sometimes the second write occurs while the
    first is still going on. In that case, the file cannot be written
    because it is already open for writing and you get an IO exception.

  2. If you have antivirus software that is set to scan newly created
    files, there could be an interaction where Vassal saves the
    preferences twice in quick succession. But between the two saves, the
    antivirus software opens the file to scan it, which would block
    writing the file and cause an IO exception.

Are you running any anti-virus software?

Thus spake sgtsteve:

Good morning. Thanks to Robbie and J. for the help with my previous
VASL post.

This one is about VASSAL 3.1.15, and the preferences.

I am using the following system:

I have VASSAL 3.1.15 running on a MacBook Pro. Mac OSX.6.5, with 2
NVidea graphics cards, 9400M and a 9600M GT, for a total of 756 MB, 4GB
RAM and 60+ GB of free space on the hard drive.

About once a week, when I open VASSAL, I get an error message as
follows:

For reference, this is Bug 2798:

vassalengine.org/tracker/sho … gi?id=2798

All I can say right now is that this is a threading problem. It’s
unlikely that I’ll have time to look into this particular bug, so
I’d welcome a fix from anyone who wants to look into it.


J.