Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMSG_UPDATE_OBJECT errors caused by using multiple threads #590

Open
mdX7 opened this issue Mar 6, 2021 · 1 comment
Open

SMSG_UPDATE_OBJECT errors caused by using multiple threads #590

mdX7 opened this issue Mar 6, 2021 · 1 comment

Comments

@mdX7
Copy link
Member

mdX7 commented Mar 6, 2021

During my massparses i noticed thats SMSG_UPDATE_OBJECT randomy causes errors when using more threads than one.
The error is not guaranteed to occur, it kinda only happens 3 times in 10 sniff parses.

Used config: https://gist.github.com/mdX7/63df65b085f011a0a087d08b0b63713e
This happened on Linux (via. Docker) and on Windows aswell.

It appears to be related to new updatefield system (introduced in 8.1.0).

Release Stacktrace (on Linux):

System.ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at WowPacketParserModule.V8_0_1_27101.UpdateFields.V8_2_0_30898.UpdateFieldHandler.ReadUpdateUnitData(Packet packet, IUnitData existingData, Object[] indexes) in /app/src/WowPacketParserModule.V8_0_1_27101/Parsers/UpdateFieldsHandler820.cs:line 918
   at WowPacketParserModule.V8_0_1_27101.Parsers.UpdateHandler.HandleUpdateObject(Packet packet) in /app/src/WowPacketParserModule.V8_0_1_27101/Parsers/UpdateHandler.cs:line 71
   at WowPacketParser.Parsing.Handler.Parse(Packet packet, Boolean isMultiple) in /app/src/WowPacketParser/Parsing/Handler.cs:line 149

Debug Stacktrace (parsed by @matanshukry on Windows)

System.ArgumentOutOfRangeException
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.set_Item(Int32 index, T value)
   at WowPacketParser.Misc.DynamicUpdateField`1.set_Item(Int32 index, T value) in D:\dev\Games\tc\WowPacketParser\WowPacketParser\Misc\DynamicUpdateField.cs:line 18
   at WowPacketParserModule.V8_0_1_27101.UpdateFields.V8_2_0_30898.UpdateFieldHandler.ReadUpdateUnitData(Packet packet, IUnitData existingData, Object[] indexes) in D:\dev\Games\tc\WowPacketParser\WowPacketParserModule.V8_0_1_27101\Parsers\UpdateFieldsHandler820.cs:line 986
   at WowPacketParserModule.V8_0_1_27101.Parsers.UpdateHandler.HandleUpdateObject(Packet packet) in D:\dev\Games\tc\WowPacketParser\WowPacketParserModule.V8_0_1_27101\Parsers\UpdateHandler.cs:line 71
   at WowPacketParser.Parsing.Handler.Parse(Packet packet, Boolean isMultiple) in D:\dev\Games\tc\WowPacketParser\WowPacketParser\Parsing\Handler.cs:line 149

These stacktraces actually show a different line, but both are using the same sniff with Threads set to 0. When Threads is limited to 1 everything will parse successfully, even with ~1000 sniffs.

@Shauren
Copy link
Member

Shauren commented Mar 6, 2021

This is definitely also broken for old updatefields too - it also uses a List to store dynamic fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants