Raised This Month: $32 Target: $400
 8% 

Solved [L4D2]Server Crash, Accelerator log


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hawkins
Senior Member
Join Date: Jul 2021
Old 02-08-2022 , 21:34   [L4D2]Server Crash, Accelerator log
Reply With Quote #1

If i missed something, or included too much/sensitive information please let me know.

Stack Trace:
https://crash.limetech.org/rh34tg36sxng
sm version:
Spoiler


sm exts list: (FTP User ID edited out)
Spoiler


sm plugins list:
Spoiler
Attached Files
File Type: txt Stack.txt (172.1 KB, 77 views)
File Type: txt Memory.txt (712.0 KB, 41 views)
File Type: txt Raw.txt (546.0 KB, 57 views)

Last edited by Hawkins; 02-22-2022 at 17:09.
Hawkins is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 02-09-2022 , 20:42   Re: [L4D2]Server Crash, Accelerator log
Reply With Quote #2

From looking at the stack.txt file, it appears to crash inside the function.
PHP Code:
CTerrorPlayer::OnTakeDamageInternal(CTakeDamageInfo &) 
The register ECX is a null pointer which leads to the crash from accessing memory at location 0x0.

Look for plugins that call
PHP Code:
SDKHooks_TakeDamage 
or hook it. I can see your last plugin on the list
PHP Code:
91 "[L4D2] Gnome and Cola Shove Damage" (1.0.9by Mart 
calls SDKHooks_TakeDamage. I would start by unloading plugins that manipulate or cause damage to occur until you have no more crashes.
backwards is offline
Hawkins
Senior Member
Join Date: Jul 2021
Old 02-09-2022 , 21:31   Re: [L4D2]Server Crash, Accelerator log
Reply With Quote #3

I used both, gnome and cola to shove all kind of infected without crashes, even beating a tank/witch with it. Not sure why it decided to crash now. The server crashes approximately once a day (this server is mostly active). WIll try without this plugin.

Last edited by Hawkins; 02-09-2022 at 21:51.
Hawkins is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-10-2022 , 03:58   Re: [L4D2]Server Crash, Accelerator log
Reply With Quote #4

You can see from the stack trace that the TakeDamage call came from CInferno (a built-in entity) rather than a plugin, so looking for plugins using SDKHooks_TakeDamage is the wrong path. While commonly this would indicate a bug in the game, there was an active OnTakeDamage SDKHook, if a plugin using that made a SDKCall with subtly incorrect gamedata there is a chance the server could survive long enough to crash here. You should temporarily rename your gamedata folder and replace it with a fresh copy from the SourceMod download, that will cause all the 3rd party things you have to fail to load, then you can focus on them.
__________________
asherkin is offline
Hawkins
Senior Member
Join Date: Jul 2021
Old 02-12-2022 , 23:42   Re: [L4D2]Server Crash, Accelerator log
Reply With Quote #5

solved it by giving up on this function:

"SDKHook_OnTakeDamage"

hooked in:

Code:
public Action:TimerLoadGlobal(Handle:hTimer, any:client)
{
	client = GetClientOfUserId(client);
	if( !client || !IsClientInGame(client) ) return;

	SDKHook(client, SDKHook_OnTakeDamageAlive, OnTakeDamageAlive);
}
Used in this part of code:

Code:
public Action:OnTakeDamageAlive(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
	if (!IsServerProcessing())
		return Plugin_Continue;
	
	if (victim && attacker > 0 && IsValidEntity(attacker) && attacker <= MaxClients && IsValidEntity(victim) && victim <= MaxClients)
	{
		if (ClientData[attacker][PLAYERDATA:ChosenClass] == _:SNIPER && GetClientTeam(attacker) == 2 && GetClientTeam(victim) == 3)
		{		
			//damage = damage + getdamage(attacker);
			damage += GetConVarInt(SNIPER_DAMAGE);
			//damage *= GetConVarFloat(SNIPER_DAMAGE_RATIO);
			//PrintToChat(attacker,"%f",damage);
			return Plugin_Changed;
		}
	}
	
	return Plugin_Continue;
}
It stopped crashing when i commented damage hook line above and latter entire block out.
It caused other problems aswell, like damage bonus adding itself up occasionally (5 times per single assault rifle shot).
Are there obvious issues with the latter block of code?
Attached Files
File Type: sp Get Plugin or Get Source (DLR_Talents_Coop.sp - 65 views - 74.0 KB)

Last edited by Hawkins; 05-24-2022 at 20:02.
Hawkins is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-13-2022 , 14:35   Re: [L4D2]Server Crash, Accelerator log
Reply With Quote #6

May be a coincidence as well.

The only issues with SDKHooks_TakeDamage/SDKHook_OnTakeDamage that I already experienced was with chainsaw damage while being incapacitated and with the Silvers Dissolve plugin, but looking to your crash seems unrelated.

Also hooking on Event_PlayerSpawn is a bad practise cause on L4D2 this event fires a lot of times and in different situations, which means that your plugin may be duplicating the event everytime the survivor spawn/respawn/rescued. (which explains your mention of "5 times")

Better hook it on OnClientPutInServer (and with late load logic)
__________________

Last edited by Marttt; 02-13-2022 at 14:37.
Marttt is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode