TrinityCore / TrinityCore/WowPacketParser

System.ArgumentOutOfRangeException - SMSG_UPDATE_OBJECT

Open
#571 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
522
Forks
387
Avg merge
3d 6h
Merged PRs (30d)
4

Description

Got the following error when it was parsing SMSG_UPDATE_OBJECT for the creature spawns when I parsed a sniff from 5.3.0 16992

Detected build: V5_3_0_16992
Detected locale: enUS
Targeted database: BattleForAzeroth

System.ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
The actual value was -1.
at System.Collections.Generic.SortedList2.GetKey(Int32 index) at System.Collections.Generic.SortedList2.KeyList.get_Item(Int32 index)
at WowPacketParser.Enums.Version.UpdateFields.GetUpdateFieldName[T](Int32 field) in D:\WowPacketParser-master\WowPacketParser\Enums\Version\UpdateFields.cs:line 165
at WowPacketParser.Parsing.Parsers.UpdateHandler.ReadDynamicValuesUpdateBlock(Packet packet, ObjectType type, Object index, Boolean isCreating, Dictionary`2 oldValues) in D:\WowPacketParser-master\WowPacketParser\Parsing\Parsers\UpdateHandler.cs:line 487
at WowPacketParser.Parsing.Parsers.UpdateHandler.ReadDynamicValuesUpdateBlockOnCreate(Packet packet, ObjectType type, Object index) in D:\WowPacketParser-master\WowPacketParser\Parsing\Parsers\UpdateHandler.cs:line 113
at WowPacketParserModule.V5_3_0_16981.Parsers.UpdateHandler.ReadCreateObjectBlock(Packet packet, WowGuid guid, UInt32 map, Object index) in D:\WowPacketParser-master\WowPacketParserModule.V5_3_0_16981\Parsers\UpdateHandler.cs:line 56
at WowPacketParserModule.V5_3_0_16981.Parsers.UpdateHandler.HandleUpdateObject(Packet packet) in D:\WowPacketParser-master\WowPacketParserModule.V5_3_0_16981\Parsers\UpdateHandler.cs:line 39
at WowPacketParser.Parsing.Handler.Parse(Packet packet, Boolean isMultiple) in D:\WowPacketParser-master\WowPacketParser\Parsing\Handler.cs:line 149

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Enums/Version/UpdateFields.cs at GetUpdateFieldName and Parsing/Parsers/UpdateHandler.cs at ReadDynamicValuesUpdateBlock. Reproduce the V5_3_0_16992 creature-spawn parse and compare the detected build with the V5_3_0_16981 module shown in the stack trace. Done means the packet parses without the reported index exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.