ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
774 stars 69 forks source link

DispatchAsyncEvent backlog #2826

Open Classes123 opened 2 years ago

Classes123 commented 2 years ago

Your system information

Please describe your issue in as much detail as possible:

So, after the "Operation Riptide" update, the client console started to flood: "DispatchAsyncEvent backlog, failed to dispatch all this frame." On weak or medium computers, this affects the FPS (20-30 FPS at that moment). These logs can be caught even in the main menu (one more), as well as on official servers (the reason for which is unknown to me). On a private server, the problem was easier to find, for example, changing cvar with the replicated flag (example change using the SourceMod). Servers with large modifications were particularly affected. I hope for an early solution to the problem.

Steps for reproducing this issue:

  1. Navigate the main menu or
  2. Change replicated cvar on a dedicated server
FoulPlay commented 1 year ago

Don't do this if you don't know what you're doing as bye bye windows (I did this workaround to a wrong key by accident and one of my installs broke.)

Hi everyone, I found a weird workaround that makes csgo run stable and a bonus for me, all games I play. (tested on all systems that I have in the house)

Again, I don't understand why this workaround works because I only have done these 2 things on all systems I have with fresh installs of Window 10 and 11. (Ryzen 1600, Ryzen 5600X, i3 laptop and a i7 laptop.)

You have to open Registry Editor, navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BasicRender and set the dword content known as SingleDeviceInstall to 0 do the same for Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BasicDisplay.

This won't fix the error 100% but on a fresh systems, 99.9% of the error is gone and 99.9% of the stutter is gone.

GLHF.

Classes123 commented 1 year ago

Sorry, I forgot to celebrate the birthday of this problem. Yes, as far as I know, some have found a solution to this problem, but this solution is not a default environment setting, so the problem has not been solved yet.

What was the solution?

Look at the posts above, I didn't say that it solved the problem for me, I haven't played this game for almost a year.

karl-police commented 1 year ago

From what I think I know so far, it is an issue related to specs. Like as example for me, I only get this on a laptop that only has Intel integrated graphics

War3Evo commented 1 year ago

For plug-ins created with SourceMod ... I removed FCVAR_REPLICATED from CreateConVar in all of the War3Evo War3Source plugins to solve this issue for clients based on what Classes123 said.

mevcutonur commented 1 year ago

Guys, for me this issue happens in a particular community server. If I launch the game and open a different server the FPS is fine, but when I open this server my FPS drops from 350 to 30. The more I wait the more the errors will stack, going above 40000 frames. If I leave the server the number starts going down. If I wait long enough the number goes to 0 and FPS comes back up. But if I re-enter the server it'll start building up again. I realized the server is empty whenever this happens, and the problem fixes itself pretty much randomly. I don't know if it's the time of the day, the amount of people in the server, or whatever. I think my problem is different than yours but I still wanted to share some info.

War3Evo commented 1 year ago

For CS:GO, we recently found out that spamming this stock in SourceMod, would cause FPS issues:

stock void CSGO_RADAR(int client,bool TurnON)
{
    if(ValidPlayer(client) && !IsFakeClient(client))
    {
        if(TurnON)
        {
            int hudflags = GetEntProp(client, Prop_Send, "m_iHideHUD");
            if(hudflags & HIDE_RADAR)
            {
                hudflags &= ~HIDE_RADAR;
                hudflags &= ~HIDEHUD_CHAT;
                SetEntProp(client, Prop_Send, "m_iHideHUD", hudflags);
            }
        }
        else
        {
            int hudflags = GetEntProp(client, Prop_Send, "m_iHideHUD");
            if(!(hudflags & HIDE_RADAR))
            {
                hudflags |= HIDE_RADAR;
                hudflags |= HIDEHUD_CHAT;
                SetEntProp(client, Prop_Send, "m_iHideHUD", hudflags);
            }
        }
    }
}
janez33 commented 1 year ago

They couldn't solve that error, so instead they will release Counter Strike 2 without this error 😂😂😂

karl-police commented 1 year ago

Question is what even is DispatchAsyncEvent and why does it happen?

OneManMonkeySquad commented 1 year ago

This is def. a bug in the game. Came with an update, game running at high fps with 8ms ping. And either random hangs or hangs on certain event such a seeing an enemy or getting killed. If I had to guess I'd say it has something to do with how Windows handles multi threading. The "DispatchAsyncEvent" log message is 100% just symptom not the actual cause.

mutezero commented 1 year ago

Question is what even is DispatchAsyncEvent and why does it happen?

It's just a sign that Panorama took too much time to process events (buttons clicked, elements resized, etc.). It's not the cause, it's the result of the freezing / fps drops, something else's causing it.

mujumata commented 1 year ago

After trying out pretty much everything out there , what fixed my performance issues was turning off Hardware-accelerated GPU scheduling from Windows Graphics settings which is mentioned nowhere at all. Your performance issues may or may not be related to any error messages you are getting in the console but if you are having performance issues try this and i wish it works for you aswell.

OneManMonkeySquad commented 1 year ago

I had the game installed on a very very very slow HDD. By accident. What caught me off guard was that I remember the game running perfectly fine before a certain update.