Create account / Log in

Unable to Write File error when saving

Issues with the Vassal engine.

Moderators: uckelman, Tim M

Unable to Write File error when saving

Postby LeroyJS » July 26th, 2020, 7:14 am

Hey there, I got this error log when I was trying to save a game the other day. Any idea what would be causing this?

I haven't made any changes to my system, except updating Java. However this error occurred before and after that update.

Code: Select all
java.io.FileNotFoundException: /Users/Name/Desktop/tmp3929771256020253748.zip (Permission denied)
   at java.io.FileOutputStream.open0(Native Method)
   at java.io.FileOutputStream.open(FileOutputStream.java:270)
   at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
   at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
   at VASSAL.tools.io.ZipArchive.writeToDisk(ZipArchive.java:420)
   at VASSAL.tools.io.ZipArchive.close(ZipArchive.java:398)
   at VASSAL.build.module.GameState.saveGame(GameState.java:718)
   at VASSAL.build.module.GameState.saveGameAs(GameState.java:505)
   at VASSAL.build.module.GameState$3.actionPerformed(GameState.java:137)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
   at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
   at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
   at java.awt.MenuItem.processEvent(MenuItem.java:628)
   at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
   at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:763)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
   at java.awt.EventQueue$4.run(EventQueue.java:733)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
LeroyJS
 
Posts: 10
Joined: July 19th, 2017, 6:01 pm

Re: Unable to Write File error when saving

Postby Flint1b » July 26th, 2020, 12:05 pm

According to the line number in ZipArchive, this looks like Vassal 3.2.17 https://github.com/vassalengine/vassal/ ... .java#L420

And the error indicates that FileInputStream was not allowed to access the temp file that was created a couple of lines above.

Is this possibly on windows and/or using a network file system like dropbox?
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Unable to Write File error when saving

Postby LeroyJS » July 26th, 2020, 6:46 pm

No, I'm on Mac.

And I do use Dropbox but I was just saving this to my desktop.
LeroyJS
 
Posts: 10
Joined: July 19th, 2017, 6:01 pm

Re: Unable to Write File error when saving

Postby Flint1b » July 26th, 2020, 7:12 pm

To Desktop, interesting.

Possibly a result of Vassal not being allowed to write there? Was it the first time you tried to save anything from Vassal on the Desktop? Has it worked before?

Does it have to do with this here:
https://support.apple.com/guide/mac-hel ... a35146/mac ?
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Unable to Write File error when saving

Postby LeroyJS » July 27th, 2020, 12:01 am

I had an issue with this a long time ago, when some anti-virus software was interfering with Vassals write permissions for some reason. However, that was years ago and I had it resolved. I've been putting my vassal save files on my desktop with no problem ever since then.

I'll check into that anti-virus again...maybe it auto-updated and reset whatever it was doing.

And I am on High Sierra so the Files and Folders permissions aren't in the Security/Privacy, but I'm sure they are somewhere else in System Preferences. I will look into that an see if fixing permissions there has any effect. I'll post an update either way. Thanks for looking into this.
LeroyJS
 
Posts: 10
Joined: July 19th, 2017, 6:01 pm

Re: Unable to Write File error when saving

Postby ClaudioC » July 27th, 2020, 6:23 am

Hello,
I got the unable to write to file error today on closing a logfile.
No antivirus, no dropbox folder, just writing in the desktop.
3.3.2 + Windows 10
Attaching error log.
Attachments
errorLog.txt
(7.52 KiB) Downloaded 62 times
User avatar
ClaudioC
 
Posts: 55
Joined: April 18th, 2018, 6:30 pm

Re: Unable to Write File error when saving

Postby jrwatts » July 27th, 2020, 8:09 am

You say "no dropbox folder", but I see that it's writing to a OneDrive folder, which is Microsoft's equivalent....

If I had to guess, I would say OneDrive interfered with the process (locking the file in preparation to uploading, perhaps?), but that is only a guess.
It really looks to me like VASSAL needs to fail more gracefully on this error, perhaps give an option to retry (or even do a single, silent, retry before failing)?
jrwatts
 
Posts: 90
Joined: April 29th, 2020, 10:30 pm

Re: Unable to Write File error when saving

Postby ClaudioC » July 27th, 2020, 10:34 am

I never realized my desktop was in a One Drive, I turned Onedrive off on that PC.
"C:\Users\claud\OneDrive\Desktop\TGD 6J 1300 50C.vlog"
But maybe windows is running some One Drive service, even if I do not see any on the process manager.

In any case, this error occurs with a test version, not even 3.3.2, but VASSAL-3.3.2-407-gc11ffef3-bug13205

That was a test version used to test file save errors. That might be the reasons
User avatar
ClaudioC
 
Posts: 55
Joined: April 18th, 2018, 6:30 pm

Re: Unable to Write File error when saving

Postby uckelman » July 27th, 2020, 10:59 am

Thus spake ClaudioC:
> Hello,
> I got the unable to write to file error today on closing a logfile.
> No antivirus, no dropbox folder, just writing in the desktop.

Isn't OneDrive cloud storage?

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Unable to Write File error when saving

Postby ClaudioC » July 27th, 2020, 7:46 pm

Joel, I disabled One Drive when I installed windows 10, but for some reason, windows decided that my users account folders should be in a path C:\Users\claud\OneDrive

I did not even know that, as windows does not show the path of the desktop. But I confirm that I am not using OneDrive.

Also, it seems to occur all the time and in any directory with the version VASSAL-3.3.2-407-gc11ffef3-bug13205 that you had asked me to test some days ago.
User avatar
ClaudioC
 
Posts: 55
Joined: April 18th, 2018, 6:30 pm

Re: Unable to Write File error when saving

Postby uckelman » July 27th, 2020, 11:51 pm

Claudio, what happens for you with VASSAL-3.3.3-SNAPSHOT-9a9020b4?

http://www.vassalengine.org/~uckelman/tmp/
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Unable to Write File error when saving

Postby ClaudioC » July 28th, 2020, 4:25 am

Same error. Both with save as and close logfile.
Attachments
errorLog.txt
(18.47 KiB) Downloaded 58 times
User avatar
ClaudioC
 
Posts: 55
Joined: April 18th, 2018, 6:30 pm

Re: Unable to Write File error when saving

Postby uckelman » July 28th, 2020, 1:29 pm

How about with VASSAL-3.3.3-SNAPSHOT-bug13014-d468953e?
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Unable to Write File error when saving

Postby ClaudioC » July 28th, 2020, 8:20 pm

There is no windows 64 build for that snapshot
Annotation 2020-07-28 221928.png
Annotation 2020-07-28 221928.png (58.15 KiB) Viewed 1703 times
User avatar
ClaudioC
 
Posts: 55
Joined: April 18th, 2018, 6:30 pm

Re: Unable to Write File error when saving

Postby uckelman » August 3rd, 2020, 6:43 pm

I gave up on the bug13014 branch as the ZipFS API I switched to in it has potential problems I'd prefer we avoid at this point.

The current build is VASSAL-3.3.3-SNAPSHOT-2d301d84. It shouldn't show you a bug dialog. It will probably still be unable to write to the file you're trying to write to.
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Next

Return to Technical Support & Bugs

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

cron