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

Some Demos broken after new cs2 update "Missing CSoundEventPathCornerEntity" #65

Closed
1 task done
xGuysOG opened this issue May 27, 2024 · 1 comment · Fixed by #67
Closed
1 task done

Some Demos broken after new cs2 update "Missing CSoundEventPathCornerEntity" #65

xGuysOG opened this issue May 27, 2024 · 1 comment · Fixed by #67
Labels
resolution/fixed type/compat Demo protocol compatibility issues

Comments

@xGuysOG
Copy link

xGuysOG commented May 27, 2024

Research

  • I've already searched and I could not find an existing issue or discussion about this issue.

Description

Hi, it seems we have another error with parsing after the new cs2 update, its an error that dosnt happen often occoured in 4 out of 40 demos.

error is:
CSoundEventPathCornerEntity

from another project i have a stack trace too:
Logs: 27/05/2024 - 21.08.34 - Error at HandleAbove25Demos System.Exception: Attempted to create unknown entity: CSoundEventPathCornerEntity
at DemoFile.DemoParser.<>c__DisplayClass115_0.b__1(EntityContext context)
at DemoFile.DemoParser.OnPacketEntities(CSVCMsg_PacketEntities msg)
at DemoFile.PacketEvents.ParseNetMessage(Int32 msgType, ReadOnlySpan1 buf) at DemoFile.DemoParser.OnDemoPacket(CDemoPacket msg) at DemoFile.DemoEvents.ReadDemoCommandCore[T](Action1 callback, MessageParser1 parser, ReadOnlySpan1 buffer, Boolean isCompressed)
at DemoFile.DemoEvents.ReadDemoCommand(EDemoCommands msgType, ReadOnlySpan1 buffer, Boolean isCompressed) at DemoFile.DemoParser.MoveNextCoreAsync(EDemoCommands msgType, Boolean isCompressed, Int32 size, CancellationToken cancellationToken) at DemoFile.DemoParser.ReadAllAsync(Stream stream, CancellationToken cancellationToken) at PowerLigaStats.DemoParsing.DemoHandler.ProcessCS2DemoRewrite(String demoFilePath, Int32 season, String division, DateTime dateTime, Boolean playoff) in C:\Users\Patri\Documents\Kode\Full-stack\PowerLigaStats\PowerLigaStats\DemoParsing\DemoHandler.cs:line 915 at PowerLigaStats.DemoParsing.DemoHandler.ProcessCS2DemoRewrite(String demoFilePath, Int32 season, String division, DateTime dateTime, Boolean playoff) in C:\Users\Patri\Documents\Kode\Full-stack\PowerLigaStats\PowerLigaStats\DemoParsing\DemoHandler.cs:line 1046 at PowerLigaStats.DemoParsing.DemoHandler.ProcessDemoFileAbove24(String demoFilePath, Int32 season, String division, DateTime dateTime, Boolean playoff) in C:\Users\Patri\Documents\Kode\Full-stack\PowerLigaStats\PowerLigaStats\DemoParsing\DemoHandler.cs:line 57 at PowerLigaStats.DemoParsing.DemoManager.HandleDemosByDivision(Int32 season, String division, List1 allResults) in C:\Users\Patri\Documents\Kode\Full-stack\PowerLigaStats\PowerLigaStats\DemoParsing\DemoManager.cs:line 271
at PowerLigaStats.DemoParsing.DemoManager.Start(Int32 season) in C:\Users\Patri\Documents\Kode\Full-stack\PowerLigaStats\PowerLigaStats\DemoParsing\DemoManager.cs:line 720

Code to reproduce

public static class Program
{
    //public static string flashNoWork = "C:\\Users\\xguys\\Desktop\\Flash issues\\crystal_vulture.dem";
    public static string flashWork = "C:\\Users\\xguys\\Desktop\\Demos To test\\661577c94c197423489bd882_0_1716836561580.dem";




    public static async Task Main(string[] args)
    {
        try
        {
            Stopwatch stopwatch3 = new Stopwatch();
            stopwatch3.Start();
            MemoryStream _fileStream;
            byte[] _demoBytes;
            //_demoBytes = File.ReadAllBytes(demoFilePath);
            _demoBytes = await File.ReadAllBytesAsync(flashWork);
            _fileStream = new MemoryStream(_demoBytes);

            Stopwatch stopwatch = new Stopwatch();
            stopwatch.Start();
            var demo = new DemoParser();

            demo.Source1GameEvents.BombExploded += e =>
            {
                Console.WriteLine("Bomb exploded");
            };

            demo.Source1GameEvents.PlayerBlind += e =>
            {
                Console.WriteLine("Player blind");

            };

            demo.Source1GameEvents.TrPlayerFlashbanged += e =>
            {
                Console.WriteLine("Player flashbanged");
            };

            //demo.Source1GameEvents.FlashbangDetonate += e =>
            //{
            //    Console.WriteLine("Flashbang detonate");
            //};

            demo.Source1GameEvents.RoundStart += e =>
            {

                if (!demo.GameRules.HasMatchStarted)
                {
                    //PowerLigaManager.Log("ROund end called but we have an issue, it seems match was not started yet");
                    return;
                }
                Console.WriteLine("Round start called at round ct:" + demo.TeamCounterTerrorist.Score + " and t:" + demo.TeamTerrorist.Score);
                Debug.WriteLine("Round start called at round ct:" + demo.TeamCounterTerrorist.Score + " and t:" + demo.TeamTerrorist.Score);
            };

            demo.Source1GameEvents.CsWinPanelMatch += e =>
            {
                Console.WriteLine("WIn match has ended");
            };
            await demo.ReadAllAsync(_fileStream);
            stopwatch3.Stop();

            stopwatch.Stop();
            Console.WriteLine("Time elapsed after file data: {0}", stopwatch.Elapsed);
            Console.WriteLine("Time elapsed: {0}", stopwatch3.Elapsed);
            Console.WriteLine("\nFinished!");
        } catch (Exception e)
        { 
            Console.WriteLine("Exception: " + e.Message.ToString());
        }

        Console.ReadKey();
    }

Affected demos

https://drive.google.com/file/d/1ks0sX_5EVK-Cy7BT66bpXorhmJUrVAqp/view?usp=sharing

@xGuysOG xGuysOG changed the title Missing CSoundEventPathCornerEntity after new cs2 update Some Demos broken after new cs2 update "Missing CSoundEventPathCornerEntity" May 31, 2024
@saul saul closed this as completed in #67 Jun 1, 2024
@saul
Copy link
Owner

saul commented Jun 1, 2024

Thanks for reporting. The fix will be released as v0.15.1

@saul saul added resolution/fixed type/compat Demo protocol compatibility issues labels Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution/fixed type/compat Demo protocol compatibility issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants