saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2 and Valve's Deadlock, written in C#.
MIT License
111 stars 10 forks source link

Parser is not working after latest CS2 update #39

Closed in0finite closed 9 months ago

in0finite commented 9 months ago

Research

Description

CS2 updated recently, and none of the demos from HLTV (after 7th February) are working.

Currently they give the following error:

System.NotSupportedException: Unrecognised serializer field: m_hSequence
   at DemoFile.Sdk.ISkeletonAnimationController.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0xb4
   at DemoFile.Sdk.CBaseAnimGraphController.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0x64b
   at DemoFile.Sdk.CBodyComponentBaseAnimGraph.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0x175
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1, Span`1, Func`2) + 0x45
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray() + 0x8d
   at DemoFile.Sdk.DecoderSet.CreateDecoder[T](SerializerKey) + 0xe2
   at DemoFile.Sdk.DecoderSet.GetDecoder[T](SerializerKey) + 0x77
   at DemoFile.Sdk.CBodyComponent.CreateDowncastDecoder(SerializerKey, DecoderSet, Func`1&) + 0x2fe
   at DemoFile.Sdk.CBaseEntity.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0xd8
   at DemoFile.Sdk.CBaseModelEntity.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0x12a6
   at DemoFile.Sdk.CBaseAnimGraph.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0x47c
   at DemoFile.Sdk.CBaseFlex.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0x214
   at DemoFile.Sdk.CEconEntity.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0x4e6
   at DemoFile.Sdk.CBasePlayerWeapon.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0x40a
   at DemoFile.Sdk.CCSWeaponBase.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0xf18
   at DemoFile.Sdk.CCSWeaponBaseGun.CreateFieldDecoder(SerializableField field, DecoderSet decoderSet) + 0x1d4
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1, Span`1, Func`2) + 0x45
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray() + 0x8d
   at DemoFile.Sdk.DecoderSet.CreateDecoder[T](SerializerKey) + 0xe2
   at DemoFile.Sdk.DecoderSet.GetDecoder[T](SerializerKey) + 0x77
   at DemoFile.Sdk.DecoderSet.TryGetDecoder(String, Type&, SendNodeDecoder`1&) + 0x3d20
   at DemoFile.Sdk.DecoderSet.GetDecoder(String) + 0x27
   at DemoFile.DemoParser.OnDemoClassInfo(CDemoClassInfo msg) + 0x2c9
   at DemoFile.DemoEvents.ReadDemoCommand(EDemoCommands, ReadOnlySpan`1) + 0x198
   at DemoFile.DemoParser.<MoveNextAsync>d__61.MoveNext() + 0x496

Code to reproduce

No response

Affected demos

No response

saul commented 9 months ago

I started looking at this yesterday - I think there are some breaking changes to the demo format too that will need investigation. Unfortunately this doesn't look like a trivial fix

in0finite commented 9 months ago

Here are some relevant PRs / Issues: https://github.com/markus-wa/demoinfocs-golang/issues/501 https://github.com/markus-wa/demoinfocs-golang/pull/504

Also, joining discord server of the Golang library could be helpful: https://discord.gg/eTVBgKeHnh

saul commented 9 months ago

This is now available as v0.9.1