Log File Won't Write

Hi,

I’m selecting “end log file” in a game of Siege of Alesia, and getting a “cannot write log file” message. The details are:

java.io.IOException: Unable to overwrite C:\Documents and Settings\Chris\My Documents\Gaming\Gaming Online\Vassal\Modules\Vassal - Siege of Alesia\Saves\Log 19 Gallic.vlog
Data stored in C:\Documents and Settings\Chris\My Documents\Gaming\Gaming Online\Vassal\Modules\Vassal - Siege of Alesia\Saves\temp4.zip
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:475)
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:266)
at VASSAL.build.module.BasicLogger.write(BasicLogger.java:292)
at VASSAL.build.module.BasicLogger$4.actionPerformed(BasicLogger.java:413)
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.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.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.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)

I use Win XP home, module version1.0, Vassal 3.1.14. We’ve always done our saves from this version of the module, and this version of the log. Can anyone help?

Thanks,

Chris

Is there an chance that the directory or file has become Read-Only? Since
the module and VASSAL engine have not changed, looking at the environment is
next on the list of things to check.

Pieter

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of fatgreta
Sent: Sunday, February 06, 2011 6:03 PM
To: messages@vassalengine.org
Subject: [messages] [Technical Support & Bugs] Log File Won’t Write

Hi,

I’m selecting “end log file” in a game of Siege of Alesia, and getting a
“cannot write log file” message. The details are:

java.io.IOException: Unable to overwrite C:\Documents and
Settings\Chris\My Documents\Gaming\Gaming Online\Vassal\Modules\Vassal -
Siege of Alesia\Saves\Log 19 Gallic.vlog
Data stored in C:\Documents and Settings\Chris\My
Documents\Gaming\Gaming Online\Vassal\Modules\Vassal - Siege of
Alesia\Saves\temp4.zip
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:475)
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:266)
at VASSAL.build.module.BasicLogger.write(BasicLogger.java:292)
at
VASSAL.build.module.BasicLogger$4.actionPerformed(BasicLogger.java:413)
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.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.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.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)

I use Win XP home, module version1.0, Vassal 3.1.14. We’ve always done
our saves from this version of the module, and this version of the log.
Can anyone help?

Thanks,

Chris


Read this topic online here:
https://forum.vassalengine.org/t/log-file-wont-write/3647/1

Dude, you are a genius! Problem solved. I would never, in a million years, have thought of that. How it became read only, I have no idea, but it did indeed.

Thank you so much!

Chris

Thus spake fatgreta:

Dude, you are a genius! Problem solved. I would never, in a million
years, have thought of that. How it became read only, I have no idea,
but it did indeed.

I would love to know how this happens. We get people with this problem
periodically. I doubt that it’s anything our code causes, as I can’t
think of any place where we change file permissions. Still, I’d like
to know the cause to see if there’s any way we can mitigate it.


J.

There must be a way within Java to actually set it to read/write. We could
just do that before we try to write to it. Then we don’t have to worry
about the cause.

Knowing Windows, it could be caused by any number of things completely out
of our control. Maybe it’s a “feature”.

  • M.

On 7 February 2011 18:06, Joel Uckelman uckelman@nomic.net wrote:

Thus spake fatgreta:

Dude, you are a genius! Problem solved. I would never, in a million
years, have thought of that. How it became read only, I have no idea,
but it did indeed.

I would love to know how this happens. We get people with this problem
periodically. I doubt that it’s anything our code causes, as I can’t
think of any place where we change file permissions. Still, I’d like
to know the cause to see if there’s any way we can mitigate it.


J.

Nice! :laughing:

Actually I think this is more likely a “user feature” rather than a “Windows
feature”. I have encountered this in many applications over the years, and
the cause has always been a variation of this action by the user:
File copy to a Read-only device such as CD-ROM and then copy back to a
Windows directory.

There are numerous reasons why users set the read-only attribute on files
deliberately, all to do with “I WANT TO MAKE $^%& SURE I CAN’T OVERWRITE
THIS ACCIDENTALLY.”. I would vote against (as many times as you will let me
have ballots) for changing this bit behind the scenes. However, when a write
encounters this circumstance it should report to the user that the write
failed specifically because the read-only attribute was set. This should
also be trapped when the write is attempted to a read-only medium.

Pieter

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of fatgreta
Sent: Wednesday, February 09, 2011 9:25 AM
To: messages@vassalengine.org
Subject: [messages] [Technical Support & Bugs] Re: [Technical Support &Bugs]
Re: Log File Won’t

“mkiefte” wrote:

Maybe it’s a “feature”.

  • M.

Nice! :laughing:


Read this topic online here:

I would vote against (as many times as you will let me

have ballots) for changing this bit behind the scenes. However, when a
write
encounters this circumstance it should report to the user that the write
failed specifically because the read-only attribute was set. This should
also be trapped when the write is attempted to a read-only medium.

Pieter

Fair enough. That probably is the most appropriate thing to do.

  • M.