I work with the battlelore-mod v.1.2 and just import one new file. I zip and rename to .mod and choose “edit modul”. After that I try to save and get following error-message:
[code]05 Aug 2009 11:29:34.706 0 – Starting
05 Aug 2009 11:29:34.707 0 – OS Windows Vista
05 Aug 2009 11:29:34.707 0 – Java version 1.6.0_13
05 Aug 2009 11:29:34.707 0 – VASSAL version 3.1.9
05 Aug 2009 11:29:34.788 0 – Manager
05 Aug 2009 11:30:04.497 0 – Loading module file C:\Users\werner\VASSAL\Tests\BattleLorev1.2\BattleLorev1.2.mod
05 Aug 2009 11:30:04.501 0 – Loading module BattleLore
05 Aug 2009 11:30:04.504 0 C:\Program Files\Java\jre6\bin\java -Xms256M -Xmx512M -DVASSAL.id=1 -cp lib\Vengine.jar;Vengine.jar VASSAL.launch.Editor
05 Aug 2009 11:30:07.083 1 – BattleLore Version 1.2
05 Aug 2009 11:30:07.083 1
05 Aug 2009 11:30:17.673 1 java.lang.IllegalArgumentException
at java.util.zip.ZipInputStream.getUTF8String(Unknown Source)
at java.util.zip.ZipInputStream.readLOC(Unknown Source)
at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:316)
at VASSAL.build.GameModule.save(GameModule.java:942)
at VASSAL.build.GameModule.save(GameModule.java:918)
at VASSAL.launch.ModuleEditorWindow$2.run(ModuleEditorWindow.java:100)
at VASSAL.launch.EditorWindow.saver(EditorWindow.java:292)
at VASSAL.launch.ModuleEditorWindow.save(ModuleEditorWindow.java:98)
at VASSAL.launch.EditorWindow$2.actionPerformed(EditorWindow.java:183)
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.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)
[/code]
Can anybody help me?
Thanx and regards from germany
How fid you import the new file? Did you load it in using the VASSAL module Editor, or did you copy it in using Windows or 3rd Party Zip utility? By your comments re zipping, it sounds like you did not use VASSAL.
If a file name contains unicode characters, then you MUST load it into your module using VASSAL, otherwise you will see the error you noted. The Java Zip library does not support raw unicode file names.
I have passed a fix to Joel that captures this exception and displays a meaningful error message.
first: thanx for the fast answer and
second: sorry for my bad english
So let me explain, what I’ve done.
I download the BattleLorev1.2.mod. After that I unpack this mod-File with Winrar. I get a new folder with many files and add a new folder with new images. Then I pack the whole folder with Winrar, rename the zip (or rar)-file to xxx.mod and open Vassal.
I choose “edit modul”— it opened. I choose “save” and get the error.
What’s happened?
I tried it again:
I unpack the running mod-File with Winrar and repack the same folder with Winrar without any changes. I rename the rar-file to mod-file and get following error:
Brent’s point is that Winrar is changing something. In particular, it’s
encoding filenames in a way that makes them unreadable by Java’s ZIP
implementation. Don’t use Winrar.
Now we are looking at problem number 2. Get a fresh copy of the module and open it up with Winrar and see what files are at the top level. Now open up your freshly created copy. Do you see the same files? Or do you see an extra folder?
If they look the same, please email me the offending module at b.easton at exemail.com.au. If you can reproduce your original problem with the uncaught exception, I would like to see a copy of the module at that point also.
I did it. Fresh copy - unzip - zip - unzip and exactly. The unzipped-Folder-#2 is not exactly the same like #1. There is a new subfolder, which included all files.
I zipped the new subfolder to .mod, but the error persists.
I send you the fresh mod-copy and my zipped mod-copy.
As you can see, you are not creating the zip file correctly. The buildfile file and images folder must be at the top level inside the zip file, not within another folder as you have. I do not use winrar, so cannnot give you advice on the procedure to prevent this extra level from occuring. Try selecting and zipping all of the files inside the Battlelore folder, rather than the Battlelore folder itself.
Or, try using the inbuilt Windows Zip utility. Just select all of the files inside the Battlelore folder, right click, select ‘Send To’, then 'Compressed (Zipped) folder.
Yes, that is exactly the problem. You may not use this method to copy image files into the Zip file if any of the filenames are not straight ASCII characters. So anything with an Umlaute, or any sort of accent, or any non-English letters will not work using the Zip method.
You may use filenames with these characters in them, but you MUST add them into your module using the VASSAL module Editor. VASSAL will rename them for you to a compatible name that can be saved correctly.