saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2, written in C#.
MIT License
76 stars 7 forks source link

InvalidProtocolBufferException #30

Closed laPeregrin closed 4 months ago

laPeregrin commented 6 months ago

Research

Description

For reproducing this issue you need parse special demo. I`m gonna send you demo file tomorrow. May be you can find some decisions about this. I am using latest version of DemoFile

Google.Protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
   at Google.Protobuf.ParsingPrimitives.ParseTag(ReadOnlySpan`1& buffer, ParserInternalState& state)
   at CNETMsg_Tick.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input)
   at DemoFile.PacketEvents.ParseNetMessage(Int32 msgType, ReadOnlySpan`1 buf)
   at DemoFile.DemoParser.OnDemoPacket(CDemoPacket msg)
   at DemoFile.DemoEvents.ReadDemoCommand(EDemoCommands msgType, ReadOnlySpan`1 buffer)
   at DemoFile.DemoParser.Start(Stream stream, CancellationToken cancellationToken)
   at Questera.CsGo.Parser.Parser.ParseAsync(String fileName, Int64 userSteamId) in /src/CsGoProvider/Questera.CsGo.Parser/Parser.cs:line 44
   at Questera.CsGo.Flows.DownloadMatchStatistics.Steps.ParseDemoStep.RunAsync() in /src/CsGoProvider/Questera.CsGo.Flows/DownloadMatchStatistics/Steps/ParseDemoStep.cs:line 29
   at CyberCube.Common.TinyFlow.Services.FlowExecutor.ExecuteStepAsync[TData](FlowStep step, TData data)
   at CyberCube.Common.TinyFlow.Services.FlowExecutor.ExecuteStepsAsync[TData,TResult](IList`1 steps, TData data)
   at CyberCube.Common.TinyFlow.Services.FlowExecutor.ExecuteAsync[TFlow,TData,TResult](TData data)
   at Questera.CsGo.Handlers.Statistics.DownloadMatchStatisticsHandler.Handle(Request request, CancellationToken cancellationToken)

Code to reproduce

No response

Affected demos

No response

saul commented 6 months ago

Which version of the library are you using? This issue was likely fixed in v0.5.1