Server restarts on certain commands
#1

I've looked EVERYWHERE for this problem, and it's driving me NUTS. It's also making players leave due to the fact that the server frequently restarts. Here's the problem.

I have just recently switched to Volt Host. I used to host my server on my PC.

Everything works fine, gamemode works great, etc. -- EXCEPT: Whenever I try to accept a report ((/ar)) the server just restarts. I've looked at the script, and I don't see anything at all that can possibly be wrong. I tested it on my local hosts and it works just fine. No restart. Just fine.

I've also bought another host, to see if it was an issue with Volt, however it isn't. When I ran it on my PC, it was windows, so I'm assuming it's a problem with Linux (since what's what Volt Host uses.)

So here I am pulling my hair, screaming "HELP!"


UPDATE 1: I have contacted Volt Host support about this problem and they said:

Quote:

Hello,

No it is the commands then because certain variables change it may not have crashed on your home PC but Linux works slightly different and if it has dependents on existence of scriptfiles those may have been moved / created as your server progressed. Our dedis wouldn't magically "break" because of your commands. It IS your commands.



UPDATE 2: Every time I accept a report, it restarts. Then I checked the server logs and see this:

Quote:

Restarted (Excessive CPU Usage - 103.5%)



I still don't know how to resolve this. It's making me lose players on the server, and that's irritating. I'll be looking forward to ANY help/suggestions. Thank you!
Reply
#2

are your reports being logged in any file? like
Код:
new ReportFile=fopen("logs/reports/complaints.txt")blablabal
? when the script tries to open an invalid file, it WILL crash, regardless of the OS.
goto the plugin section, and search for the crashdetect plugin. i didnt use it (yet), bt it will point you to the LAST processed function aswell.
Reply
#3

Quote:
Originally Posted by Babul
Посмотреть сообщение
are your reports being logged in any file? like
Код:
new ReportFile=fopen("logs/reports/complaints.txt")blablabal
Well, I have a AddReportToken function. It saves the tokens into:
Код:
format(sz_FileStr, sizeof(sz_FileStr), "admins/rtokens/%s[%d'%d'%d]", sz_playerName, i_timestamp[1], i_timestamp[2], i_timestamp[0]);
I don't think that's the problem though, since it's when the report get accepted, server just restarts.
Reply
#4

Give your /ar command.
Reply
#5

Quote:
Originally Posted by [LoF]Zak
Посмотреть сообщение
Give your /ar command.
Код:
CMD:ar(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 2)
	{
		new string[128], reportid;
		if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ar [reportid]");

		if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, "   Report ID not below 0 or above 999!"); return 1; }
		if(Reports[reportid][BeingUsed] == 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "   That report ID is not being used!");
			return 1;
		}
		if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
		{
			SendClientMessageEx(playerid, COLOR_GREY, "   The reporter has disconnected !");
			Reports[reportid][ReportFrom] = 999;
			Reports[reportid][BeingUsed] = 0;
			return 1;
		}
		format(string, sizeof(string), "AdmCmd: %s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
		ABroadCast(COLOR_ORANGE, string, 2);
		AddReportToken(playerid); // Report Tokens
		format(string, sizeof(string), "%s has accepted your report and is reviewing it, you can /reply to send messages to the admin reviewing your report.", GetPlayerNameEx(playerid));
		SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
		PlayerInfo[playerid][pAcceptReport]++;
		Reports[reportid][ReplyTimerr] = SetTimerEx("ReplyTimer", 30000, 0, "d", reportid);
		Reports[reportid][CheckingReport] = playerid;
		Reports[reportid][BeingUsed] = 0;
		Reports[reportid][TimeToExpire] = 0;
		strmid(Reports[reportid][Report], "None", 0, 4, 4);
	}
	return 1;
}
Reply
#6

Bump.
Reply
#7

So have you tried crashdetect as Babul suggested?

If you can't find it's here:

https://sampforum.blast.hk/showthread.php?tid=262796
Reply
#8

Quote:
Originally Posted by Zeex_
Посмотреть сообщение
So have you tried crashdetect as Babul suggested?

If you can't find it's here:

https://sampforum.blast.hk/showthread.php?tid=262796
I put in the plugin, made my server restart, and got:

"usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by plugins/crashdetect.so"
Reply
#9

this
pawn Код:
Reports[reportid][ReportFrom] = 999;
looks suspect. you set the playerid to a value higher than 500/800. fix it, use id 0 if yoiu dont feel for creating 1 more variable which holds "IsPlayerForbiddenToReportCauseHesDisconnected[MAX_PLAYERS]", at least avoid checkinf/setting invalid playerids, i do that by adding variables as switch (check[]=0 or 1, thats a "pass check, or dont check"-like. sounds complicated, but i dont find the words to describe better ><
Reply
#10

Quote:
Originally Posted by Babul
Посмотреть сообщение
this
pawn Код:
Reports[reportid][ReportFrom] = 999;
looks suspect. you set the playerid to a value higher than 500/800. fix it, use id 0 if yoiu dont feel for creating 1 more variable which holds "IsPlayerForbiddenToReportCauseHesDisconnected[MAX_PLAYERS]", at least avoid checkinf/setting invalid playerids, i do that by adding variables as switch (check[]=0 or 1, thats a "pass check, or dont check"-like. sounds complicated, but i dont find the words to describe better ><
That was a bit confusing, heh. So what you're saying is...it should be something like:

Код:
Reports[reportid][ReportFrom] = 199;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)