Closed RoiEXLab closed 6 years ago
This seems to fix it:
diff --git a/src/main/java/games/strategy/engine/framework/headlessGameServer/AvailableGames.java b/src/main/java/games/strategy/engine/framework/headlessGameServer/AvailableGames.java
index c15b3e74e..6951556fd 100644
--- a/src/main/java/games/strategy/engine/framework/headlessGameServer/AvailableGames.java
+++ b/src/main/java/games/strategy/engine/framework/headlessGameServer/AvailableGames.java
@@ -48,7 +48,7 @@ public class AvailableGames {
}
Set<String> getGameNames() {
- return Collections.unmodifiableSet(availableGames.keySet());
+ return new HashSet<>(availableGames.keySet());
}
Set<String> getAvailableMapFolderOrZipNames() {
AvailableGames#getGameNames()
is called by HeadlessGameServer#getAvailableGames()
, which is called by getAvailableGames()
in the anonymous implementation of IServerStartupRemote
stored in ServerModel#m_serverStartupRemote
. I'm pretty sure the return value of that method is then serialized during RMI.
Not sure if there's a better fix. You could move the defensive copy to the anonymous IServerStartupRemote
implementation, but there should probably be a comment noting why it is necessary.
Also, in general, callers assume they get a mutable copy of a collection returned by a method unless the Javadocs state otherwise. For those methods in AvailableGames
that return immutable collections, that should probably be noted in the Javadocs.
@ssoloff If you could implement those changes and help me test with the GA server I would appreciate it greatly! A few new maps using the new code cant be played unless the bots get the new engine. Thanks! Pras
@prastle I can make that change and merge it now, but I am going to be unavailable for 5-6 hours beginning in about 15 minutes.
Ok so make the change hopefully Roir or dan is back to test
ATM unfortunately a second problem has been found.
Only you three have sudo to the bots
triplea user cant update
@prastle I can apply the update to the bots, no worries
Ok so since it is the middle of the week please apply and relaunch Ga bots when you have time @RoiEXLab . Hopefully we can test them with the new tww or frosti map
Loads fine with trains ty @RoiEXLab @ssoloff
Bot 63 mia for some reason but I will try to relaunch it later. TY for all of your hard work! We will use this as the test bots. :)
When joining a bot in the latest version this Exception occurs on the bot side:
I currently don't have the time to dig into it, but this defenitely needs fixing