Edited module corrupted upon saved to new name

I have a mature module which I have in use for several games in progress. I am unable to edit any further as ‘save as’ routine converts a 6.8MB module to one which is a mere 254kb consisting only of the build file 211kb, module data 1kb and image folder stripped of all custom image [assumed only the piece layouts remain]. This issue occurs consistently on all three of my computers. This only has been reproduced on this module [I manage 20+ modules]. Is it possible for a module to become corrupted preventing further edits? The 1.33b13 version continues to run fine.

Module is downloadable from my site. [As a SPI/Decision Games title, not posted on vassal site.]

wargameacademy.org/SPI/WBSv133b13-edit.vmod-

• home Macbook 2.2 GHz; 8 GB ram; Vassal 3.1.14; latest mac OSX
• home Dell ; XP Professional Service Pack 3; 8GB of ram; Vassal 3.1.14
• work HP; XP Professional Service Pack 3; 8GB of ram; vassal 3.1.14

Bill Thomson; bill@wargameacademy.org; 817-501-2978

I just verified this and it looks like a serious problem. I just spent the
last hour trying to figure this out, but I am completely unable to track
this down!

Joel, this looks serious and it might be easier for you to figure this out.
Can you take a quick look?

  • M.

On 11 January 2011 12:59, wga bill@wargameacademy.org wrote:

I have a mature module which I have in use for several games in
progress. I am unable to edit any further as ‘save as’ routine
converts a 6.8MB module to one which is a mere 254kb consisting only of
the build file 211kb, module data 1kb and image folder stripped of all
custom image [assumed only the piece layouts remain]. This issue occurs
consistently on all three of my computers. This only has been
reproduced on this module [I manage 20+ modules]. Is it possible for a
module to become corrupted preventing further edits? The 1.33b13
version continues to run fine. -
Module is downloadable from my site. [As a SPI/Decision Games title,
not posted on vassal site.]

wargameacademy.org/SPI/WBSv133b13-edit.vmod-[1]http://www.wargameacademy.org/SPI/WBSv133b13-edit.vmod-[1]

• home Macbook 2.2 GHz; 8 GB ram; Vassal 3.1.14; latest mac OSX
• home Dell ; XP Professional Service Pack 3; 8GB of ram; Vassal
3.1.14
• work HP; XP Professional Service Pack 3; 8GB of ram; vassal 3.1.14

Bill Thomson; bill@wargameacademy.org[2]; 817-501-2978

[1] wargameacademy.org/SPI/WBSv133b13-edit.vmod-
[2] mailto:bill@wargameacademy.org

I downloaded the module, and when I opened it on Board A I get this error message:

  • Bad Data in Module: Image not found null
  • WBS version v133b13edit.vmod

Do we know what the missing/mis-named image is?

Also, can you supply the youngest preceding Buildfile, for a text comparison? The differences may yield a clue on where the unhandled exception is occurring, and/or the identity of the missing image.

The bad data image is that of one unused counter, images assigned to game piece is of a different counter but does not affect gameplay. I likely have version 1.33b10-edit on home computer I can upload. I believe I can edit that one and can likely with effort duplicate all the upgrades. Fortunately version 1.33b13-edit runs fine for games in progress, I just cannot edit it further. Will let you know when I have b10 uploaded to the same location. I was glad to figure out the problem is confined to just this version of this module.

Thank you to taking a look at this.
Bill

If we can fix the Buildfile, you will not have to duplicate the upgrades. I expect that by deleting the reference to the bad image from the Buildfile we can eliminate the unhandled exception (and identify where it is in the code), allowing you to continue. I just need the Buidlfile from the preceding build, not the entire module. If your changes were modest, I should be able to spot the problem fairly quickly with WinDiff

Actually if you know the counter with the bad image, I may be work from that to identify the problem.

Bad news - I manually eliminated all references to the non-existent image ‘ironclad’ from the Buildfile and the Save As problem persists. I will need a recent working Buildfile to go further, I think. (The error message on load disappears, confimring that all the bad references have been purged.)

Interesting - wiping the module contents in the editor should leave you an empty build file but the images will still be in the image folder and should save if the build file is the problem - nope. Instead we get some left over artifacts (despite the editor being totally empty) from the custom classes and a Game Piece Image section even though there isnt one in the tree

I think you misunderstood - I manually edited the Buidlfile to delete just the 3 or 4 references to the missing image ironclad.png. I left the rest of the Buildfile alone. Then I re-entered the module, confirming that the Missing Image error message no longer occurred, and again recreated the problem situation with Save As.

When I perform the Save As the module remains intact in memory, but the file on disk is truncated. There is no error message in the log (see below).

13 Jan 2011 20:15:38.673 0 – Starting
13 Jan 2011 20:15:38.674 0 – OS Windows Vista
13 Jan 2011 20:15:38.674 0 – Java version 1.6.0_23
13 Jan 2011 20:15:38.674 0 – VASSAL version 3.1.15
13 Jan 2011 20:15:38.711 0 – Manager
13 Jan 2011 20:15:39.788 0 – Loading module file C:\Users\Pieter\Desktop\WBSv133b13-edit -.vmod
13 Jan 2011 20:15:39.789 0 – Loading module WBS
13 Jan 2011 20:15:39.793 0 C:\Program Files\Java\jre6\bin\java -Xms256M -Xmx512M -DVASSAL.id=1 -Duser.home=C:\Users\Pieter -cp lib\Vengine.jar VASSAL.launch.Editor
13 Jan 2011 20:15:43.844 1 – WBS version v133b13edit.vmod
13 Jan 2011 20:15:43.844 1

13 Jan 2011 20:16:07.322 1 – Exiting
13 Jan 2011 20:16:27.753 0 – Exiting

It would seem that one of two things is happening:

  1. Quite early in the write processs, which is a recursive tree walk, a component fairly high up reports no children, causing a truncated file but no error condition raised.
  2. An error is generated but caught high up in the tree and killed.

I am hoping that a comparison between the current BuildFile and a recent working one will narrow the search on where the error exists.

Yeah I understood - I think you misunderstood me. If you wipe the buildfile (i.e edit the module and delete everything or manually edit the buildfile and do this) you have essentially an empty clean buildfile just like a brand new module but the problem still exists after doing this, so the problem is either in the remaining content here (below) or not anything to do with the buildfile and an actual bug in the write process somehow.

Here is my cleaned buildfile from the module

<?xml version="1.0" encoding="UTF-8"?>

<VASSAL.launch.BasicModule VassalVersion=“3.1.14” description=“SPI War Between The States” name=“WBS” nextPieceSlotId=“787” version=“v133b13edit.vmod”>
<VASSAL.build.module.BasicCommandEncoder/>
<VASSAL.build.module.Chatter/>
<VASSAL.build.module.Documentation/>
<VASSAL.build.module.GlobalOptions autoReport=“Always” centerOnMove=“Always” movedTrails=“true” nonOwnerUnmaskable=“Never” playerIdFormat="$playerName$" promptString=“Opponents can unmask my pieces”>
StepForward32.gif
undo32.gif
34,0
connect32.gif
83,520
</VASSAL.build.module.GlobalOptions>
<VASSAL.build.module.properties.GlobalProperties/>
<VASSAL.i18n.Language/>
<wga.WgaNotesWindow buttonText="" hotkey="" icon=“button_notes.gif”/>
<random.DiceButton hotkey="" icon=“1d6-twister.png” nDice=“1” nSides=“6” name=“1d6” plus=“0” prompt=“false” reportFormat="** $name$ = twister $result$ *** <$playerName$>" reportTotal=“false” text=""/>
<random.DiceButton hotkey="" icon=“1d10-twister.png” nDice=“1” nSides=“10” name=“1d10” plus=“0” prompt=“false” reportFormat="** $name$ = twister $result$ *** <$playerName$>" reportTotal=“false” text=""/>
<random.DiceButton hotkey="" icon=“2d6-twister.png” nDice=“2” nSides=“6” name=“2d6” plus=“0” prompt=“false” reportFormat="** $name$ = twister $result$ *** <$playerName$>" reportTotal=“false” text=""/>
<random.DiceButton hotkey="" icon=“2d10-twister.png” nDice=“2” nSides=“10” name=“2d10” plus=“0” prompt=“false” reportFormat="** $name$ =twister $result$ *** <$playerName$>" reportTotal=“false” text=""/>
<random.DiceButton hotkey="" icon="" nDice=“1” nSides=“34” name=“1d34” plus=“0” prompt=“false” reportFormat="** $name$ = $result$ *** <$playerName$>" reportTotal=“false” text=“1d34-csa”/>
<random.DiceButton hotkey="" icon="" nDice=“1” nSides=“41” name=“1d41” plus=“0” prompt=“false” reportFormat="** $name$ = $result$ *** <$playerName$>" reportTotal=“false” text=“1d41-usa”/>
<VASSAL.build.module.gamepieceimage.GamePieceImageDefinitions>
<VASSAL.build.module.gamepieceimage.ColorManager/>
<VASSAL.build.module.gamepieceimage.FontManager>
<VASSAL.build.module.gamepieceimage.FontStyle name=“Default” style=“Dialog,0,12,false”/>
</VASSAL.build.module.gamepieceimage.FontManager>
<VASSAL.build.module.gamepieceimage.GamePieceLayoutsContainer/>
</VASSAL.build.module.gamepieceimage.GamePieceImageDefinitions>
</VASSAL.launch.BasicModule>

I am unsure how you determine that the problem persists when you purge the module so severely. As I understand, it is a known issue that some items remain in the module when the last reference to them is deleted. How do we now the two issues are the same, or even related?

I uploaded the previous b12 version to the same site location. I have confirmed it can be renamed and saved. I keep a version history so have a listing of what may be different. I am guessing either I deleted what I thought was an unsaved image or perhaps I continued after receiving a bug error.

If the solution is not obvious, I suggest I just replicate the edits and move forward unless this is an interesting problem/challenge. I do my edits incrementally.

Thanks,
Bill Thomson

After inspecting your edits, which are quite minor, I returned to a test which I should have done earlier; I unzipped and rezipped your archive. That eliminates the problem for me. Please try and let me know if it resolves the problem for you also.