exectails / MabiPale2

Packet logger for Mabinogi
Other
38 stars 24 forks source link

Error when reading packet #6

Closed ghost closed 7 years ago

ghost commented 8 years ago
************** Exception Text **************
System.ArgumentOutOfRangeException: Index and count must refer to a location within the buffer.
Parameter name: bytes
   at System.Text.UTF8Encoding.GetString(Byte[] bytes, Int32 index, Int32 count)
   at MabiPale2.Shared.Packet.GetString()
   at MabiPale2.Shared.Packet.ToString()
   at MabiPale2.Shared.PalePacket.ToString()
   at MabiPale2.FrmMain.LstPackets_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ListView.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
   at System.Windows.Forms.ListView.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Packet:

Send@06:22:35.442 0000AA4100100000000020B6070200030000005E01000621EC12
exectails commented 8 years ago

That packet is perfectly valid, and can be read using the Packet Parser. It also doesn't include a string, which is why I don't see how it would cause the exception.

ghost commented 8 years ago

EDIT: I'm sorry I think I actually gave you the wrong packet! I read the file backwards. Main posted updated as well.

Send@06:22:35.442 0000AA4100100000000020B6070200030000005E01000621EC12
exectails commented 7 years ago

The reason this failed was that the packet was simply invalid. I don't know how that happened, but Pale's behavior was correct. The problem would probably lie with Morrighan if anything, but since this never came up again, I'll assume it was either a one-time glitch or the issue was fixed.