Server crashes upon execution of this function
#1

Hello all,

I'm using a script which runs on MySQL R7. On my Linux Host, I use R7-2 static (as I couldn't find any R7 normal static). So the problem is that every time any command involving the vehicles, once executed, crashes the server with the following log:
Code:
[16:05:24] [debug] Server crashed while executing WCRP.amx
[16:05:24] [debug] AMX backtrace:
[16:05:24] [debug] #0 native mysql_function_query () from mysql.so
[16:05:24] [debug] #1 000c3894 in ?? (0, 400, 0, 0, 1157959188, -997329306, 1103949778, 1127587752, 0, 1) from WCRP.amx
[16:05:24] [debug] #2 000f492c in ?? (0, 228, 1, 0, 7463736) from WCRP.amx
[16:05:24] [debug] #3 002c2e04 in public OnDialogResponse (0, 228, 1, 0, 7463736) from WCRP.amx
[16:05:24] [debug] Native backtrace:
[16:05:24] [debug] #0 b73fd180 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[16:05:24] [debug] #1 b73f5064 in _ZN11CrashDetect20PrintNativeBacktraceERSoRKN2os7ContextE () from plugins/crashdetect.so
[16:05:24] [debug] #2 b73f5d64 in _ZN11CrashDetect20PrintNativeBacktraceERKN2os7ContextE () from plugins/crashdetect.so
[16:05:24] [debug] #3 b73f7cdb in _ZN11CrashDetect7OnCrashERKN2os7ContextE () from plugins/crashdetect.so
[16:05:24] [debug] #4 b73fc4d5 in ?? () from plugins/crashdetect.so
[16:05:24] [debug] #5 b7754600 in __kernel_rt_sigreturn () from linux-gate.so.1
[16:05:24] [debug] #6 b7754420 in __kernel_vsyscall () from linux-gate.so.1
[16:05:24] [debug] #7 b7453367 in gsignal () from /lib32/libc.so.6
[16:05:24] [debug] #8 b7454a23 in abort () from /lib32/libc.so.6
[16:05:24] [debug] #9 b7491798 in ?? () from /lib32/libc.so.6
[16:05:24] [debug] #10 b749780a in ?? () from /lib32/libc.so.6
[16:05:24] [debug] #11 b749845d in ?? () from /lib32/libc.so.6
[16:05:24] [debug] #12 b70c7779 in _ZN7Natives22n_mysql_query_callbackEP6tagAMXPi () from plugins/mysql.so
[16:05:24] [debug] #13 080950e4 in ?? () from ./samp03svr
[16:05:24] [debug] #14 b73f6ad3 in _ZN11CrashDetect17HandleAMXCallbackEiPiS0_ () from plugins/crashdetect.so
[16:05:24] [debug] #15 0071e338 in ?? () from *зq·Hеq·јmN	јmN	ЅqN	јmN	ЙqN	јuN	tr·
[16:05:24] [debug] Registers:
[16:05:24] [debug] EAX: 00000000 EBX: 00004c51 ECX: 00004c51 EDX: 00000006
[16:05:24] [debug] ESI: 0000004d EDI: b75ce000 EBP: bf827b48 ESP: bf827884
[16:05:24] [debug] EIP: b7754420 EFLAGS: 00000296
[16:05:24] [debug] Stack:
[16:05:24] [debug] ESP+00000000: bf827b48 00000006 00004c51 b7453367
[16:05:24] [debug] ESP+00000020: bf8278b4 00000000 00000000 00000000
[16:05:24] [debug] ESP+00000040: 00000000 00000000 00000000 00000000
[16:05:24] [debug] ESP+00000060: 00000000 00000000 00000000 00000000
[16:05:24] [debug] ESP+00000080: 00000000 00000000 00000000 00000000
[16:05:24] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000
[16:05:24] [debug] ESP+000000c0: 00000000 00000000 00000000 00000000
[16:05:24] [debug] ESP+000000e0: 00000000 00000000 00000000 00000000
[16:05:24] [debug] ESP+00000100: 00000000 00000000 00000000 00000000
[16:05:24] [debug] ESP+00000120: 00000000 00000000 00000000 00000003
[16:05:24] [debug] ESP+00000140: b75ce000 00000007 b7491798 00000006
[16:05:24] [debug] ESP+00000160: 00000000 00000000 00000000 b75899b0
[16:05:24] [debug] ESP+00000180: 00000003 b7589b50 00000020 b75899c5
[16:05:24] [debug] ESP+000001a0: 00000005 00000000 00000000 00000000
[16:05:24] [debug] ESP+000001c0: 00000005 bf827a60 b7498b1c 00000000
[16:05:24] [debug] ESP+000001e0: 00000008 bf827a80 00000000 00000000
[16:05:24] [debug] ESP+00000200: 00000004 bf827aa0 00000003 00000028
[16:05:24] [debug] ESP+00000220: 00000020 bf827ac0 0000006e 00000000
[16:05:24] [debug] ESP+00000240: 00000003 bf827ae0 b75ce000 b75ce420
[16:05:24] [debug] ESP+00000260: 0000000b bf827b00 bf827ca8 00000902
[16:05:24] [debug] ESP+00000280: 0000000e 00000000 b748a7a2 b7681017
[16:05:24] [debug] ESP+000002a0: 0000004d 0000004d 00000007 b76e4e57
[16:05:24] [debug] ESP+000002c0: bf829ba0 b75ce420 b749780a 00000001
[16:05:24] [debug] ESP+000002e0: 00000000 00000000 b7589b50 00000000
[16:05:24] [debug] ESP+00000300: 092d2f50 00000010 b749845d 092d2f50
[16:05:24] [debug] ESP+00000320: b46daaec b76e5789 b7720000 bf827c54
[16:05:24] [debug] ESP+00000340: 00000000 00000000 092d2f50 0000000c
[16:05:24] [debug] ESP+00000360: b71ae29d b76e57f9 092d2f50 bf827c94
[16:05:24] [debug] ESP+00000380: 092d2f50 0000000c c091becc 00000044
[16:05:24] [debug] ESP+000003a0: 00000005 0000007c 091311f8 09510cb0
[16:05:24] [debug] ESP+000003c0: 0950e674 0950e68c 094bcfa4 094abb1c
[16:05:24] [debug] ESP+000003e0: 081a199c 081a199c 081a199c 081a199c
[16:05:24] [debug] Loaded modules:
[16:05:24] [debug] 00000000 - 00187dc3 samp03svr
[16:05:24] [debug] b7756000 - b7756704 linux-gate.so.1
[16:05:24] [debug] b7744000 - b774681b /lib32/libdl.so.2
[16:05:24] [debug] b7728000 - b7742d2b /lib32/libpthread.so.0
[16:05:24] [debug] b7636000 - b772fce6 /usr/lib32/libstdc++.so.6
[16:05:24] [debug] b75f0000 - b7634b97 /lib32/libm.so.6
[16:05:24] [debug] b75d3000 - b75ef3c4 /usr/lib32/libgcc_s.so.1
[16:05:24] [debug] b7425000 - b75da237 /lib32/libc.so.6
[16:05:24] [debug] b7755000 - b77764a0 /lib/ld-linux.so.2
[16:05:24] [debug] b73df000 - b7421ac4 plugins/crashdetect.so
[16:05:24] [debug] b7309000 - b73df7f0 plugins/streamer.so
[16:05:24] [debug] b72f7000 - b72fe09f /lib32/librt.so.1
[16:05:24] [debug] b7033000 - b72fa07c plugins/mysql.so
[16:05:24] [debug] b7026000 - b70313ef /lib32/libnss_files.so.2
[16:05:24] [debug] b65a1000 - b6625561 plugins/audio.so
[16:05:24] [debug] b6580000 - b65a01ed plugins/dns.so
[16:05:24] [debug] b6509000 - b657fb5d plugins/irc.so
[16:05:24] [debug] b5afb000 - b5b0757c plugins/sscanf.so
[16:05:24] [debug] b774e000 - b774ff70 plugins/nativechecker.so
[16:05:24] [debug] b2f13000 - b2f1797b /lib32/libnss_dns.so.2
[16:05:24] [debug] b2de8000 - b2e002fb /lib32/libresolv.so.2
A typical example of a command which crashes the server is /createplayercar:
Code:
	CreatePlayerCar(playa, model, c1, c2, X, Y, Z, A, ELockType:lock);
		new string[128];
		format(string, sizeof(string), "* Vehicle successfully created.");
		SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
		format(string, sizeof(string), "An admin added a %s to your cars.", VehiclesName[model-400]);
		SendClientMessage(playa, X11_ORANGE, string);
		if(GetPVarInt(playerid, "AdminHidden") != 2) {
			format(string, sizeof(string), "* %s has given %s a %s",GetPlayerNameEx(playerid, ENameType_AccountName), GetPlayerNameEx(playa, ENameType_CharName),  VehiclesName[model-400]);
			ABroadcast(X11_YELLOW, string, EAdminFlags_AdminManage);
		}
	} else {
		SendClientMessage(playerid, X11_WHITE, "USAGE: /createplayercar [playerid/name] [model] [colour1] [colour2] [locktype]");
		SendClientMessage(playerid, X11_WHITE, "Lock types: 0 = Default, 1 = Simple, 2 = remote, 3 = remote, 4 = advanced, 5 = satelitte, 6 = titanium laser, 7 = bio");
	}
	return 1;
}
Code:
CreatePlayerCar(playerid, model, c1, c2, Float:X, Float:Y, Float:Z, Float:Angle, ELockType:locktype, putincar = 0) {
	query[0] = 0;//[256];
	format(query,sizeof(query),"INSERT INTO `playercars` (`owner`,`model`,`X`,`Y`,`Z`,`Angle`,`colour1`,`colour2`,`locktype`) VALUES (%d,%d,%f,%f,%f,%f,%d,%d,%d)",GetPVarInt(playerid, "CharID"),model,X,Y,Z,Angle,c1,c2,_:locktype);
	mysql_function_query(g_mysql_handle, query, true, "onPlayerVehicleCreate", "ddddffffdd",playerid,model,c1,c2,X,Y,Z,Angle,_:locktype,putincar);
	return 0;
}
Similarly, another example of a command which crashes the server is /createfamilycar:
Code:
	new Float:X, Float:Y, Float:Z, Float:Angle;
		GetPlayerPos(playerid, X, Y, Z);
		GetPlayerFacingAngle(playerid, Angle);
		famid = SQLIDFromFamily(famid);
		CreateFamilyCar(famid, model, c1, c2, ELockType:lock, X, Y, Z, Angle);
	} else {
		SendClientMessage(playerid, X11_WHITE, "USAGE: /createfamilycar [familyid] [model] [c1] [c2] [lock]");
	}
	return 1;
}
Code:
CreateFamilyCar(famid, model, c1, c2, ELockType:lock, Float:X, Float:Y, Float:Z, Float:Angle) {
	#pragma unused lock
	query[0] = 0;//[256];
	format(query, sizeof(query), "INSERT INTO `familycars` (`model`,`colour1`,`colour2`,`X`,`Y`,`Z`,`Angle`,`owner`) VALUES (%d,%d,%d,%f,%f,%f,%f,%d)",model,c1,c2,X,Y,Z,Angle,famid);
	mysql_function_query(g_mysql_handle, query, true, "onCreateFamilyVehicle", "ddddffff", famid, model, c1, c2, X, Y, Z, Angle);
}
These errors do not occur in Windows Local host where I use the normal R7 plugin. However, these errors do occur in Linux where I use the R7-2 STATIC. Any help will be appreciated!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)