#3807 String "title" longer than 255 chars

closed-accepted
None
5
2008-06-06
2008-05-31
No

Players will not be stored to database during a client crash! (found out by Hendrik)

Discussion

  • Hendrik Brummermann

    Logged In: YES
    user_id=990499
    Originator: NO

    2008-05-31 22:20:17 WARN [verManager] Definition ( 203) - Exception caused by name=title type=STRING code?18 value=|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    java.io.IOException: Array too large for write255LongArray.
    at marauroa.common.net.OutputSerializer.write255LongArray(OutputSerializer.java:85)
    at marauroa.common.net.OutputSerializer.write255LongString(OutputSerializer.java:190)
    at marauroa.common.game.Definition.serialize(Definition.java:452)
    at marauroa.common.game.Attributes.writeObject(Attributes.java:485)
    at marauroa.common.game.RPObject.writeObject(RPObject.java:711)
    at marauroa.common.game.RPSlot.writeObject(RPSlot.java:451)
    at marauroa.common.game.RPObject.writeObject(RPObject.java:744)
    at marauroa.server.game.db.JDBCDatabase.storeRPObject(JDBCDatabase.java:1187)
    at marauroa.server.game.db.JDBCDatabase.storeCharacter(JDBCDatabase.java:667)
    at games.stendhal.server.core.engine.StendhalPlayerDatabase.storeCharacter(StendhalPlayerDatabase.java:138)
    at marauroa.server.game.container.PlayerEntry.storeRPObject(PlayerEntry.java:320)
    at marauroa.server.game.GameServerManager.processLogoutEvent(GameServerManager.java:685)
    at marauroa.server.game.GameServerManager.run(GameServerManager.java:432)
    2008-05-31 22:20:17 WARN [verManager] JDBCDatabase ( 203) - Error while serializing rpobject: Player [guido, 98712326]
    java.io.IOException: Array too large for write255LongArray.
    at marauroa.common.net.OutputSerializer.write255LongArray(OutputSerializer.java:85)
    at marauroa.common.net.OutputSerializer.write255LongString(OutputSerializer.java:190)
    at marauroa.common.game.Definition.serialize(Definition.java:452)
    at marauroa.common.game.Attributes.writeObject(Attributes.java:485)
    at marauroa.common.game.RPObject.writeObject(RPObject.java:711)
    at marauroa.common.game.RPSlot.writeObject(RPSlot.java:451)
    at marauroa.common.game.RPObject.writeObject(RPObject.java:744)
    at marauroa.server.game.db.JDBCDatabase.storeRPObject(JDBCDatabase.java:1187)
    at marauroa.server.game.db.JDBCDatabase.storeCharacter(JDBCDatabase.java:667)
    at games.stendhal.server.core.engine.StendhalPlayerDatabase.storeCharacter(StendhalPlayerDatabase.java:138)
    at marauroa.server.game.container.PlayerEntry.storeRPObject(PlayerEntry.java:320)
    at marauroa.server.game.GameServerManager.processLogoutEvent(GameServerManager.java:685)
    at marauroa.server.game.GameServerManager.run(GameServerManager.java:432)
    2008-05-31 22:20:17 WARN [verManager] JDBCDatabase ( 203) - Error storing character: Player [guido, 98712326]
    java.io.IOException: Array too large for write255LongArray.

     
  • Hendrik Brummermann

    • summary: Client crash database --> String "title" longer than 255 chars
     
  • Astrid Sawatzky

    Astrid Sawatzky - 2008-06-06
    • assigned_to: nobody --> arianne_rpg
    • status: open --> pending
     
  • Astrid Sawatzky

    Astrid Sawatzky - 2008-06-06

    Logged In: YES
    user_id=964999
    Originator: NO

    please check if there is measure to be taken on marauroa side.

    the stendhal side has been hopefully fixed, by reducing the maximum length of naming a pet to 20.
    regards astrid

     
  • Miguel Angel Blanch Lardin

    Logged In: YES
    user_id=3949
    Originator: NO

    No, it is a feature.
    In fact the game should check it.

    One option could be that for every attribute we check against defined type to see if it is correct but I think it will be too CPU time consuming.
    In general I think it is a good ( great ) idea to check everything players write and limit sizes of it specially if it is to be stored at database. ( names, descriptions, chat texts, etc... )

    Anyway guido deserves whatever happened to his/her player. :)

     
  • Miguel Angel Blanch Lardin

    • status: pending --> closed-accepted
     


Anonymous

Cancel  Add attachments





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

Sign up for the SourceForge newsletter:





No, thanks