Linux host - Server crash every 5 min.
#1

Hey the host is Linux OS. And the GM crash every 5-10 min or so.
even if i dont join the server, it still goes disconnects.




Код:
----------
Loaded log file: "server_log.txt".
----------
 
SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team
 
[10:59:03] 
[10:59:03] Server Plugins
[10:59:03] --------------
[10:59:03]  Loading plugin: streamer.so
[10:59:03] 
 
*** Streamer Plugin v2.6 by Incognito loaded ***
 
[10:59:03]   Loaded.
[10:59:03]  Loading plugin: audio.so
[10:59:03] 
*** Audio Plugin v0.4 by Incognito loaded ***
 
[10:59:03]   Loaded.
[10:59:03]  Loading plugin: sscanf.so
[10:59:03] 
 
[10:59:03]  ===============================
 
[10:59:03]       sscanf plugin loaded.     
 
[10:59:03]    © 2009 Alex "******" Cole
 
[10:59:03]    0.3d-R2 500 Players "dnee"
 
[10:59:03]  ===============================
 
[10:59:03]   Loaded.
[10:59:03]  Loading plugin: crashdetect.so
[10:59:03]   crashdetect v4.9 is OK.
[10:59:03]   Loaded.
[10:59:03]  Loaded 4 plugins.
 
[10:59:03] 
[10:59:03] Ban list
[10:59:03] --------
[10:59:03]  Loaded: samp.ban
[10:59:03] 
[10:59:03] 
[10:59:03] Filterscripts
[10:59:03] ---------------
[10:59:03]   Loading filterscript 'Speeds.amx'...
[10:59:04] Speedo-meter by Manish!
[10:59:04]   Loading filterscript 'buttons.amx'...
[10:59:05]   Loading filterscript 'helmet.amx'...
[10:59:06]   Loading filterscript 'vactions.amx'...
[10:59:07]   Loading filterscript 'FlashLightsbyManish.amx'...
[10:59:07]   Unable to load filterscript 'FlashLightsbyManish.amx'.
[10:59:07]   Loading filterscript 'seat-belt.amx'...
[10:59:08]     Seatbelt System loaded by ajam123...
[10:59:08]   Loaded 5 filterscripts.
 
[10:59:09]  
[10:59:09]  ======================================= 
[10:59:09]  |                                     | 
[10:59:09]  |        YSI version 1.03.0011        | 
[10:59:09]  |        By Alex "******" Cole        | 
[10:59:09]  |                                     | 
[10:59:09]  |  Checking the latest YSI version..  | 
[10:59:09]  |                                     | 
[10:59:09]  ======================================= 
[10:59:09]  
[10:59:09] OnGameo
[10:59:09] Gamemode started.
[10:59:09] Gamemode started.
[10:59:09] Gamemode started.
[10:59:09] Loading Turfs.
[10:59:09] Paintball Arena 1 loaded
[10:59:09] Paintball Arena 2 loaded
[10:59:09] Paintball Arena 3 loaded
[10:59:09] Paintball Arena 4 loaded
[10:59:09] Paintball Arena 5 loaded
[10:59:09] Paintball Arena 6 loaded
[10:59:09] Paintball Arena 7 loaded
[10:59:09] Paintball Arena 8 loaded
[10:59:09] Paintball Arena 9 loaded
[10:59:09] Paintball Arena 10 loaded
[10:59:09] LoadEventPoints.
[10:59:09] TestingEventPoints.
[10:59:10] Gates Loaded.
[10:59:10] Testing Gates.
[10:59:10] LoadGameMode.
[10:59:14] Loading Phase 1/2...
[10:59:14] Loading Phase 2/3...
[10:59:28] Loading Phase : Complete
[10:59:28] Loading Phase 3/3...
[10:59:28] [script] 3DTEXTDRAW LIMIT: 1024 (Static, non-streamed) | 3DTEXTDRAW COUNT: 2240
[10:59:28] [script] PICKUP LIMIT: 4096 (Static, non-streamed) | PICKUP COUNT: 2082
[10:59:28] [script] OBJECT LIMIT: 1000 (Static, non-streamed) | OBJECT COUNT: 4465
[10:59:28]  
[10:59:28] -------------------------------------------
[10:59:28] Connected To Realistic Life Roleplay...
[10:59:28] Welcome to Realistic Life Roleplay
[10:59:28] -------------------------------------------
[10:59:28]  
[10:59:28] Number of vehicle models: 90
[10:59:28]  
[10:59:28]  ======================================= 
[10:59:28]  |                                     | 
[10:59:28]  |   Error: Could not connect to YSI   | 
[10:59:28]  |  update server (response was 001).  | 
[10:59:28]  |                                     | 
[10:59:28]  ======================================= 
[10:59:28]  
[10:59:36] Incoming connection: xx.xxx.xxx.xxx:63811
[10:59:37] [join] Jonathan_Diaz has joined the server (0:xx.xxx.xxx.xxx)
[10:59:44] Jonathan_Diaz has logged in.
[10:59:44]  Loading Jonathan_Diaz's vehicles.
[10:59:44]  Loading all vehicles mods.
[10:59:44] [debug] Run time error 4: "Array index out of bounds"
[10:59:44] [debug]  Accessing element at index 999 past array upper bound 500
[10:59:44] [debug] AMX backtrace:
[10:59:44] [debug] #0 0009cec8 in public OnPlayerStateChange (playerid=0, newstate=1, oldstate=8) at C:\Users\Owner\Desktop\0.3e US-RP 0.3e\gamemodes\LSRP.pwn:14940
How to fix this?
Reply
#2

OnPlayerStateChange has a error. causing your crash.

Would check into your scirpt
Reply
#3

Also you should update YSI, and update other includes then re-compile your GM.

Should work.
Reply
#4

Can you post your OnPlayerStateChange?
Reply
#5

it says gm bug line 14941 and 14912
14912 : Spectate[spectator] = -1;
14941 : if(PlayerInfo[spectator][pAdmin] >= 2) {
// Preventing possible buffer overflows with the arrays
Reply
#6

post all OnPlayerStateChange or the place that it got the error
Reply
#7

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate != 2) NOPTrigger[playerid] = 0;
    if(IsPlayerNPC(playerid))
	{
	    if(newstate == PLAYER_STATE_SPECTATING)
	    {
        	TogglePlayerSpectating(playerid, false);
		}
		return 1;
	}
	if(GettingSpectated[playerid] != -1)
	{
	    new spectator = GettingSpectated[playerid];
	    if(!IsPlayerConnected(spectator))
	    {
	        GettingSpectated[playerid] = -1;
	        Spectate[spectator] = -1;
		}

	    if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[spectator][pAdmin] >= 2 || newstate == PLAYER_STATE_PASSENGER && PlayerInfo[spectator][pAdmin] >= 2)
	    {
	        TogglePlayerSpectating(spectator, true);
			new carid = GetPlayerVehicleID( playerid );
			PlayerSpectateVehicle( spectator, carid );
			SetPVarInt(spectator, "SpecState", newstate);
	    }
	    else if(newstate == PLAYER_STATE_ONFOOT && PlayerInfo[spectator][pAdmin] >= 2)
	    {
	        TogglePlayerSpectating(spectator, true);
		   	PlayerSpectatePlayer( spectator, playerid );
		   	SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
			SetPVarInt(spectator, "SpecState", newstate);
	    }
	}
	if(newstate == PLAYER_STATE_ONFOOT)
	{
 		if(stationidv[GetPlayerVehicleID(playerid)] != 0)
		{
			StopAudioStreamForPlayer(playerid);
 			//stationidp[playerid] = 0;
		}
		
		
	    new spectator = GettingSpectated[playerid];
	    if(PlayerInfo[spectator][pAdmin] >= 2) {
	        // Preventing possible buffer overflows with the arrays
	 		TogglePlayerSpectating(spectator, true);
			PlayerSpectatePlayer( spectator, playerid );
			SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
			SetPVarInt(spectator, "SpecState", newstate);
			SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
			SetPlayerVirtualWorld( spectator, GetPlayerVirtualWorld( playerid ) );
		}

	    if(oldstate == PLAYER_STATE_DRIVER)
		{
			SetPlayerWeaponsEx(playerid);
		}
		else if(oldstate == PLAYER_STATE_PASSENGER) SetPlayerWeaponsEx(playerid);

		if(ConnectedToPC[playerid] == 5)//mdc
	    {
            SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You are now logged off the MDC.");
	        ConnectedToPC[playerid] = 0;
		}
        if(TransportDuty[playerid] > 0)
		{
		    if(TransportDuty[playerid] == 1)
			{
		        TaxiDrivers -= 1;
			}
			else if(TransportDuty[playerid] == 2)
			{
			    BusDrivers -= 1;
			}
			TransportDuty[playerid] = 0;
			new string[42];
			format(string, sizeof(string), "* You are now off duty and earned $%d.", TransportMoney[playerid]);
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
			GivePlayerCash(playerid, TransportMoney[playerid]);
			ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
			SetPlayerColor(playerid, TEAM_HIT_COLOR);
			TransportTime[playerid] = 0;
   			TransportCost[playerid] = 0;
		}
		if(TransportDriver[playerid] < -1)
		{
			new string[128];
			TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
			format(string, sizeof(string), "~w~The ride cost~n~~r~$%d",TransportCost[playerid]);
			GameTextForPlayer(playerid, string, 5000, 3);
			format(string, sizeof(string), "~w~Passenger left the taxi.~n~~g~Earned $%d",TransportCost[playerid]);
			GameTextForPlayer(TransportDriver[playerid], string, 5000, 3);
			GivePlayerCash(playerid, -TransportCost[playerid]);

			new ip[32], ipex[32];
			GetPlayerIp(playerid, ip, sizeof(ip));
			GetPlayerIp(TransportDriver[playerid], ipex, sizeof(ipex));
			TaxiWarn[playerid][TransportDriver[playerid]] += TransportCost[playerid];
			if(TaxiWarn[playerid][TransportDriver[playerid]] >= 10000)
			{
				format(string, sizeof(string), "%s (IP:%s) has taxied %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(TransportDriver[playerid]), ipex, TaxiWarn[playerid][TransportDriver[playerid]]);
				Log("logs/pay.log", string);
				ABroadCast(COLOR_YELLOW, string, 2);
			}
			TransportTime[TransportDriver[playerid]] = 0;
			TransportCost[TransportDriver[playerid]] = 0;
			TransportCost[playerid] = 0;
			TransportTime[playerid] = 0;
			TransportDriver[playerid] = -1;
		}
		TelePos[playerid][0] = 0.0;
		TelePos[playerid][1] = 0.0;
	}
    if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
	{
 		if(stationidv[GetPlayerVehicleID(playerid)] != 0)
		{
Reply
#8

HELP PLEASE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)