Menu

#208 Does not extract .properties files into bot data dirs

1.7.1
closed
None
5
2012-09-15
2009-06-20
jerome
No

In older versions (1.6.1.4, for example) when a bot's jar is extracted to the .robotcache directory, all data files in the <botname>.data directory are extracted. This might include a properties file for the bot, often named <botname>.properties. 1.7.1.3 Beta extracts (on demand) some of the data files, but ignores the <botname>.properties located in the <botname>.data directory.</botname></botname></botname></botname>

For example, I have a package darkcanuck.Gaff_1.35c.jar, which contains:
darkcanuck/Gaff.properties (normal properties file used by Robocode)
darkcanuck/Gaff.data/battledata.ser
darkcanuck/Gaff.data/Gaff.properties (used by my bot)

1.7.1.3 Beta will extract only the following when a new battle is started with this robot:
.robotcache/darkcanuck.Gaff_1.35c.jar_/darkcanuck/Gaff.data/battledata.ser

However, it should also extract:
.robotcache/darkcanuck.Gaff_1.35c.jar_/darkcanuck/Gaff.data/Gaff.properties (my data)

Discussion

  • Flemming N. Larsen

    I have now fixed this bug, and the correction will be available in the coming version 1.7.1.3

     
  • Flemming N. Larsen

    This bug has been fixed in Robocode 1.7.1.3 (final). I should like you to verify that this issue has been properly fixed.

     
  • jerome

    jerome - 2009-07-10

    Not fixed in 1.7.1.3 -- Gaff.properties file is now present in the correct location but file contains no data.

    Additionally I noticed running another bot which uses its own properties file, abc.Shadow 3.66dTC generates the following output (it also has its Shadow.properties file in the correct location, but it too is empty):

    java.io.FileNotFoundException: /Users/jerome/robocode/robots/.robotcache/abc.Shadow_3.66dTC.jar_/abc/Shadow.data (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at net.sf.robocode.host.io.RobotFileSystemManager.updateDataFilesFromJar(RobotFileSystemManager.java:294)
    at net.sf.robocode.host.io.RobotFileSystemManager.updateDataFiles(RobotFileSystemManager.java:258)
    at net.sf.robocode.host.io.RobotFileSystemManager.initialize(RobotFileSystemManager.java:69)
    at net.sf.robocode.host.proxies.HostingRobotProxy.<init>(HostingRobotProxy.java:71)
    at net.sf.robocode.host.proxies.BasicRobotProxy.<init>(BasicRobotProxy.java:65)
    at net.sf.robocode.host.proxies.StandardRobotProxy.<init>(StandardRobotProxy.java:36)
    at net.sf.robocode.host.proxies.AdvancedRobotProxy.<init>(AdvancedRobotProxy.java:38)
    at net.sf.robocode.host.proxies.TeamRobotProxy.<init>(TeamRobotProxy.java:37)
    at net.sf.robocode.host.JavaHost.createRobotProxy(JavaHost.java:50)
    at net.sf.robocode.host.HostManager.createRobotProxy(HostManager.java:98)
    at net.sf.robocode.host.HostManager.createRobotProxy(HostManager.java:34)
    at net.sf.robocode.battle.peer.RobotPeer.<init>(RobotPeer.java:209)
    at net.sf.robocode.battle.Battle.createPeers(Battle.java:294)
    at net.sf.robocode.battle.Battle.setup(Battle.java:182)
    at net.sf.robocode.battle.BattleManager.startNewBattleImpl(BattleManager.java:179)
    at net.sf.robocode.battle.BattleManager.startNewBattle(BattleManager.java:130)
    at net.sf.robocode.ui.dialog.NewBattleDialog.finishButtonActionPerformed(NewBattleDialog.java:117)
    at net.sf.robocode.ui.dialog.WizardController.finishButtonActionPerformed(WizardController.java:68)
    at net.sf.robocode.ui.dialog.WizardController.access$1(WizardController.java:67)
    at net.sf.robocode.ui.dialog.WizardController$EventHandler.actionPerformed(WizardController.java:45)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6126)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5891)
    at java.awt.Container.processEvent(Container.java:2102)
    at java.awt.Component.dispatchEventImpl(Component.java:4497)
    at java.awt.Container.dispatchEventImpl(Container.java:2160)
    at java.awt.Component.dispatchEvent(Component.java:4327)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4366)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4030)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3960)
    at java.awt.Container.dispatchEventImpl(Container.java:2146)
    at java.awt.Window.dispatchEventImpl(Window.java:2440)
    at java.awt.Component.dispatchEvent(Component.java:4327)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:210)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:204)
    at java.awt.Dialog$1.run(Dialog.java:1045)
    at java.awt.Dialog$3.run(Dialog.java:1097)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1095)
    at java.awt.Component.show(Component.java:1422)
    at java.awt.Component.setVisible(Component.java:1375)
    at java.awt.Window.setVisible(Window.java:806)
    at java.awt.Dialog.setVisible(Dialog.java:985)
    at net.sf.robocode.ui.dialog.WindowUtil.packCenterShow(WindowUtil.java:143)
    at net.sf.robocode.ui.WindowManager.showNewBattleDialog(WindowManager.java:370)
    at net.sf.robocode.ui.dialog.MenuBar.battleOpenActionPerformed(MenuBar.java:241)
    at net.sf.robocode.ui.dialog.MenuBar.access$3(MenuBar.java:233)
    at net.sf.robocode.ui.dialog.MenuBar$EventHandler.actionPerformed(MenuBar.java:110)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1220)
    at apple.laf.CUIAquaMenuItem.doClick(CUIAquaMenuItem.java:119)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1261)
    at java.awt.Component.processMouseEvent(Component.java:6126)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5891)
    at java.awt.Container.processEvent(Container.java:2102)
    at java.awt.Component.dispatchEventImpl(Component.java:4497)
    at java.awt.Container.dispatchEventImpl(Container.java:2160)
    at java.awt.Component.dispatchEvent(Component.java:4327)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4366)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4030)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3960)
    at java.awt.Container.dispatchEventImpl(Container.java:2146)
    at java.awt.Window.dispatchEventImpl(Window.java:2440)
    at java.awt.Component.dispatchEvent(Component.java:4327)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:210)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:195)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:187)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)</init></init></init></init></init></init></init></init>

     
  • Flemming N. Larsen

    This bug has finally been solved. The last issue where the file sizes are 0 bytes has been fixed too, and tested with the listed robot archives.

     
  • Flemming N. Larsen

    Hi Jerome, I should like you to verify that this bug has been fixed with the release of Robocode 1.7.1.4 Beta. Thanks in advance. :-)

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

MongoDB Logo MongoDB