TrinityCore/WowPacketParser

UpdateHandler Line 72 Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll

DavuKnight opened this issue · 10 comments

WowPacketParserModule.V1_13_2_31446.Parsers.UpdateHandler Line 72=>90=>153 Throws an exception which prevents any CreateObject1 or CreateObject2 version of the SMSG_Update_Object to not be output.

I inserted a _=packet.ReadInt32(); at line 148 which seems to have fixed it in some cases.

This is reading a parse from the latest release of WOTLK Retail version 3.4

Can't reproduce

Hmm Checked on 4 different sniffs with a new pull of the repo. I get an endless supply of
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll
Exception thrown: 'System.ArgumentOutOfRangeException' in System.Private.CoreLib.dll
Exception thrown: 'System.IO.EndOfStreamException' in System.Private.CoreLib.dll

mdX7 commented

Post the entire packet with full error message, also buildnr of sniff

Not sure how Im going to get the packet. Short of Dumping the stream before its read. But Ill tack a look

ClientToServer: CMSG_QUERY_CREATURE (0x326C) Length: 4 ConnIdx: 1 Time: 09/05/2022 21:15:38.640 Number: 3456
Entry: 18138 (18138)
System.IO.EndOfStreamException
Unable to read beyond the end of the stream.
at System.IO.BinaryReader.InternalRead(Int32 numBytes)
at System.IO.BinaryReader.ReadUInt64()
at WowPacketParser.Misc.Packet.ReadGuid() in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Misc\PacketReads.cs:line 16
at WowPacketParser.Misc.Packet.ReadGuid(String name, Object[] indexes) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Misc\PacketReads.cs:line 403
at WowPacketParser.Parsing.Parsers.QueryHandler.HandleCreatureQuery(Packet packet) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Parsers\QueryHandler.cs:line 92
at WowPacketParser.Parsing.Handler.Parse(Packet packet, Boolean isMultiple) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Handler.cs:line 149

ServerToClient: SMSG_UPDATE_OBJECT (0x27CB) Length: 85 ConnIdx: 1 Time: 09/05/2022 21:15:38.723 Number: 3462
Map: 2
Count: 34734080
[0] UpdateType: Values
[0] GUID: 0x0
System.IO.EndOfStreamException
Unable to read beyond the end of the stream.
at System.IO.BinaryReader.InternalRead(Int32 numBytes)
at System.IO.BinaryReader.ReadInt32()
at WowPacketParser.Parsing.Parsers.UpdateHandler.ReadDynamicValuesUpdateBlock(Packet packet, ObjectType type, Object index, Boolean isCreating, Dictionary`2 oldValues) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Parsers\UpdateHandler.cs:line 663
at WowPacketParser.Parsing.Parsers.UpdateHandler.ReadValuesUpdateBlock(Packet packet, UpdateValuesLegacy updateValues, WowGuid guid, Int32 index) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Parsers\UpdateHandler.cs:line 183
at WowPacketParser.Parsing.Parsers.UpdateHandler.HandleUpdateObject(Packet packet) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Parsers\UpdateHandler.cs:line 43
at WowPacketParser.Parsing.Handler.Parse(Packet packet, Boolean isMultiple) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Handler.cs:line 149

ServerToClient: SMSG_UPDATE_OBJECT (0x27CB) Length: 43 ConnIdx: 1 Time: 09/05/2022 21:15:39.742 Number: 3483
Map: 1
Count: 34734080
[0] UpdateType: Values
[0] GUID: 0x0
[1] UpdateType: Values
[1] GUID: Full: 0xB73241E0 Type: Player Low: 3073524192
[1] Block Value 5: 2147483648/-0
[1] Block Value 7: 134217728/3.85186E-34
[1] Block Value 11: 0/0
[1] Block Value 14: 134217728/3.85186E-34
[1] Block Value 19: 4204362504/-3.984584E+35
System.IO.EndOfStreamException
Unable to read beyond the end of the stream.
at System.IO.BinaryReader.InternalRead(Int32 numBytes)
at System.IO.BinaryReader.ReadUInt32()
at WowPacketParser.Misc.Packet.ReadUpdateField() in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Misc\PacketReads.cs:line 248
at WowPacketParser.Parsing.Parsers.UpdateHandler.ReadValuesUpdateBlock(Packet packet, UpdateValuesLegacy updateValues, ObjectType type, Object index, Boolean isCreating, Dictionary`2 oldValues) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Parsers\UpdateHandler.cs:line 243
at WowPacketParser.Parsing.Parsers.UpdateHandler.ReadValuesUpdateBlock(Packet packet, UpdateValuesLegacy updateValues, WowGuid guid, Int32 index) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Parsers\UpdateHandler.cs:line 182
at WowPacketParser.Parsing.Parsers.UpdateHandler.HandleUpdateObject(Packet packet) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Parsers\UpdateHandler.cs:line 43
at WowPacketParser.Parsing.Handler.Parse(Packet packet, Boolean isMultiple) in C:\Repo\GitHub\DavuKnight\WowPacketParser\WowPacketParser\Parsing\Handler.cs:line 149

Figured 3 was enough. Got more if you want em. But the packet doesnt get output.

# TrinityCore - WowPacketParser
# File name: dump_3.4.0.45435_2022-09-05_21-11-43.pkt
# Detected build: V3_4_0_45435
# Detected locale: enUS
# Targeted database: WrathOfTheLichKing
# Parsing date: 09/07/2022 19:59:35

Can you set targeted DB to SL?