eishub / eis

The Environment Interface Standard (EIS) is a Java-based interface standard for connecting agents to controllable entities in an environment such as a game. The interface provides support for managing the connection (e.g., for pausing and terminating an environment) and for interaction between agents and entities that are available in an environment (e.g., bots in a game). An agent that is connected to a controllable entity receives percepts from and can send actions to that entity. Percepts inform the agent about the state of the entity and its environment. Actions tell the entity which actions to perform in its environment. Several example implementations of environments are available @github.com/eishub. A default implementation of the EIS interface is also provided.
GNU General Public License v3.0
9 stars 4 forks source link

EILoader still on version "0.3" #38

Closed Wouter1 closed 10 years ago

Wouter1 commented 10 years ago

In EILoader (version 38fd5cef28ebf940cf70c3910c3a1d26cd3aacdd)

I see this

private static String version = "0.3";

I do not understand this as the current version of eis is 0.4.1. I suppose this should be "0.4" (assuming that this check does not check the patch version)

Wouter1 commented 10 years ago

This is more serious than I thought.

The AbstractEnvironment returns "0.4" and the EILoader checks that it is "0.3"

This means that all environments that do not overwrite requiredVersion() and rely on AbstractEnvironment now do not load anymore

Wouter1 commented 10 years ago

One environment that is hit directly by this bug is blocksworld. If you try to run it you get the expected EIS exception

WARNING: WARNING: launch of MAS failed
goal.tools.errorhandling.exceptions.GOALLaunchFailureException: EIS failed to start environment
    at goal.core.runtime.RuntimeManager.<init>(RuntimeManager.java:421)
    at goal.tools.LaunchManager.launchMAS(LaunchManager.java:107)
    at nl.tudelft.goal.SimpleIDE.actions.RunAction.run(RunAction.java:195)
    at nl.tudelft.goal.SimpleIDE.actions.RunAction.execute(RunAction.java:114)
    at nl.tudelft.goal.SimpleIDE.actions.RunOrPauseAction.execute(RunOrPauseAction.java:86)
    at nl.tudelft.goal.SimpleIDE.actions.GOALAction.executeAll(GOALAction.java:207)
    at nl.tudelft.goal.SimpleIDE.actions.GOALAction.actionPerformed(GOALAction.java:163)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6516)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
    at java.awt.Component.processEvent(Component.java:6281)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4872)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: goal.tools.errorhandling.exceptions.GOALLaunchFailureException: Failed to load the environment
    at goal.core.runtime.service.environment.EnvironmentService.launchLocalMessaginEnvironment(EnvironmentService.java:284)
    at goal.core.runtime.service.environment.EnvironmentService.start(EnvironmentService.java:212)
    at goal.core.runtime.RuntimeManager.<init>(RuntimeManager.java:417)
    ... 43 more
Caused by: java.io.IOException: Loaded environment interface version does not match the required one "0.3" vs. "0.4"
    at eis.EILoader.fromJarFile(EILoader.java:90)
    at goal.core.runtime.service.environment.EnvironmentService.launchLocalMessaginEnvironment(EnvironmentService.java:276)
    ... 45 more
 because eis failed to start environment: failed to load the environment: loaded environment interface version does not match the required one "0.3" vs. "0.4".
Wouter1 commented 10 years ago

It seems that this bug whas there already longer (at least 3 months) but the version on the eis-maven-repo is probably different from the sources.

Wouter1 commented 10 years ago

Since AbstractEnvironment defines requiredVersion as final, environments can not override requiredVersion to work around this.

Wouter1 commented 10 years ago

Koen asked to keep the version on 0.4, and not move to 0.4.1 for this fix

Wouter1 commented 10 years ago

We decided to keep "0.4" as the required string. All environments will need to be fixed to match the expected string.

Wouter1 commented 10 years ago

Earlier I already bumped the version for EIS to 0.4.1 What do we do? For now I keep it at 0.4.1

Wouter1 commented 10 years ago

But when I build the package I still get the 0.4.

Ok so then probabaly we can keep using 0.4

Wouter1 commented 10 years ago

I ran mvn install -DcreateChecksum=true

and then manually copy the files to the repo. Is that how it should be done?

Wouter1 commented 10 years ago

I get this when I try to push to server

https://github.com/eishub/mvn-repo: git-receive-pack not permitted

Wouter1 commented 10 years ago

Koen do I have write permission there? As it is now I can not upload the fix to the repo

Wouter1 commented 10 years ago

the code change is pushed to master. The push to the repo still pending.

Wouter1 commented 10 years ago

Manual upload of the jar seems to work. Seeing this when I compile bw4t3

Downloaded: https://raw.github.com/eishub/mvn-repo/master/eishub/eis/0.4/eis-0.4.jar (76 KB at 64.8 KB/sec)