Beta 4 Bugs

Well, I’ve been seeing this for a while, but I only realized what was happening last night, while I was doing a bunch of reloading and resaving of games.

Vassal is moving to support ‘vsav’ as its saved game file extension (and vmod and vlog). However, if I load a saved *.vsav game, and then re-save it, the save dialog suggests the file name use *.sav instead of *.vsav.

I’ve included a screenshot showing the save dialog, and in the background you can see the filename of the file I just loaded in the module.

Thus spake “Rindis”:

Thanks for spotting this. It’s fixed in svn4275.

nomic.net/~uckelman/tmp/vassal/


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I’m still seeing the Preferences write error mentioned a while back. I’ve checked, and there’s no reason why there would be a permissions hangup, and it’s only happening once in while.

I do note that the file shows a last modified date of a couple minutes before the error log date. And I think I know the cause: it’s another version of Vassal writing to the file and not releasing the file. Or, in this case, [b]VASL[/i] is writing to the file.

Error log and screenshot to follow:

– OS Windows 2000
– Java version 1.6.0_07
– VASSAL version 3.0.18
– VASL version 5.8.1
Extension 5ABNv51 v5.1 loaded
Extension 5VG v5.7 loaded
Xmx512M -cp lib\Vengine.jar;Vengine.jar VASSAL.launch.Player
[1744028335]
– OS Windows 2000
– Java version 1.6.0_07
– VASSAL version 3.1.0-beta4
– Player
[1744028335]
No Translation: Error.file_write_error
[1744028335]
No Translation: Error.file_write_error
[1744028335]
No Translation: Error.file_write_error_message
[1744028335]
java.io.IOException: Unable to overwrite C:\Documents and Settings\James\VASSAL\Preferences
Data stored in C:\Documents and Settings\James\VASSAL\temp12.zip
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:444)
at VASSAL.tools.ArchiveWriter.write(ArchiveWriter.java:259)
at VASSAL.preferences.PrefsEditor.write(PrefsEditor.java:241)
at VASSAL.preferences.Prefs.write(Prefs.java:187)
at VASSAL.preferences.Prefs.getGlobalPrefs(Prefs.java:218)
at VASSAL.i18n.Resources.(Resources.java:87)
at VASSAL.launch.PlayerWindow.(PlayerWindow.java:66)
at VASSAL.build.GameModule.(GameModule.java:136)
at VASSAL.launch.BasicModule.(BasicModule.java:74)
at VASSAL.launch.Player.createModule(Player.java:155)
at VASSAL.launch.Player.launch(Player.java:112)
at VASSAL.launch.Launcher$1.run(Launcher.java:131)
at java.awt.event.InvocationEvent.dispatch(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)
– AVL version 4.3.3

OK, another one exhibited in a very minimal module (http://lipn.fr/~dubacq/temporaire/test.vmod):

  • Put a dynamic property in a prototype
  • On a single piece in the palette, use this prototype
  • Put a layer depending on this DP
  • Save, quit, reload
  • open the palette
  • nullDataError: the DP is not expanded at all.

This can be fixed (but this is not the right way) by putting a global property with the same name or putting the DP in the piece (not in the prototype).

I have not been able to track why (I think this maybe because of the lazy expansion of prototypes, but I got a bit sick this week-end and to be off the keyboard).

Here is the errorLog:

[1002482726] -- OS Linux -- Java version 1.6.0_07 -- VASSAL version 3.1.0-svn4289 -- Manager /usr/lib/jvm/java-6-sun-1.6.0.07/jre/bin/java -Xms256M -Xmx512M -cp lib/Vengine.jar VASSAL.launch.Editor [1777570673] -- OS Linux -- Java version 1.6.0_07 -- VASSAL version 3.1.0-svn4289 -- Editor -- Unnamed module version 0.0 [1777570673] Not a number: null [1777570673] java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:415) at java.lang.Integer.parseInt(Integer.java:497) at VASSAL.counters.Embellishment.checkPropertyLevel(Embellishment.java:409) at VASSAL.counters.Embellishment.draw(Embellishment.java:380) at VASSAL.build.widget.PieceSlot.paint(PieceSlot.java:156) at VASSAL.build.widget.PieceSlot$Panel.paint(PieceSlot.java:94) at javax.swing.JComponent.paintChildren(JComponent.java:864) at javax.swing.JComponent.paint(JComponent.java:1036) at javax.swing.JComponent.paintChildren(JComponent.java:864) at javax.swing.JComponent.paint(JComponent.java:1036) at javax.swing.JComponent.paintChildren(JComponent.java:864) at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1026) at javax.swing.JComponent.paint(JComponent.java:1036) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1382) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1313) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:301) at javax.swing.RepaintManager.paint(RepaintManager.java:1128) at javax.swing.JComponent._paintImmediately(JComponent.java:5070) at javax.swing.JComponent.paintImmediately(JComponent.java:4880) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679) at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) [1777570673] Not a number: null [1777570673] java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:415) at java.lang.Integer.parseInt(Integer.java:497) at VASSAL.counters.Embellishment.checkPropertyLevel(Embellishment.java:409) at VASSAL.counters.Embellishment.draw(Embellishment.java:380) at VASSAL.build.widget.PieceSlot.paint(PieceSlot.java:156) at VASSAL.build.widget.PieceSlot$Panel.paint(PieceSlot.java:94) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1382) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1313) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:301) at javax.swing.RepaintManager.paint(RepaintManager.java:1128) at javax.swing.JComponent._paintImmediately(JComponent.java:5070) at javax.swing.JComponent.paintImmediately(JComponent.java:4880) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679) at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

I suspect that there is some dead code somewhere. As long as the piece is in the game palette, the prototype is not expanded (and thus, no DP). The basic Decorator method is used for getProperty, which, of course, returns nothing useful (only Inner, Outer, Keycommands are accessible).

There seems to be some complicated code which allows to amend the prototype with some variables (probably for a future effort to import parameterised prototypes) which require to edit the buildFile and add some definitions of a context when expanding the prototype (such as
prototype;Army;Country=Germany,Side=Axe and the prototype, when instantiated, would use “Country” and “Side” as basis). However, this code does not allow to give properties to the palette pieces.

The solution, as is, is to either put a default value for all layer levels in the global map, or to put the definitions of Dynamic properties (or a simple property with the same name) in the piece itself (not in the prototype).