StatsHelix / demoinfo

A library to analyze CS:GO demos in C#
MIT License
322 stars 78 forks source link

parser.ParseToEnd() -> System.NotImplementedException #165

Open Paxoo opened 4 years ago

Paxoo commented 4 years ago

Hey everyone,

I´m new to VisualStudio and C# and I´m getting an error message, which I hope you can help me with.

The error message: System.NotImplementedException HResult=0x80004001 Nachricht = Die Methode oder der Vorgang ist nicht implementiert. Quelle = DemoInfo Stapelüberwachung: bei DemoInfo.DP.Handler.PacketEntitesHandler.PropertyCollector..ctor(Entity underlying, IList`1 capture) bei DemoInfo.DP.Handler.PacketEntitesHandler.ReadEnterPVS(IBitStream reader, Int32 id, DemoParser parser) bei DemoInfo.DP.Handler.PacketEntitesHandler.Apply(PacketEntities packetEntities, IBitStream reader, DemoParser parser) bei DemoInfo.PacketEntities.Parse(IBitStream bitstream, DemoParser parser) bei DemoInfo.DP.DemoPacketParser.ParsePacket(IBitStream bitstream, DemoParser demo) bei DemoInfo.DemoParser.ParseDemoPacket() bei DemoInfo.DemoParser.ParseTick() bei DemoInfo.DemoParser.ParseNextTick() bei DemoInfo.DemoParser.ParseToEnd() bei TEst.Program.Main(String[] args) in C:\Users\Pati\source\repos\TEst\Program.cs: Zeile21

I´ve installed DemoInfo with the following instructions: https://github.com/StatsHelix/demoinfo/issues/107#issuecomment-234206846

code:

namespace TEst
{
    class Program
    {
        static void Main(string[] args)
        {
            string dev_file = @"C:\Users\Pati\Downloads\liquid-vs-teamone-m2-inferno.dem";
            using (var fs = File.OpenRead(dev_file))
            {
                using (DemoParser parser = new DemoParser(fs))
                {
                    parser.ParseHeader();
                    parser.ParseToEnd();
                }
            }
        }
    }
}

parser.ParseHeader(); is working fine, I can use parser.Map for example parser.ParseToEnd(); is not implemented?

Paxoo commented 4 years ago

So, a demo file from 2018 is working but not one demo from 2020. Does someone has the same problem?

cassinux commented 4 years ago

I have the same issue using a FACEIT demo

cassinux commented 4 years ago

Tried looping over each tick and calling ParseToEnd. Still looking at this.

AronParker commented 4 years ago

This was fixed in https://github.com/StatsHelix/demoinfo/commit/2412dac4c2f6ecc962ef60b8585d2b58273facee. However for some reason not a release has been published since that adds this fix to the github or nuget releases.

JKamue commented 3 years ago

Hi, thanks for your answer! Sadly I can't manage to create a working build of the libraries latest versions. Strangly I have the same problems described here a few years ago: https://github.com/StatsHelix/demoinfo/issues/107#issuecomment-233185667

I can use the nuget version without encountering this problem but the parser.ParseToEnd(); function is not implemented there. Do you know how to build the latest version?

cassinux commented 3 years ago

Hi, shortly after I posted, I managed to get this working. I can't remember the solution exactly but AronParker is 100% correct. You can't get the NuGet current version to work. Go download the repos manually and do not use NuGet! :)

akiver commented on 8 Dec 2018 Hi, since the 2018.12.06 update it looks like demos now contain int64. This PR handle int64 decoding based on the original demoinfogo code.

JKamue commented 3 years ago

Wow thanks for your quick answer! Sadly the newest version here on github does not work for me either, whenever I try to start a program implementing the library I get this error implying that some reference or so is missing:

Additional information: Could not load file or assembly DemoInfo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc7de83c756ec63d" or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Do you have a working proof of concept or do you remember how you set up a project without nuget? Thank you for your help!

master117 commented 3 years ago

Try disabling signed assembly when building.

cassinux commented 3 years ago

I can try give you a hand and get it working if you add me on Discord @ brandonsuperstar#2479

JKamue commented 3 years ago

Thank you very much for the offer! I sent you a friend request

JKamue commented 3 years ago

@master117 thank you very much for your help! Turning off signed assembly worked perfectly!

master117 commented 3 years ago

@JKamue You're welcome, glad I could help.