View Single Post
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-24-2017 , 05:56   Re: SteamTools (v1.1)
Reply With Quote #64

Honestly, I'm out of ideas.

- I've fixed the params in Hook_SteamGameServer_Init() and looking at the debug, the values seems correct
- I've fixed a potential issue if you're using SELinux
- I've tested on different OS without issues.

Really I don't understand.
Technically, the engine calls SteamGameServer_Init() in libsteam_api.so, then my module hooks this function (Hook_SteamGameServer_Init) and inside it calls the original function.

Code:
DETOUR_DECL_STATIC6(Hook_SteamGameServer_Init, bool, uint32, unIP, uint16, usPort, uint16, usGamePort, uint16, usQueryPort, EServerMode, eServerMode, const char*, pchVersionString)
{
	auto result = DETOUR_STATIC_CALL(Hook_SteamGameServer_Init)(unIP, usPort, usGamePort, usQueryPort, eServerMode, pchVersionString);
...
}
The code does nothing special, it simply hooks the function and calls the original function address as it is, then I do stuff afterward.
The crash happens when the original function SteamGameServer_Init is called from my module. Too bad there is no debug in libsteam_api.so, we could have figured out where it crashes. But to crash at this point, all I can think is either there is something wrong the function header (but afaik it's fixed now) or the way is hooked is problematic (can't confirm, can't reproduce).

Today, I've installed a new server (DigitalOcean) specifically with Debian 8.8 and 3.16.0-4-amd64 to try to match your OS, then whatever with the official engine or ReHLDS, the SteamTools module is loading as expected.

What is your host (vultr?)? Also, do you think it would be possible to give me a temporary access so I can look myself in your context, at this point all I can do is to try to figure out what is different. There is definitely something weird/wrong with your server.
__________________

Last edited by Arkshine; 05-24-2017 at 10:42.
Arkshine is offline