SpaceManiac / Spacecraft

Spacecraft is the SpaceManiac Minecraft Server, a C# server for Minecraft (http://minecraft.net) licensed under CC-BY-SA
3 stars 1 forks source link

Player Join - Argument Cannot be Null #4

Open AtkinsSJ opened 14 years ago

AtkinsSJ commented 14 years ago

OK, another crash found. :P Unhandled Exception: System.ArgumentNullException: Argument cannot be null. Parameter name: s at System.Text.Encoding.GetBytes (System.String s) [0x00000] at spacecraft.NetworkString.op_Implicit (System.String s) [0x00000] at spacecraft.Connection.HandlePlayerSpawn (spacecraft.Player Player, Boolean self) [0x00000] at spacecraft.Player.PlayerJoins (spacecraft.Player Player) [0x00000] at spacecraft.Server.Player_Spawn (spacecraft.Player sender) [0x00000] at spacecraft.Player.conn_PlayerSpawn () [0x00000] at spacecraft.Connection.HandlePlayerIdent (spacecraft.PlayerIDPacket IncomingPacket) [0x00000] at spacecraft.Connection.HandleIncomingPacket () [0x00000] at spacecraft.Connection.ReadThread () [0x00000]

SpaceManiac commented 14 years ago

I suspect this is something to do with players joining incompletely. I know of an issue I need to fix that may or may not be the cause of it - I'll see what I can do.

SpaceManiac commented 14 years ago

Alright, as of commit ee793cf the potential underlying issue has been fixed. But looking at your stack trace again, I don't think that's right.

I'll have to look over this later.

AtkinsSJ commented 14 years ago

I just had this crash with the latest build, so it's still an issue.

SpaceManiac commented 14 years ago

I made a slight change in b8eac4fd21d29dc8e9d359e7bd410090db878bdb so if this happens, it ought to kick the individual player rather than crash Spacecraft. I have no idea of the root cause of the issue, but apparently a null System.String is being assigned to a NetworkString, and it's panicking.