Well, perhaps not corrupted as such.
So, a little background. I've recently moved my Red5 powered game from a windows build of red5 to one running on Debian Squeeze. I have a game lobby which uses a shared object to maintain a list of the various available games.
A single game is stored as a HashMap[String, Object] against it's game_id in said SharedObject. A couple of the properties of the HashMap are ArrayLists, specifically players (an ArrayList[Integer] of connected player id's) and votes (another ArrayList[Integer] of players who have submitted a vote)
Whenever I make a change to either of these ArrayLists, something, somewhere goes wrong and I can no long write the HashMap to the SharedObject (setAttribute returns false)
Creating a new game (server side):
HashMap<String, Object> game = new HashMap<String, Object>();
game.put("id", PendingGameManager.GAME_IDX);
game.put("difficulty", difficulty);
game.put("type", type);
game.put("description", this.getDescription(type, difficulty));
game.put("players", new ArrayList<Integer>());
game.put("coords", coords);
game.put("created", Calendar.getInstance().getTimeInMillis());
game.put("votes", new ArrayList<Integer>());
boolean success = this.gamesSO.setAttribute(Integer.toString(PendingGameManager.GAME_IDX), game);
This executes without problem, and success returns true.
Later I retrieve the player array and make amendments:
HashMap<String, Object> game = (HashMap<String, Object>)this.gamesSO.getMapAttribute(Integer.toString(game_id));
ArrayList<Integer> players = (ArrayList<Integer>) game.get("players");
players.add(new Integer(Integer.parseInt((user_id))));
boolean success = this.gamesSO.setAttribute(Integer.toString(game_id), game);
here success always returns false. If a create a new HashMap for the game and copy across each property from the old one but omitting players and votes it is fine, but what ever try, I cannot get it to maintain an array. I've also tried this with List and Vector with the same results. This is my first contact with Java, I've been careful to only add class instances of Integer and not the primitive int but for all my efforts I have run out of ideas.
When on Windows it ran perfectly, my original implementation used ArrayList[String] instead of ArrayList[Integer]
Environment: Debian Squeeze 6.0.6 jre 1.7 Red5 1.0RC2
Any help or suggestions would be greatly appreciated!