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

Disable server unload #1430

Merged
merged 6 commits into from
Oct 28, 2023
Merged

Disable server unload #1430

merged 6 commits into from
Oct 28, 2023

Conversation

a1batross
Copy link
Member

cc @mittorn @SNMetamorph @nekonomicon @Vladislav4KZ

Despite this in general might fix a lot of bugs on many platforms, this still needs to be tested against random oddities, especially in mods that were made for Xash3D.

I only had a random issue where entity didn't get correct state after map reload (load any map in HL1, then load Hazard Course, and you'll fall out of the elevator). But calling SV_DeactivateServer() in place of SV_UnloadProgs() in SV_Shutdown() seems to be helped, and it makes sense to clean up entities, and etc.

@a1batross
Copy link
Member Author

Clarifying on what exactly should be tested:

  1. Loading mods, if they load at all.
  2. Usual changelevel.
  3. Disconnecting and opening same or another map.

The good candidates for test would be metamod-based mods, bots etc.

@Vladislav4KZ
Copy link
Member

Vladislav4KZ commented Sep 23, 2023

Tested on Counter-Strike 1.6 using the CS16Client, original server library and YaPB bots (with and without metamod):
The engine crashes when starting the server a second time.

The contents of the error window are no different (except Sys_Crash address) when using bots as a metamod plugin or as a standalone dll.

engine.log
Снимок экрана 2023-09-23 220336

But it solved the issue: #1416

@Vladislav4KZ
Copy link
Member

Now the issues encountered in Half-Life:
I got this error flooding the console:
(It also does not have a new line break, see engine.log)

Error: Invalid function pointer in entity!

engine.log

It appeared when I launched the c1a0d map, using the map c1a0d console command, went back to c1a0, and returned to c1a0d again.

I'm using the Metamod 1.21p38 with Sandbot v0.4.2 plugin.

This error does not appear when the metamod is not used. Changelevel works successfully.

@a1batross
Copy link
Member Author

Should debug that under Windows, then. Doesn't crash for me on Linux.

@a1batross
Copy link
Member Author

It appeared when I launched the c1a0d map, using the map c1a0d console command, went back to c1a0, and returned to c1a0d again.

I'm using the Metamod 1.21p38 with Sandbot v0.4.2 plugin.

This error does not appear when the metamod is not used. Changelevel works successfully.

It also crashes with GoldSrc on Windows.

@a1batross
Copy link
Member Author

@Vladislav4KZ it doesn't crash in Counter-Strike with YaPB. I get an svc_bad error after death but that also happens on master branch.

@Vladislav4KZ
Copy link
Member

@Vladislav4KZ it doesn't crash in Counter-Strike with YaPB. I get an svc_bad error after death but that also happens on master branch.

But I attached both a screenshot of the Sys_Crash window and the engine.log as proof of the crash. Perhaps some kind of Windows-specific problem (did you test it on Linux, didn't you?)

I also said that the crash occurs the second time the server is started.

@Vladislav4KZ
Copy link
Member

It appeared when I launched the c1a0d map, using the map c1a0d console command, went back to c1a0, and returned to c1a0d again.

I'm using the Metamod 1.21p38 with Sandbot v0.4.2 plugin.

This error does not appear when the metamod is not used. Changelevel works successfully.

It also crashes with GoldSrc on Windows.

Okay, I'll keep that in mind.

@a1batross
Copy link
Member Author

a1batross commented Oct 8, 2023 via email

@Vladislav4KZ
Copy link
Member

I specifically booted to Windows just to finish this PR. :)

I didn’t have an engine crash with YaPB on the master branch, it only happened on the engine build from the disable-server-unload branch.

If I have time today, I'll check it again.

@Vladislav4KZ
Copy link
Member

Vladislav4KZ commented Oct 8, 2023

The engine running Counter-Strike with YaPB still crashes, on the second server startup.
The first server startup is successful.

Using Velaron's CS16Client for Windows, build for August 28, 2023.

Using the original server library from Counter-Strike 1.6, latest Steam build.

Xash3D FWGS v49/0.20 (win32-i386 build 3111) from disable-server-unload branch, October 8, 2023 3:00 AM (GMT+6)

YaPB v4.4.916 MSVC build (from GitHub Actions artifacts, master branch, windows-x86)
Not gcc, clang, msvc-xp and amd64.
Just 32 bit build compiled with MSVC 19.35.32217.1

Metamod v1.21p38 (1.21.0.38)
The only metamod plugin is YaPB v4.4.916

It also crashes even without metamod.

Windows 10 Pro 22H2 x64
OS Build: 19045.3516

Crash with metamod
crash_with_metamod
engine.log

Crash without metamod
crash_without_metamod
engine.log

@Vladislav4KZ
Copy link
Member

Edited the post above, added detailed info.

@Vladislav4KZ
Copy link
Member

Vladislav4KZ commented Oct 8, 2023

I also tested the bot builds with other compilers, all of them also lead to the engine crashing the second time the server is started.

The YaPB works fine on GoldSource.

@Vladislav4KZ
Copy link
Member

Vladislav4KZ commented Oct 8, 2023

By the way, on the master branch of engine, when the server with YaPB (which is installed as metamod plugin) is started on second time, SV_Multicast errors appear in the console, and the team selection menu doesn't work.
engine.log

And sometimes it also crashes, giving another error window.

@Vladislav4KZ
Copy link
Member

YaPB works fine only when it's installed as standalone library, on the engine build from master branch.

It doesn't crash the second time the server starts.

@a1batross a1batross merged commit f07eea5 into master Oct 28, 2023
17 checks passed
@a1batross a1batross deleted the disable-server-unload branch October 31, 2023 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants