Server crashed
#1

Hello,

My server crashed because of a format (that's said crashdetect):

[17:58:07] [debug] Server crashed while executing gamemode.amx
[17:58:07] [debug] AMX backtrace:
[17:58:07] [debug] #0 native format () from samp03svr
[17:58:07] [debug] #1 00220668 in public PlayerTimer@_yT () at ../gamemode/a_main.inc:156
[17:58:07] [debug] Native backtrace:
[17:58:07] [debug] #0 f6c09e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[17:58:07] [debug] #1 f6c02bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[17:58:07] [debug] #2 f6c03dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[17:58:07] [debug] #3 f6c04226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[17:58:07] [debug] #4 f6c09adc in ?? () from plugins/crashdetect.so
[17:58:07] [debug] #5 f772e410 in ?? ()
[17:58:07] [debug] #6 080965d7 in ?? () from samp03svr
[17:58:07] [debug] #7 080dce72 in ?? () from samp03svr
[17:58:07] [debug] #8 080950e4 in ?? () from samp03svr
[17:58:07] [debug] #9 f6c0594b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[17:58:07] [debug] #10 f6c088f8 in ?? () from plugins/crashdetect.so
[17:58:07] [debug] #11 f6c0c916 in amx_Exec () from plugins/crashdetect.so
[17:58:07] [debug] #12 f6c04be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[17:58:07] [debug] #13 f6c08659 in ?? () from plugins/crashdetect.so
[17:58:07] [debug] #14 f6b76d36 in ?? () from plugins/streamer.so
[17:58:07] [debug] #15 080ebc05 in ?? () from samp03svr
[17:58:07] [debug] #16 080af03c in ?? () from samp03svr
[17:58:07] [debug] #17 080aa13a in ?? () from samp03svr
[17:58:07] [debug] #18 f7478bf6 in __libc_start_main () from /lib32/libc.so.6
[17:58:07] [debug] #19 0804b4e1 in ?? () from samp03svr

PlayerTimer is a one second timer.

Код:
if(playerVariables[playerid][pSpectating] != INVALID_PLAYER_ID)
	{
		new string[300], id = playerVariables[playerid][pSpectating];
		if(GetPlayerInterior(playerid) != GetPlayerInterior(playerVariables[playerid][pSpectating])){
			SetPlayerInterior(playerid, GetPlayerInterior(playerVariables[playerid][pSpectating]));
		}
		if(GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(playerVariables[playerid][pSpectating])){
			SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerVariables[playerid][pSpectating]));
		}
		if(GetPVarInt(playerid, "SpecType") == 1 && IsPlayerInAnyVehicle(playerVariables[playerid][pSpectating]))
		{
			PlayerSpectateVehicle(playerid, GetPlayerVehicleID(playerVariables[playerid][pSpectating]));
			SetPVarInt(playerid, "SpecType", 2);
		}
		if(GetPVarInt(playerid, "SpecType") == 2 && !IsPlayerInAnyVehicle(playerVariables[playerid][pSpectating]))
		{
			PlayerSpectatePlayer(playerid, playerVariables[playerid][pSpectating]);
			SetPVarInt(playerid, "SpecType", 1);
		}
		if(IsPlayerInAnyVehicle(playerVariables[playerid][pSpectating]))
		{
			new Float:health;
			GetVehicleHealth(GetPlayerVehicleID(id), health);
			format(string, sizeof(string), "%s (~r~%d~w~) - l ~r~%d~w~~n~health: ~r~%.0f~w~~n~w: ~r~%d ~w~- jail: ~r~%d~w~~n~car: ~r~%d ~w~(~r~%.0f ~w~HP)~n~speed: ~g~ %d km/h", N(id), id, playerVariables[id][pLevel], playerVariables[id][pHealth], playerVariables[id][pWanted], playerVariables[id][pJailed], GetPlayerVehicleID(id), health, getVehicleSpeed(GetPlayerVehicleID(id), 0));
			PlayerTextDrawSetString(playerid, DMVTD[playerid], string);
		}
		else
		{
Crash line -->	format(string, sizeof(string), "%s (~r~%d~w~) - l ~r~%d~w~~n~health: ~r~%.0f~w~~n~w: ~r~%d ~w~- jail: ~r~%d", N(id), id, playerVariables[id][pLevel], playerVariables[id][pHealth], playerVariables[id][pWanted], playerVariables[id][pJailed]);
			PlayerTextDrawSetString(playerid, DMVTD[playerid], string);
		}
	}
Crash line:

format(string, sizeof(string), "%s (~r~%d~w~) - l ~r~%d~w~~n~health: ~r~%.0f~w~~n~w: ~r~%d ~w~- jail: ~r~%d", N(id), id, playerVariables[id][pLevel], playerVariables[id][pHealth], playerVariables[id][pWanted], playerVariables[id][pJailed]);

What's the problem here?
Reply
#2

Crashed again:

[19:58:02] [debug] Server crashed while executing gamemode.amx
[19:58:02] [debug] AMX backtrace:
[19:58:02] [debug] #0 native format () from samp03svr
[19:58:02] [debug] #1 0019a4a0 in public OnPlayerText () at ../gamemode/player/chat.inc:644
[19:58:02] [debug] Native backtrace:
[19:58:02] [debug] #0 f6bc8e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[19:58:02] [debug] #1 f6bc1bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[19:58:02] [debug] #2 f6bc2dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[19:58:02] [debug] #3 f6bc3226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[19:58:02] [debug] #4 f6bc8adc in ?? () from plugins/crashdetect.so
[19:58:02] [debug] #5 f76ed410 in ?? ()
[19:58:02] [debug] #6 080965d7 in ?? () from samp03svr
[19:58:02] [debug] #7 080dce72 in ?? () from samp03svr
[19:58:02] [debug] #8 080950e4 in ?? () from samp03svr
[19:58:02] [debug] #9 f6bc494b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[19:58:02] [debug] #10 f6bc78f8 in ?? () from plugins/crashdetect.so
[19:58:02] [debug] #11 f6bcb916 in amx_Exec () from plugins/crashdetect.so
[19:58:02] [debug] #12 f6bc3be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[19:58:02] [debug] #13 f6bc7659 in ?? () from plugins/crashdetect.so
[19:58:02] [debug] #14 f6b35d36 in ?? () from plugins/streamer.so
[19:58:02] [debug] #15 080a554a in ?? () from samp03svr
[19:58:02] [debug] #16 080b081b in ?? () from samp03svr
[19:58:02] [debug] #17 08071d38 in ?? () from samp03svr
[19:58:02] [debug] #18 08071e32 in ?? () from samp03svr
[19:58:02] [debug] #19 0807bc50 in ?? () from samp03svr
[19:58:02] [debug] #20 080aed3d in ?? () from samp03svr
[19:58:02] [debug] #21 080aef02 in ?? () from samp03svr
[19:58:02] [debug] #22 080aa13a in ?? () from samp03svr
[19:58:02] [debug] #23 f7437bf6 in __libc_start_main () from /lib32/libc.so.6
[19:58:02] [debug] #24 0804b4e1 in ?? () from samp03svr

Line: format(string, sizeof(string), "%s: %s", N(playerid), text);

Can be this from function N()?:

Код:
stock N(playerid)
{
	new string[MAX_PLAYER_NAME];
	GetPlayerName(playerid, string, MAX_PLAYER_NAME);
	return string;
}
Reply
#3

Yeah, I solved it, it was from a player name that bypass 24 characters.
Reply
#4

///////
Reply
#5

Quote:
Originally Posted by iDark
Посмотреть сообщение
Yeah, I solved it, it was from a player name that bypass 24 characters.
Perfectly
Reply
#6

Quote:
Originally Posted by iDark
Посмотреть сообщение
Yeah, I solved it, it was from a player name that bypass 24 characters.
How exactly did the names bypass it? Was it special characters, or something?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)