error in common.game.RPObject$ID.hashCode

Developers
2007-03-28
2013-06-06
  • Nobody/Anonymous

    Hi,

    I'm currently working on a thesis in the field of agent based simulation. using marauroa when I'm starting the server I get the following exception:

    0    [marauroad] INFO  marauroa.server.marauroad  - marauroa is up and running...
    16   [marauroad] INFO  marauroa.server.game.Statistics  - Total/Used memory: 5056/1770
    313  [RPServerManager] FATAL marauroa.server.game.RPServerManager  - Unhandled exception, server will shut down.
    java.lang.NullPointerException
        at marauroa.common.game.RPObject$ID.hashCode(RPObject.java:628)
        at java.util.HashMap.put(Unknown Source)
        at marauroa.server.game.MarauroaRPZone.add(MarauroaRPZone.java:85)
        at JLem.server.JLemZone.beginTurn(JLemZone.java:176)
        at JLem.server.JLemRPWorld.beginTurn(JLemRPWorld.java:51)
        at JLem.server.JLemRPRuleProcessor.beginTurn(JLemRPRuleProcessor.java:74)
        at marauroa.server.game.RPServerManager.run(RPServerManager.java:514)

    where does this error come from? I created a RPObject like this

                    RPObject Lemming = new RPObject(RPObject.INVALID_ID);
                    Lemming.put("type", consts.TYPE_LEMMING);
                    Lemming.put("x", this.EntryPoint.getInt("x"));
                    Lemming.put("y", this.EntryPoint.getInt("y"));
                    Lemming.put("zoneid", this.getName());
                    Lemmings.add(Lemming);
                    System.out.println(Lemming);

    and then added it to the Zone using

                    this.add(Lemming);

    Plz help.

     
    • Miguel Angel Blanch Lardin

      Hello,

      What Marauroa version are you using?

      Just a tip, instead of this.add(Lemming) do:

      assignRPObjectID(Lemming);
      add(Lemming);

      That should fix your problem.

       
    • Nobody/Anonymous

      thanks, this works :)
      now we only have to figure out why the server is always using 100% of the cpu :D

      by the way... when will the arianne and marauroa documentation be updated? *g*

       
    • Nobody/Anonymous

      We use Maraura 1.34 and found the error.

       


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks