Updating "Imported Classes" (IllegalArgumentExcept

Hi,

I’ve written two classes for a game I’m working on. I imported the classes in the module and tested them… they seemed to be working correct… so I continued working on the module itself …

But now I found some things I have to change in these classes. I fixed them, copied the new class files into the .zip file and tested again…
The changes took effect and everything seemd to work BUT I’m unable to save my module since these changes (save as won’t work too).

I’m getting an IllegalArgumentException [1] which is presumably caused by my classes (but I only changed some messages they displayed in the chat while running). Have I done something wrong or are classes not supposed to be changed once they are imported into the module?

thanks,
lesse

[1]:
– OS Windows XP
– Java version 1.6.0_06
– VASSAL version 3.0.17
– DT Version 0.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:237)
at VASSAL.tools.ArchiveWriter.saveAs(ArchiveWriter.java:202)
at VASSAL.build.GameModule.save(GameModule.java:750)
at VASSAL.build.GameModule.saveAs(GameModule.java:732)
at VASSAL.configure.ModuleEditWindow.saveAs(ModuleEditWindow.java:171)
at VASSAL.configure.ModuleEditWindow$3.actionPerformed(ModuleEditWindow.java:91)
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.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.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:237)
at VASSAL.tools.ArchiveWriter.saveAs(ArchiveWriter.java:202)
at VASSAL.build.GameModule.save(GameModule.java:750)
at VASSAL.build.GameModule.saveAs(GameModule.java:732)
at VASSAL.configure.ModuleEditWindow.saveAs(ModuleEditWindow.java:171)
at VASSAL.configure.ModuleEditWindow$3.actionPerformed(ModuleEditWindow.java:91)
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.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)

Thus spake “lesse”:

This appears not to have anything to do with your particular custom
classes. What are the class files called you’re trying to add? Did
you still have the module open in VASSAL when you added the new class
files?


J.


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

Post generated using Mail2Forum (mail2forum.com)

Hi,

I I’ve closed all Modules (no instances of vassal running). I also tried to remove the custom classes in vassal, save (which works as long as i haven’t touched my custom classes), quit and copy the new class files into the module (the old ones are still there even if i removed them in the module Editor, but I suppose thats ok, cause its the same with old images…).

When I then open the module in the vassal module editor I’m not able to save again…

The two classes are called progress.ProgressBarButton (some image tokens in the toolbar symbolizing the state of the game + buttons to change the players) and CountdownComponent.Countdown (a ProgressBar counting down an editable amount of seconds → symbolizing a specified round time).

Thus spake “lesse”:

Have you tried this with 3.1.0-beta3? Please check if it happens there.
If it does, then send me the offending module so I can look at it.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Hi,

i downloaded “VASSAL-3.1.0-svn4067-windows.exe” (is this the version you spoke of? fount the link in one of your posts in the dev forum) used it to edit the module and found the problem.

You were right it wasn’t caused by my modules. In my last update on the module I included an image which had an umlaut in its name (I know… stupid mistake :slight_smile:) which caused all the trouble. The strange thing is that it only caused the trouble when i unpacked the module and reassembled it… including my updated classes.

Thanks for your help!
Best regards
lesse

One further question:

Is the above mentioned version “VASSAL-3.1.0-svn4067-windows.exe” the actual version or is this a not actual development version?

Because it causes lots of exceptions to be thrown when I try to play my module … even when I try to drag pieces between different windows (in the 3.0 release all is working like it’s intended to).

Thus spake “lesse”:

3.1.0-svn4067 is a development build from yesterday. It’s not the same as
3.1.0-beta3, which has its release announcement here:

vassalengine.org/forums/viewtopic.php?t=972

May I see the stack traces you’re getting?


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “lesse”:

I suspected that something had a strange name. I’m a bit surprised that
this doesn’t work, though. I’ll look into why exactly that fails sometime.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Hi,
I already found the problem (my fault again):

In version 3.0 I had problems when I sent multiple cards to a specified deck. If i sent multiple cards to a deck (via gkc, deck is always face down and always randomized) one of them probably wasn’t recognized as “in the deck” although it was at the position where it should be (I was able to right click and access the cards options → by that I was able to identify the card). In version 3.0 I found a “fix” for this problem by setting the “Maximum cards to display” of the deck to 0. It didn’t cause a problem and the behavior I described above was gone.

In the new version it caused an exception 1 every time I tried to drag a card from the deck to another window (flipping the cards worked fine, it displayed the right piece → dragging was the problem). By increasing the value to 1 the exception wasn’t thrown anymore.

Thanks,
Lesse

– OS Windows XP
– Java version 1.6.0_06
– VASSAL version 3.1.0-svn4067
– Manager
C:\Programme\Java\jre1.6.0_06\bin\java -Xms256M -Xmx512M -cp lib\Vengine.jar;Vengine.jar VASSAL.launch.Editor
[191597348]
– OS Windows XP
– Java version 1.6.0_06
– VASSAL version 3.1.0-svn4067
– Editor
– DT (test) Version 0.1
[191597348]
java.lang.IllegalArgumentException: VASSAL.counters.Obscurable@189acb5[name=Yeti,type=obs;70,130;Back.gif;Umdrehen;GBack.gif;?;sides:Blau globalkey;Objekt benutzen;76,195;68,130;LocationName = $LocationName$ && BasicName != $BasicName$;false;1;false;true;;Objekt benutzen;3\ hideCmd;;Hide;verletzt = true;86,715\ hideCmd;;Hide;verletzt = false;87,715\\ macro;TriggerGeheilt;;;;86,195;70,130\\ globalkey;Status: Normal;87,715;86,195;color = blue && BasicName = $BasicName$;false;1;false;true;;Status: Normal;1\\\ macro;TriggerVerletzt;;;;86,130;70,130\\\ globalkey;Status: Verletzt;86,715;86,130;color = blue && BasicName = $BasicName$;false;1;false;true;;Status: Verletzt;1\\\\ hideCmd;;Hide;Layers = PersonenSecond;153,65\\\\ hideCmd;;Hide;Layers = PersonenFirst;153,130\\\\\ PROP;Layers;false,0,100,false;In den Hintergrund:153,130:P,PersonenFirst,In den Vordergrund:153,65:P,PersonenSecond\\\\\ hideCmd;Verhindere Angriff;Disable;$BasicName$ = Phantom || $BasicName$ = Steinelementar || verletzt = true;521,130\\\\\\ report;45,130;$newPieceName$ taetigt von $location$ aus einen Angriff (1 AP).;;;\\\\\\ globalkey;Angriff;521,130;45,130;color = blue && BasicName = $BasicName$;false;1;false;true;;Angriff;1\\\\\\\ mark;color\\\\\\\ footprint;;Movement Trail;false;true;15;153,204,255;153,204,255;100;30;20;30;8.0\\\\\\\\ return;Entfernen (Stirbt);82,130;Blauer Objektfriedhof;Select destination\\\\\\\\ PROP;verletzt;false,0,100,false;:86,130:P,true,:86,195:P,false\\\\\\\\\ piece;;;B_Yeti.gif;Yeti,state=null \ \ \\ \\ \\\ \\\ \\\\ \\\\ \\\\\ PersonenSecond\\\\\ \\\\\\ -1\\\\\\ \\\\\\\ blue\\\\\\\ false;Map1;1;6,803\\\\\\\\ \\\\\\\\ false\\\\\\\\\ null;6;803;91] is not contained in VASSAL.counters.Deck@1a9bea3[Yeti, Werwolf, Tiermeister, Mammuth, Eishexe, Eiselementar, Eisdrache, Blitzelementar]
at VASSAL.build.module.map.StackMetrics.relativePosition(StackMetrics.java:485)
at VASSAL.build.module.map.PieceMover$DragHandler.dragGestureRecognized(PieceMover.java:1142)
at VASSAL.build.module.Map$3.dragGestureRecognized(Map.java:632)
at java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(Unknown Source)
at sun.awt.windows.WMouseDragGestureRecognizer.mouseDragged(Unknown Source)
at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source)
at java.awt.Component.processMouseMotionEvent(Unknown Source)
at javax.swing.JComponent.processMouseMotionEvent(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)
[191597348]
java.lang.NullPointerException
at VASSAL.build.module.map.SetupStack$StackConfigurer$3.actionPerformed(SetupStack.java:639)
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.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)
[191597348]

Best bet is probably to exit VASSAL and re-zip the classes into the module file. I’ve sometimes seen problems when the .class files are compressed, you might try turning compression off when you add them.

rk

Post generated using Mail2Forum (mail2forum.com)