SmileYzn / RePugMod

Counter-Strike 1.6 Pickup Game Play for ReGameDLL_CS
MIT License
27 stars 6 forks source link

[BUG] Knife Round Server Crash #31

Closed axl303 closed 1 year ago

axl303 commented 1 year ago

Knife round is crashing the server Example: If 4 players are voted and the last one not, when the time ends - the server crash Example2: If no one votes and the timer ends - the server crash

Should I provide more info? And if needed, what should I provide?

rilletcs commented 1 year ago

Provide the information:

Try following these steps and see if the behavior is the same.

  1. Disable the ready system.
  2. Start the round knife.
  3. Do not choose a team.

The match was restarted and the game continued.

Tested on the following commit and configuration: Commit (debug/release mode): https://github.com/SmileYzn/RePugMod/tree/199efe2d71b9e8d69c29ab22971ebfae3d899170 ReHLDS:

Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.11.0.0-dev
Build date: 12:10:01 Jun 21 2022 (2992)
Build from: /commits/

ReGameDLL:

ReGameDLL version: 5.21.0.575-dev

SO:

Edition: Windows 10 Pro
Version: 22H2
Build: 19045.2486
SmileYzn commented 1 year ago

Did you can post what is the server version? At last ReGameDLL_CS?

Just post version command output here

axl303 commented 1 year ago

Latest Rehlds, ReGameDLL_CS, and latest repugmod. Everyrhing is latest OS: Linux, tried on ubuntu, centos, debian - all the same. The strange thing is that sometimes crashes other times is okay. Testing with bots from regamedll

rilletcs commented 1 year ago

Normally when a crash occurs the server generates a dump file in its root folder, could you send us the dump file?

If you can't attach the file because of its size, try compressing it into .zip or .7z.

SmileYzn commented 1 year ago

It is because that is a division:

https://github.com/SmileYzn/RePugMod/blob/199efe2d71b9e8d69c29ab22971ebfae3d899170/PugMod/KnifeRound.cpp#L26

And

https://github.com/SmileYzn/RePugMod/blob/199efe2d71b9e8d69c29ab22971ebfae3d899170/PugMod/KnifeRound.cpp#L33

I will try to fix it, check if stop crashging

axl303 commented 1 year ago

Sorry for the the delay. Latest actions file for linux gives " badf load"

Edit: Here is the log: pugmod_mm.so': libcurl.so.4: cannot open shared object file: No such file or directory L 01/27/2023 - 22:10:49: [META] ERROR: dll: Skipping plugin ''; couldn't query L 01/27/2023 - 22:10:49: [META] ERROR: dll: Couldn't close plugin file 'pugmod_mm.so': invalid handle L 01/27/2023 - 22:10:49: [META] ERROR: dll: Failed to load plugin 'pugmod_mm.so'

SmileYzn commented 1 year ago

You need to install libcurl or curl package (lib32-curl) on linux systems.

I guess you did not used the latest version from github actions when you report bug. Since latest action builds always require libcurl installed, not only this latest build

You can also put libcurl.so.4 at same hlds installation to get working

axl303 commented 1 year ago

I'm not using curl. Tested with latest update that you commit. (https://github.com/SmileYzn/RePugMod/commit/8a7f481b2274063dba9e9b6c7377051f4f149e6e) Tested with bots from RegameDLL, 6 times in a row - no crash, everything is running normal.

axl303 commented 1 year ago

As a addition to the commit, it needs a little rework (switching part) https://github.com/SmileYzn/RePugMod/blob/main/PugMod/KnifeRound.cpp#L27

Need a check: If a winner team is selecting same team not to switch sides Like the matchbot voteswap comment: "If winner team is the same team of winner option" https://github.com/SmileYzn/MatchBot/blob/main/MatchBot/MatchVoteSwapTeam.cpp#L98#L99

SmileYzn commented 1 year ago

Try to fix it here: https://github.com/SmileYzn/RePugMod/blob/cd1dd0ba6c783a988afe357ad91f8b11d1375108/PugMod/KnifeRound.cpp#L25

Did you can test it?

axl303 commented 1 year ago

Sorry for the delay. Still the same: I am CT (Winner Team) and when I choose to stay at same time (CT) it swaps the teams.

Also the /2 logic is good I think? If negative vote to 3 for CT to stay CT. If positive vote 3-2 for T, to switch teams? (Don't know) (PlayerCount / 2)

axl303 commented 1 year ago

I can confirm that last Task System fixes are working perfect and the crash doesnt exist. https://github.com/SmileYzn/RePugMod/actions/runs/5383573167