roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
818 stars 130 forks source link

Server crashing after map change command #646

Open crashzk opened 4 weeks ago

crashzk commented 4 weeks ago

We have a bug when changing the map using the !map command or even with map voting plugins. Server simply crashes and restarts the server, it does not change to the map that won in the vote or even the map that we chose manually. It doesn't happen all the time, it's kind of random apparently.

We already had an issue regarding this: https://github.com/roflmuffin/CounterStrikeSharp/issues/591

crashzk commented 4 weeks ago

Log I found in the console:

CHANGELEVEL: ConVar 'nextlevel' is set, next map will be 'de_dust2'
CHANGE LEVEL: de_dust2
Changelevel de_dust2 (null)
CHostStateMgr::QueueNewRequest( Changelevel (de_dust2), 5 )
SV:  CNetworkServerService::StartChangeLevel( (no landmark) )
Client 0 'Henfi' signon state SIGNONSTATE_FULL -> SIGNONSTATE_CHANGELEVEL
23:57:40 [INFO] (plugin:GG1_MapChooser) T Wins 17, CTWins 14
[Clutch Announce 1.1.0] OnRoundEnd event fired!
23:57:40 [INFO] (plugin:GG1_MapChooser) ResetData from On last client disconnect
Client 1 'k...' signon state SIGNONSTATE_FULL -> SIGNONSTATE_CHANGELEVEL
HostStateRequest::Start(HSR_GAME):  loop(levelload) id(5) addons() desc(Changelevel (de_dust2))
SwitchToLoop levelload requested:  id [5] addons []
SV:  IGameSystem::LoopDeactivateAllSystems {
HO:  IGameSystem::LoopDeactivateAllSystems {
HO:  } IGameSystem::LoopDeactivateAllSystems done
SV:  } IGameSystem::LoopDeactivateAllSystems done
SourceTV[0] shutting down (non-relay) due to server disconnecting game.
CHLTVServer::Shutdown
KillStr3aK commented 3 weeks ago

I've been unable to reproduce this issue, which plugin utilizes the given !map command?

daffyyyy commented 3 weeks ago

Disable csstv

crashzk commented 3 weeks ago

I've been unable to reproduce this issue, which plugin utilizes the given !map command?

@KillStr3aK plugins I tested and had this problem: - SimpleAdmin: https://github.com/daffyyyy/CS2-SimpleAdmin - CSS Panel Plugin: https://github.com/CSSPanel/Plugin

And testing with changelevel itself in the server console, there were times when the server crashed and restarted.

Disable csstv

I saw some information about this too, but in my case I need CSTV, I provide game demos for players.

I also saw some recommendations to disable tv_delay 0. I will also test and see if it solves the problem, but I would also like to leave a delay configured since I also allow the connection to CSTV.

daffyyyy commented 3 weeks ago

Its cstv issue not CSS or bots if used. Just use plugin like k4 demo ...

crashzk commented 3 weeks ago

Its cstv issue not CSS or bots if used. Just use plugin like k4 demo...

I understand, but I'm already using the K4 Demo plugin, and the bug still occurs.

The CSTV config I use is just this.

//CSTV
tv_enable "1" // Enable CSTV
tv_autorecord "0" // Automatically record demo

K4 Demos plugin does everything else, recording, etc.

daffyyyy commented 3 weeks ago

Can u write dm on discord? I'm back in ~2 hours, known issue for me

crashzk commented 3 weeks ago

Can u write dm on discord? I'm back in ~2 hours, known issue for me

Hello, sorry for the delay, I sent you a DM on your discord. Problem still occurs for me.

As I mentioned, BOTS removed at server startup, command bot_quota 0 in server.cfg.

The GOTV config I use would be this:

//CSTV
tv_enable "1"
tv_autorecord "0"

K4-GOTV-Discord plugin config:

// This configuration was automatically generated by CounterStrikeSharp for plugin 'K4-GOTV-Discord', at 2024/10/18 07:07:32
{
  "general": {
    "minimum-demo-duration": 300,
    "delete-demo-after-upload": true,
    "delete-zipped-demo-after-upload": true,
    "delete-every-demo-from-server-after-server-start": false,
    "log-uploads": true,
    "log-deletions": true,
    "default-file-name": "demo",
    "regular-file-naming-pattern": "{fileName}_{map}_{date}_{time}",
    "crop-rounds-file-naming-pattern": "{fileName}_{map}_round{round}_{date}_{time}"
  },
  "discord": {
    "webhook-url": "https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "webhook-avatar": "",
    "webhook-upload-file": true,
    "webhook-name": "Demo",
    "embed-title": "{server_name}",
    "message-text": "",
    "server-boost": 0
  },
  "auto-record": {
    "enabled": true,
    "crop-rounds": false,
    "stop-on-idle": false,
    "idle-player-count-threshold": 0,
    "idle-time-seconds": 300
  },
  "mega": {
    "enabled": false,
    "email": "",
    "password": ""
  },
  "demo-request": {
    "enabled": false,
    "print-all": false,
    "delete-unused": true
  },
  "ftp": {
    "enabled": false,
    "host": "",
    "port": 21,
    "username": "",
    "password": "",
    "remote-directory": "/",
    "use-sftp": false
  },
  "ConfigVersion": 10
}