Server Crashed with an Unknown reason
#1

Hello all, so my Server had been crashed yesterday with an unknown error. please do anyone know what is the proplem & how to resolve it

Crashdetect Logs:
Код:
[2017 | 09:49:24] [debug] Run time error 4: "Array index out of bounds"
[2017 | 09:49:24] [debug]  Attempted to read/write array element at index 64 in array of size 64
[2017 | 09:49:24] [debug] AMX backtrace:
[2017 | 09:49:24] [debug] #0 0030125c in public LoadRace (tmp[]=@044dca50 "murderhorn") at grandlarcy.pwn:24552
[2017 | 09:49:24] [debug] #1 00301cb4 in public RaceRotation () at grandlarcy.pwn:24593
[2017 | 10:45:16] [debug] Run time error 4: "Array index out of bounds"
[2017 | 10:45:16] [debug]  Attempted to read/write array element at index 64 in array of size 64
[2017 | 10:45:16] [debug] AMX backtrace:
[2017 | 10:45:16] [debug] #0 0030125c in public LoadRace (tmp[]=@044dca50 "murderhorn") at grandlarcy:24552
[2017 | 10:45:16] [debug] #1 00301cb4 in public RaceRotation () at grandlarcy.pwn:24593
[2017 | 11:41:01] [debug] Run time error 4: "Array index out of bounds"
[2017 | 11:41:01] [debug]  Attempted to read/write array element at index 64 in array of size 64
[2017 | 11:41:01] [debug] AMX backtrace:
[2017 | 11:41:01] [debug] #0 0030125c in public LoadRace (tmp[]=@044dca50 "murderhorn") at grandlarcy:24552
[2017 | 11:41:01] [debug] #1 00301cb4 in public RaceRotation () at grandlarcy.pwn:24593
[2017 | 11:41:22] [debug] Server crashed due to an unknown error
[2017 | 11:41:22] [debug] Native backtrace:
[2017 | 11:41:22] [debug] #0 f73ac180 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[2017 | 11:41:22] [debug] #1 f73a4064 in _ZN11CrashDetect20PrintNativeBacktraceERSoRKN2os7ContextE () from plugins/crashdetect.so
[2017 | 11:41:22] [debug] #2 f73a4d64 in _ZN11CrashDetect20PrintNativeBacktraceERKN2os7ContextE () from plugins/crashdetect.so
[2017 | 11:41:22] [debug] #3 f73a6cdb in _ZN11CrashDetect7OnCrashERKN2os7ContextE () from plugins/crashdetect.so
[2017 | 11:41:22] [debug] #4 f73ab4d5 in ?? () from plugins/crashdetect.so
[2017 | 11:41:22] [debug] #5 f7706d50 in __kernel_rt_sigreturn () from linux-gate.so.1
[2017 | 11:41:22] [debug] #6 f7706d70 in __kernel_vsyscall () from linux-gate.so.1
[2017 | 11:41:22] [debug] #7 f7403367 in gsignal () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[2017 | 11:41:22] [debug] #8 f7404a23 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[2017 | 11:41:22] [debug] #9 f7631a15 in _ZN9__gnu_cxx27__verbose_terminate_handlerEv () from /usr/lib32/libstdc++.so.6
[2017 | 11:41:22] [debug] #10 f762f733 in ?? () from /usr/lib32/libstdc++.so.6
[2017 | 11:41:22] [debug] #11 f762f7ad in ?? () from /usr/lib32/libstdc++.so.6
[2017 | 11:41:22] [debug] #12 f768b1a6 in ?? () from /usr/lib32/libstdc++.so.6
[2017 | 11:41:22] [debug] #13 f76deecb in ?? () from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
[2017 | 11:41:22] [debug] #14 f74c0d0e in clone () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[2017 | 11:41:22] [debug] Registers:
[2017 | 11:41:22] [debug] EAX: 00000000 EBX: 00002058 ECX: 00002062 EDX: 00000006
[2017 | 11:41:22] [debug] ESI: 09c1d074 EDI: f757e000 EBP: ef5ff2f8 ESP: ef5ff174
[2017 | 11:41:22] [debug] EIP: f7706d70 EFLAGS: 00200296
[2017 | 11:41:22] [debug] Stack:
[2017 | 11:41:22] [debug] ESP+00000000: ef5ff2f8 00000006 00002062 f7403367
[2017 | 11:41:22] [debug] ESP+00000020: ef5ff1a4 00000000 f73d4220 00000005
[2017 | 11:41:22] [debug] ESP+00000040: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000060: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000080: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+000000c0: f772a000 f76d7000 00000005 ef5ff2a0
[2017 | 11:41:22] [debug] ESP+000000e0: 00000005 00000000 f76cf3d0 f75f98b8
[2017 | 11:41:22] [debug] ESP+00000100: f75eaaf8 f757e960 f743f8bc f757e960
[2017 | 11:41:22] [debug] ESP+00000120: f76cf000 09c1d074 081a18ec ef5ff2f8
[2017 | 11:41:22] [debug] ESP+00000140: f76cf000 081a18ec f7631a15 00000001
[2017 | 11:41:22] [debug] ESP+00000160: 00000000 ef5ff2f4 00000000 f75f98b8
[2017 | 11:41:22] [debug] ESP+00000180: 00000000 ef5ff358 f762f733 f76cf000
[2017 | 11:41:22] [debug] ESP+000001a0: f771d6e0 f762f775 f762f7a4 0a6de598
[2017 | 11:41:22] [debug] ESP+000001c0: 00000000 00000000 f768b182 00000000
[2017 | 11:41:22] [debug] ESP+000001e0: 00000000 ef5ff428 f76deecb 09bcaecc
[2017 | 11:41:22] [debug] ESP+00000200: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000220: ef5ffb40 003d0f00 ef5ff428 7136e35f
[2017 | 11:41:22] [debug] ESP+00000240: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000260: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000280: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+000002a0: 00000000 00000000 f76dee00 00000000
[2017 | 11:41:22] [debug] ESP+000002c0: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+000002e0: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000300: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000320: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000340: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000360: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+00000380: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+000003a0: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+000003c0: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] ESP+000003e0: 00000000 00000000 00000000 00000000
[2017 | 11:41:22] [debug] Loaded modules:
[2017 | 11:41:22] [debug] 00000000 - 00187dc3 samp03svr
[2017 | 11:41:22] [debug] f7706000 - f7706e96 linux-gate.so.1
[2017 | 11:41:22] [debug] f76f4000 - f76f681b /lib/i386-linux-gnu/i686/cmov/libdl.so.2
[2017 | 11:41:22] [debug] f76d8000 - f76f2d2b /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
[2017 | 11:41:22] [debug] f75e5000 - f76dece6 /usr/lib32/libstdc++.so.6
[2017 | 11:41:22] [debug] f759f000 - f75e3b43 /lib/i386-linux-gnu/i686/cmov/libm.so.6
[2017 | 11:41:22] [debug] f7582000 - f759e3c4 /lib/i386-linux-gnu/libgcc_s.so.1
[2017 | 11:41:22] [debug] f73d5000 - f758a22f /lib/i386-linux-gnu/i686/cmov/libc.so.6
[2017 | 11:41:22] [debug] f7709000 - f7729d6c /lib/ld-linux.so.2
[2017 | 11:41:22] [debug] f738e000 - f73d0ac4 plugins/crashdetect.so
[2017 | 11:41:22] [debug] f72d0000 - f738e39a plugins/streamer.so
[2017 | 11:41:22] [debug] f76fa000 - f770109f /lib/i386-linux-gnu/i686/cmov/librt.so.1
[2017 | 11:41:22] [debug] f7222000 - f72cfc5b plugins/YSF.so
[2017 | 11:41:22] [debug] f7212000 - f72211d4 plugins/sscanf.so
[2017 | 11:41:22] [debug] f719b000 - f7211b5d plugins/irc.so
[2017 | 11:41:22] [debug] f6903000 - f699aab0 plugins/discord-connector.so
[2017 | 11:41:22] [debug] f68d8000 - f6902b45 /home/ogp_agent/OGP_User_Files/whmcs/502/plugins/../log-core.so
[2017 | 11:41:22] [debug] f686e000 - f68ce254 /usr/lib/i386-linux-gnu/i686/cmov/libssl.so.1.0.0
[2017 | 11:41:22] [debug] f66a1000 - f6884284 /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0
[2017 | 11:41:22] [debug] f5e45000 - f5e503ef /lib/i386-linux-gnu/i686/cmov/libnss_files.so.2
[2017 | 11:41:22] [debug] f5e3e000 - f5e4297b /lib/i386-linux-gnu/i686/cmov/libnss_dns.so.2
[2017 | 11:41:22] [debug] f5e26000 - f5e3e2fb /lib/i386-linux-gnu/i686/cmov/libresolv.so.2
Reply
#2

Show line 24522 OR the entire code of whatever that is.
Код:
[2017 | 09:49:24] [debug] #0 0030125c in public LoadRace (tmp[]=@044dca50 "murderhorn") at grandlarcy.pwn:24552
Reply
#3

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Show line 24522 OR the entire code of whatever that is.
Код:
[2017 | 09:49:24] [debug] #0 0030125c in public LoadRace (tmp[]=@044dca50 "murderhorn") at grandlarcy.pwn:24552
callback LoadRace:
Код:
public LoadRace(tmp[])
{
	new race_name[32],templine[512];
	format(CRaceName,sizeof(CRaceName), "%s",tmp);
	format(race_name,sizeof(race_name), "SATDM/Race/%s.yr",tmp);
	if(!fexist(race_name)) return -1; // File doesn't exist
	CFile=race_name;
	LCurrentCheckpoint=-1; RLenght=0; RLenght=0;
	new File:f, i;
	f = fopen(race_name, io_read);
	fread(f,templine,sizeof(templine));
	if(templine[0] == 'Y') //Checking if the racefile is v0.2+
	{
		new fileversion;
		strtok(templine,i); // read off YRACE
		fileversion = strval(strtok(templine,i)); // read off the file version
		if(fileversion > RACEFILE_VERSION) return -2; // Check if the race is made with a newer version of the racefile format
		CBuilder=strtok(templine,i); // read off RACEBUILDER
		ORacemode = strval(strtok(templine,i)); // read off racemode
		ORacelaps = strval(strtok(templine,i)); // read off amount of laps
		if(fileversion > 1)
		{
			Airrace = strval(strtok(templine,i));   // read off airrace
			CPsize = floatstr(strtok(templine,i));	// read off CP size
		}
		else // v1 file format, set to default
		{
			Airrace = 0;
			CPsize = 8.0;
		}
		OAirrace = Airrace;
		OCPsize = CPsize;
		Racemode=ORacemode; Racelaps=ORacelaps; //Allows changing the modes, but disables highscores if they've been changed.
		fread(f,templine,sizeof(templine)); // read off best race times
		i=0;
		for(new j=0;j<5;j++)
		{
			TopRacers[j]=strtok(templine,i);
			TopRacerTimes[j]=strval(strtok(templine,i));
		}
		fread(f,templine,sizeof(templine)); // read off best lap times
		i=0;
		for(new j=0;j<5;j++)
		{
			TopLappers[j]=strtok(templine,i);
			TopLapTimes[j]=strval(strtok(templine,i));
		}
	}
	else //Otherwise add the lines as checkpoints, the file is made with v0.1 (or older) version of the script.
	{
		LCurrentCheckpoint++;
		RaceCheckpoints[LCurrentCheckpoint][0] = floatstr(strtok(templine,i));
		RaceCheckpoints[LCurrentCheckpoint][1] = floatstr(strtok(templine,i));
		RaceCheckpoints[LCurrentCheckpoint][2] = floatstr(strtok(templine,i));
		Racemode=0; ORacemode=0; Racelaps=0; ORacelaps=0;   //Enables converting old files to new versions
		CPsize = 8.0; Airrace = 0;  			// v2 additions
		OCPsize = CPsize; OAirrace = Airrace;   // v2 additions
		CBuilder="UNKNOWN";
		for(new j;j<5;j++)
		{
			TopLappers[j]="A"; TopLapTimes[j]=0; TopRacers[j]="A"; TopRacerTimes[j]=0;
		}
	}
	while(fread(f,templine,sizeof(templine),false))
	{
		LCurrentCheckpoint++;
		i=0;
		RaceCheckpoints[LCurrentCheckpoint][0] = floatstr(strtok(templine,i));
		RaceCheckpoints[LCurrentCheckpoint][1] = floatstr(strtok(templine,i));
		RaceCheckpoints[LCurrentCheckpoint][2] = floatstr(strtok(templine,i));
		if(LCurrentCheckpoint >= 1)
		{
			RLenght+=Distance(RaceCheckpoints[LCurrentCheckpoint][0],RaceCheckpoints[LCurrentCheckpoint][1],
								RaceCheckpoints[LCurrentCheckpoint][2],RaceCheckpoints[LCurrentCheckpoint-1][0],
								RaceCheckpoints[LCurrentCheckpoint-1][1],RaceCheckpoints[LCurrentCheckpoint-1][2]);
		}
	}
	LLenght = RLenght + Distance(RaceCheckpoints[LCurrentCheckpoint][0],RaceCheckpoints[LCurrentCheckpoint][1],
								RaceCheckpoints[LCurrentCheckpoint][2],RaceCheckpoints[0][0],RaceCheckpoints[0][1],
								RaceCheckpoints[0][2]);
	fclose(f);
	return 1;
}
Line 24522:
Код:
		for(new j=0;j<5;j++)
		{
			TopRacers[j]=strtok(templine,i);
			TopRacerTimes[j]=strval(strtok(templine,i));
		}
Reply
#4

The code from those lines doesn't match. The size of the array is 64 and the loop only goes up to 5 (4 last valid) so the problem is LCurrentCheckpoint. Is the size of RaceCheckpoints array set as 64? Having more lines in file would cause this so increase the size for max race checkpoints.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)