Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

Crash Error #1093

Closed popstarfreas closed 9 years ago

popstarfreas commented 9 years ago
TShock: ERROR: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Terraria.MessageBuffer.GetData(Int32 start, Int32 length)
   at Terraria.NetMessage.CheckBytes(Int32 bufferIndex)
   at Terraria.Netplay.ServerLoop(Object threadContext)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Server crashes and that's the error in the log. I also see that after the world saved due to crash, it says "A Goblin invasion has started" and immediately "A Goblin invasion was defeated". Then everyone loses connection.

tylerjwatson commented 9 years ago

Please provide eithe the crash report or a memory dump

popstarfreas commented 9 years ago

Ok I've been trying to make sure that no plugin errors are in the logs. And now there isn't, except TShock. What is the recommended way to obtain a memory dump when it crashes? I tried procdump but I'm not entirely sure how to use it correctly. The built-in one for the server fails to create one, and I've seen something about the fact that it is because of running out of memory from using a large world or something.

tylerjwatson commented 9 years ago

Update to bamboo. It has more protection against server crashes. That should be replaced with a warning that the server failed to process a packet, with a hex dump of the packet so I can reproduce it.