Jump to content
 Share

Roy

Throwing Knives Possibly Crashing Server

Recommended Posts

Hello, so as a few of you know, the server has been crashing quite often in the past (at least the European server). The crash that occurred the most was the following:

Stack trace:

#0  0xf602ca92 in ?? () from /home/container/bin/engine.so
[Current thread is 1 (Thread 0xf753a700 (LWP 1172))]
#0  0xf602ca92 in ?? () from /home/container/bin/engine.so
#1  0xf602caf0 in ?? () from /home/container/bin/engine.so
#2  0xf5fbbafc in ?? () from /home/container/bin/engine.so
#3  0xf5f28eb0 in ?? () from /home/container/bin/engine.so
#4  0xf5f2b6ea in ?? () from /home/container/bin/engine.so
#5  0xec3376b8 in PrecacheModel(SourcePawn::IPluginContext*, int const*) () from /home/container/csgo/addons/sourcemod/bin/sourcemod.2.csgo.so
#6  0x0acfa47c in ?? ()
#7  0xdca5bf68 in ?? ()
#8  0xebf8706f in ?? ()
#9  0xf1515045 in sp::Environment::Invoke(sp::PluginRuntime*, sp::CompiledFunction*, int*) () from /home/container/csgo/addons/sourcemod/bin/sourcepawn.jit.x86.so
#10 0xf1517955 in sp::InvokeFrame::InvokeFrame(sp::PluginContext*, unsigned int) () from /home/container/csgo/addons/sourcemod/bin/sourcepawn.jit.x86.so
#11 0xf151b390 in sp::PluginContext::Invoke(unsigned int, int const*, unsigned int, int*) () from /home/container/csgo/addons/sourcemod/bin/sourcepawn.jit.x86.so
#12 0x00000000 in ?? ()

 

Console error:

Host_Error: Bad string: 

 

Recently, I disabled the Throwing Knives and RTD plugins and we haven't seen this crash since.

 

Tonight, while trying to debug the server crashes caused by the latest CS:GO update, I made the following plugin:

#include <sourcemod>

public Plugin myinfo =
{
	name = "Fix CS:GO",
	author = "Roy (Christian Deacon)",
	description = "Valve, STOP BREAKING CS:GO YOU ASSHOLES.",
	version = "1.0.0",
	url = "GFLClan.com"
};

public void OnPluginStart()
{
	PrintToServer("Fixing Valve Stuff Activated.");
	
	RegAdminCmd("sm_precache", Command_Precache, ADMFLAG_ROOT);
}

public void OnMapStart()
{
	PrecacheModel("models/player/kuristaja/zombies/classic/classic.mdl");
	PrecacheModel("models/player/kuristaja/gozombie/gozombie.mdl");
	PrecacheModel("models/player/kuristaja/gozombie/gozombie.mdl");
	PrecacheModel("models/player/kuristaja/skinny/skinny.mdl");
}

public Action Command_Precache(int iClient, int iArgs)
{
	char sBuffer[PLATFORM_MAX_PATH];
	GetCmdArg(1, sBuffer, sizeof(sBuffer));
	
	PrecacheModel(sBuffer);
	
	ReplyToCommand(iClient, "Successfully precached %s!", sBuffer);
	
	return Plugin_Handled;
}

 

I decided to add a sm_precache command in for testing and after messing around with the command for a bit, I got the server to crash when I inputted an empty string as the model (e.g. just "sm_precache"). The odd thing is, the crash type was the same as the one above that CS:GO Surf RPG DM experienced. A while ago, I looked at the CS:GO Throwing Knives plugin's code on AlliedMods and noticed they literally precache the models/materials inside of the CreateKnife() timer itself (here and here) which in my opinion seems odd because every other plugin I've seen precaches the models/materials needed for the plugin in the OnMapStart() forward. From looking at the code, I can't see it somehow using an empty string to precache. However, there's always a possibility something screwed up.

 

Therefore, I've decided to make a new project here with these plugins modified. You can read about the plugins in the thread but I believe if we were to try throwing knives again, we should try the throwingknives_safe.smx version I created since that is safer and precaches models/materials in the OnMapStart() forward.

 

@Sleazoid If you need any help setting this up, please let me know! I made this thread to just show that throwingknives_safe.smx will most likely not crash the server.

 

Thanks!

Share this post


Link to post
Share on other sites




×
×
  • Create New...