Create account / Log in

Couldn't save module {0} - Bug:1860932

Issues with the Vassal engine.

Moderators: Tim M, uckelman

Couldn't save module {0} - Bug:1860932

Postby bsmith » December 10th, 2007, 2:18 am

Guys I'm seeing this bug quite often when trying to save an edited module. In fact I've lost a ton of work because of this. I'm using 3.0.12:

Code: Select all
-- OS Windows Vista
-- Java version 1.6.0_03
-- VASSAL version 3.0.12
-- Talavera & Vimeiro version 0.1
java.io.IOException: Unable to write to C:\Users\Public\Gaming Stuff\Talavera\Talavera v0.2.mod\Talavera v0.3.mod.zip
Data stored in C:\Users\Public\Gaming Stuff\Talavera\Talavera v0.2.mod\temp1.zip
   at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:277)
   at VASSAL.build.GameModule.save(GameModule.java:753)
   at VASSAL.build.GameModule.save(GameModule.java:739)
   at VASSAL.configure.ModuleEditWindow.save(ModuleEditWindow.java:189)
   at VASSAL.configure.ModuleEditWindow$2.actionPerformed(ModuleEditWindow.java:83)
   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.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)
java.io.FileNotFoundException: C:\Users\Public\Gaming Stuff\Talavera\Talavera v0.2.mod\Talavera v0.3.mod.zip (The system cannot find the file specified)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.<init>(Unknown Source)
   at java.io.FileInputStream.<init>(Unknown Source)
   at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:234)
   at VASSAL.build.GameModule.save(GameModule.java:753)
   at VASSAL.build.GameModule.save(GameModule.java:739)
   at VASSAL.configure.ModuleEditWindow.save(ModuleEditWindow.java:189)
   at VASSAL.configure.ModuleEditWindow$2.actionPerformed(ModuleEditWindow.java:83)
   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.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)
Last edited by bsmith on December 30th, 2007, 3:09 pm, edited 1 time in total.
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Postby uckelman » December 10th, 2007, 1:17 pm

Are you sure your work is lost? The stack trace seems to be saying that your module was saved in C:\Users\Public\Gaming Stuff\Talavera\Talavera v0.2.mod\temp1.zip because the file you were trying to write to couldn't be written.

Did you have the module open in another instance of VASSAL? Or with an archive program like WinZip at the time? My guess is that Vista was locking the file, and that's why you couldn't write to it.
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Postby bsmith » December 10th, 2007, 1:37 pm

In this particular instance I was able to close Vassal and recover the module from temp1.zip. But in the past I've not been so lucky.

When I get the error, even choosing "Save As" fails, there is no way to save the file other than hoping a temp file is still there. Sometimes there is, other times there is not.

I had actually used Winrar to compress the module before opening it for editing in Vassal; So I'm wondering if Winrar was still keeping it locked as you say. I've tried killing off a ton of processes in the hope of unlocking the file, but in the end just could not get it to save.
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Couldn't save module {0}

Postby uckelman » December 10th, 2007, 1:41 pm

Thus spake "bsmith":
In this particular instance I was able to close Vassal and recover the module
from temp1.zip. But in the past I've not been so lucky.

When I get the error, even choosing "Save As" fails, there is no way to save
the file other than hoping a temp file is still there. Sometimes there is, o
ther times there is not.

That's surprising. I don't see why that would happen. I'll look into this.

I had actually used Winrar to compress the module before opening it for editi
ng in Vassal; So I'm wondering if Winrar was still keeping it locked as you s
ay. I've tried killing off a ton of processes in the hope of unlocking the f
ile, but in the end just could not get it to save.

What else happens when you get this exception? Does VASSAL crash? Do
you get a dialog telling you what happened?

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Postby bsmith » December 10th, 2007, 1:53 pm

I only get a Message Box with the text "Couldn't save module {0}". The first time as a result of selecting "Save" then continually from then on. This all probably happens only once every 4 or 5 times I edit a module.
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Couldn't save module {0}

Postby uckelman » December 10th, 2007, 1:56 pm

Thus spake "bsmith":
I only get a Message Box with the text "Couldn't save module {0}". The first
time as a result of selecting "Save" then continually from then on. This al
l probably happens only once every 4 or 5 times I edit a module.


Has this ever happend when you know you haven't had the module open in
some other program first?

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Postby bsmith » December 10th, 2007, 2:02 pm

There is a distinct possibility that the only time it happens is when I've had the module open with another program. A read or write lock on the file certainly sounds the most likely cause, but I'm not sure why that lock would be still be around after killing off processes. Unless it's a Vista specific problem?
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Couldn't save module {0}

Postby uckelman » December 10th, 2007, 2:45 pm

Thus spake "bsmith":
There is a distinct possibility that the only time it happens is when I've ha
d the module open with another program. A read or write lock on the file cer
tainly sounds the most likely cause, but I'm not sure why that lock would be
still be around after killing off processes. Unless it's a Vista specific pr
oblem?


Could be Windows- or Vista-specific. I've never had it happen to me on
Linux, but it's also the case that I know I've never had a module I
was trying to save open in another program while VASSAL was running, so
that's not really a proper test. I have had problems with deleting files
on Windows before, where I couldn't delete a file because some other
program had a lock on it but it wasn't obvious what program that was.

Anyway, we should handle the error condition better, because we have
no control over whether some other program has write-locked files we
want to write.


--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Postby uckelman » December 18th, 2007, 12:05 am

Sorry, I only just now finished the other coding I was doing, so I haven't had
a chance to look at this yet. Maybe this week.
User avatar
uckelman
Site Admin
 
Posts: 8147
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Postby soft-bug » December 20th, 2007, 9:52 am

I have had the same problem and i wrote here how to resolve it :

This problem occurs for me when :

I work on a V2.9.9 module with the last 3.0.13 version. After editing the original v2.9.9 module and when i do "Save".

How to resolve it:

Ok, it's empiric, but it works : just do "Save as" with an other name for your module ...

This demarch still fail ?

For me it was only because iwas working on an USB key, which is not ready when i "Save as" ... or my harddisk was busy in the same time.


I hope it will help you ...
founder of The http://www.VassalFactory.org
User avatar
soft-bug
 
Posts: 222
Joined: December 20th, 2007, 9:30 am
Location: Paris / France

Postby Rindis » December 22nd, 2007, 12:54 am

I just had this same exact problem with 3.0.15. I'm on Win 2000 and the file most definitely had not been opened in anything else.

There was a zip file to recover from, but this error message does not say that anything has been saved off. In fact, it's possible it was saved off when I exited Vassal right afterwards.
User avatar
Rindis
 
Posts: 196
Joined: December 22nd, 2007, 12:49 am

Postby DrNostromo » December 22nd, 2007, 1:28 am

The "Save as" option has always worked for me whenever I've gotten this error.

I think it has to do with the way Windows handles compression as the mod file is really just a Zip file in disguise. I tend to get this error a lot whenever I replace a whole bunch of graphics files with updated ones. When I do, I just click "Save as" and create a new file. It saves just fine that way.

I've had this error happen to me ever since I've used Vassal, btw. ...and I still do. Started with 3.0.1. Now using 3.0.13. Windows XP.
User avatar
DrNostromo
 
Posts: 1043
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Postby bsmith » December 22nd, 2007, 2:07 am

I agree that it is recoverable maybe at least 70% of the time. I did have a single occassion when I could not save my module though, not even using Save As under a different file in a different folder. Then when I exited Vassal there were no zip files to recover nor did the original module exist... I had nothing! :shock:
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Couldn't save module {0}

Postby tbyrne » December 22nd, 2007, 5:50 am

Every time I've encountered that error I've found another java process
that had the file opened in some way. Like a previous edit that didn't
exit completly. I just forcefully close the other process and I'm able
to save no problem.

On Dec 21, 2007, at 8:07 PM, "bsmith"
<messages@forums.vassalengine.org> wrote:

I agree that it is recoverable maybe at least 70% of the time. I
did have a single occassion when I could not save my module though,
not even using Save As under a different file in a different
folder. Then when I exited Vassal there were no zip files to
recover nor did the original module exist... I had nothing!
[Shocked]







_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Couldn't save module {0}

Postby bsmith » December 22nd, 2007, 6:08 am

Yeah I did try that Tim; I knew I had spent over 60 minutes doing edits to the module, I really didn't want to lose it! In fact I ended up killing every process that would let me kill it. In the end though, still the same error continued to pop up.

It was strange that when all of this was happening, the original module file and temp zip files were not there. I was hoping it was still held in memory or something.

Every time I've encountered that error I've found another java process
that had the file opened in some way. Like a previous edit that didn't
exit completly. I just forcefully close the other process and I'm able
to save no problem.


_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Next

Return to Technical Support & Bugs

Who is online

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