Server Crashes due to some weird reasons
#1

Alright, Server working, nothing is wrong, I guess after performing a command or something, A crash took place into the server, Logs..

Quote:

[22:57:53] [debug] Server crashed while executing WCRP.amx
[22:57:53] [debug] AMX backtrace:
[22:57:53] [debug] #0 native mysql_function_query () from mysql.so
[22:57:53] [debug] #1 000d1af8 in ?? (1, 411, 0, 0, 1, 1154205843, -997562389, 1103052800, 1132793531) from WCRP.amx
[22:57:53] [debug] #2 000ba450 in public @_yCcreatefamilycar (0, 7050512, 0) from WCRP.amx
[22:57:53] [debug] #3 000ba044 in public @yC_createfamilycar (0, 7050512, 0, 0) from WCRP.amx
[22:57:53] [debug] #4 native CallRemoteFunction () from samp03svr
[22:57:53] [debug] #5 0002da18 in ?? (0, 7050396, 0) from WCRP.amx
[22:57:53] [debug] #6 0002d2e4 in ?? (0, 7050396) from WCRP.amx
[22:57:53] [debug] #7 000184cc in public OnPlayerCommandText (0, 7050396) from WCRP.amx
[22:57:53] [debug] Native backtrace:
[22:57:53] [debug] #0 f7449180 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[22:57:53] [debug] #1 f7441064 in _ZN11CrashDetect20PrintNativeBacktraceERSoRKN2os7C ontextE () from plugins/crashdetect.so
[22:57:53] [debug] #2 f7441d64 in _ZN11CrashDetect20PrintNativeBacktraceERKN2os7Cont extE () from plugins/crashdetect.so
[22:57:53] [debug] #3 f7443cdb in _ZN11CrashDetect7OnCrashERKN2os7ContextE () from plugins/crashdetect.so
[22:57:53] [debug] #4 f74484d5 in ?? () from plugins/crashdetect.so
[22:57:53] [debug] #5 f77a3d50 in __kernel_rt_sigreturn () from linux-gate.so.1
[22:57:53] [debug] #6 f77a3d70 in __kernel_vsyscall () from linux-gate.so.1
[22:57:53] [debug] #7 f74a0367 in gsignal () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[22:57:53] [debug] #8 f74a1a23 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[22:57:53] [debug] #9 f74de778 in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[22:57:53] [debug] #10 f74e47ea in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[22:57:53] [debug] #11 f74e543d in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[22:57:53] [debug] #12 f7118779 in _ZN7Natives22n_mysql_query_callbackEP6tagAMXPi () from plugins/mysql.so
[22:57:53] [debug] #13 080950e4 in ?? () from ./samp03svr
[22:57:53] [debug] #14 f7442ad3 in _ZN11CrashDetect17HandleAMXCallbackEiPiS0_ () from plugins/crashdetect.so
[22:57:53] [debug] #15 0000000b in ?? () from *§vчHҐvчУL
[22:57:53] [debug] УL
[22:57:53] [debug] ЧL
[22:57:53] [debug] УL
[22:57:53] [debug] њЧL
[22:57:53] [debug] ЫL
[22:57:53] [debug] 4wч
[22:57:53] [debug] Registers:
[22:57:53] [debug] EAX: 00000000 EBX: 00007a34 ECX: 00007a34 EDX: 00000006
[22:57:53] [debug] ESI: 0000004d EDI: f761b000 EBP: ffeb3bf8 ESP: ffeb3934
[22:57:53] [debug] EIP: f77a3d70 EFLAGS: 00000296
[22:57:53] [debug] Stack:
[22:57:53] [debug] ESP+00000000: ffeb3bf8 00000006 00007a34 f74a0367
[22:57:53] [debug] ESP+00000020: ffeb3964 00000000 00000000 00000000
[22:57:53] [debug] ESP+00000040: 00000000 00000000 00000000 00000000
[22:57:53] [debug] ESP+00000060: 00000000 00000000 00000000 00000000
[22:57:53] [debug] ESP+00000080: 00000000 00000000 00000000 00000000
[22:57:53] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000
[22:57:53] [debug] ESP+000000c0: 00000000 00000000 00000000 00000000
[22:57:53] [debug] ESP+000000e0: 00000000 00000000 00000000 00000000
[22:57:53] [debug] ESP+00000100: 00000000 00000000 00000000 00000000
[22:57:53] [debug] ESP+00000120: 00000000 00000000 00000000 00000003
[22:57:53] [debug] ESP+00000140: f761b000 00000007 f74de778 0000000c
[22:57:53] [debug] ESP+00000160: 00000000 00000000 00000000 f75d69bc
[22:57:53] [debug] ESP+00000180: 00000003 f75d6b5c 00000020 f75d69d1
[22:57:53] [debug] ESP+000001a0: 00000005 00000000 00000000 00000000
[22:57:53] [debug] ESP+000001c0: 00000005 ffeb3b10 f74e5afc 00000000
[22:57:53] [debug] ESP+000001e0: 00000008 ffeb3b30 00000000 00000000
[22:57:53] [debug] ESP+00000200: 00000004 ffeb3b50 f751ba37 60000000
[22:57:53] [debug] ESP+00000220: 00000020 ffeb3b70 00000000 00000000
[22:57:53] [debug] ESP+00000240: 00000003 ffeb3b90 f761b000 f761b420
[22:57:53] [debug] ESP+00000260: 0000000b ffeb3bb0 ffeb3d58 00000902
[22:57:53] [debug] ESP+00000280: 0000000e 00000000 f74d7782 f76cd017
[22:57:53] [debug] ESP+000002a0: 0000004d 0000004d 00000007 f7730e57
[22:57:53] [debug] ESP+000002c0: ffeb5b3f f761b420 f74e47ea 00000001
[22:57:53] [debug] ESP+000002e0: 00000000 ffeb3c48 f75d6b5c f7363a0c
[22:57:53] [debug] ESP+00000300: 0a34f448 00000010 f74e543d 0a34f448
[22:57:53] [debug] ESP+00000320: f5627690 f7731789 f776c000 ffeb3d04
[22:57:53] [debug] ESP+00000340: 00000000 00000000 0a34f448 0000000c
[22:57:53] [debug] ESP+00000360: f71ff29d f77317f9 0a34f448 ffeb3d44
[22:57:53] [debug] ESP+00000380: 0a34f448 0000000c c0914cfd ffeb3d00
[22:57:53] [debug] ESP+000003a0: 00000005 00000000 00000000 09e255a0
[22:57:53] [debug] ESP+000003c0: 0a69d064 0a809e0c 0a44a6ec 0a2c9f34
[22:57:53] [debug] ESP+000003e0: 081a199c 081a199c 081a199c 081a199c
[22:57:53] [debug] Loaded modules:
[22:57:53] [debug] 00000000 - 00187dc3 samp03svr
[22:57:53] [debug] f77a3000 - f77a3e96 linux-gate.so.1
[22:57:53] [debug] f7791000 - f779381b /lib/i386-linux-gnu/i686/cmov/libdl.so.2
[22:57:53] [debug] f7775000 - f778fd2b /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
[22:57:53] [debug] f7682000 - f777bce6 /usr/lib32/libstdc++.so.6
[22:57:53] [debug] f763c000 - f7680b43 /lib/i386-linux-gnu/i686/cmov/libm.so.6
[22:57:53] [debug] f761f000 - f763b3c4 /lib/i386-linux-gnu/libgcc_s.so.1
[22:57:53] [debug] f7472000 - f762722f /lib/i386-linux-gnu/i686/cmov/libc.so.6
[22:57:53] [debug] f77a6000 - f77c6d6c /lib/ld-linux.so.2
[22:57:53] [debug] f742b000 - f746dac4 plugins/crashdetect.so
[22:57:53] [debug] f7385000 - f742b14c plugins/streamer.so
[22:57:53] [debug] f7797000 - f779e09f /lib/i386-linux-gnu/i686/cmov/librt.so.1
[22:57:53] [debug] f7364000 - f73841ed plugins/dns.so
[22:57:53] [debug] f7354000 - f73631d4 plugins/sscanf.so
[22:57:53] [debug] f7348000 - f7351918 plugins/Whirlpool.so
[22:57:53] [debug] f7084000 - f734b07c plugins/mysql.so
[22:57:53] [debug] f706c000 - f70773ef /lib/i386-linux-gnu/i686/cmov/libnss_files.so.2
[22:57:53] [debug] f7080000 - f7081f70 plugins/nativechecker.so
[22:57:53] [debug] f7079000 - f707d97b /lib/i386-linux-gnu/i686/cmov/libnss_dns.so.2
[22:57:53] [debug] f67fa000 - f68122fb /lib/i386-linux-gnu/i686/cmov/libresolv.so.2

Any solution?
Reply
#2

Show the function Ccreatefamilycar.
Reply
#3

PHP Code:
YCMD:createfamilycar(playeridparams[], help) {
    if(
help) {
        
SendClientMessage(playeridX11_WHITE"Creates a family car");
        return 
1;
    }
    new 
famidmodelc1c2lock;
    if (!
sscanf(params"ddD(0)D(0)D(0)"famidmodelc1c2lock))
    {
        if(!
IsValidFamily(famid)) {
            
SendClientMessage(playeridCOLOR_LIGHTRED"Invalid Family");
            return 
1;
        }
        if(
model 400 || model 611) {
            
SendClientMessage(playeridCOLOR_LIGHTRED"Invalid Vehicle!");
            return 
1;
        }
        if(
c1 || c1 255 || c2 || c2 255) {
            
SendClientMessage(playeridCOLOR_LIGHTRED"Invalid Model!");
            return 
1;
        }    
        new 
Float:XFloat:YFloat:ZFloat:Angle;
        
GetPlayerPos(playeridXYZ);
        
GetPlayerFacingAngle(playeridAngle);
        
famid SQLIDFromFamily(famid);
        
CreateFamilyCar(famidmodelc1c2ELockType:lockXYZAngle);
    } else {
        
SendClientMessage(playeridX11_WHITE"USAGE: /createfamilycar [familyid] [model] [c1] [c2] [lock]");
    }
    return 
1;

and this is CreateFamilyCar stock..

PHP Code:
CreateFamilyCar(famidmodelc1c2ELockType:lockFloat:XFloat:YFloat:ZFloat:Angle) {
    
#pragma unused lock
    
query[0] = 0;//[256];
    
format(querysizeof(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_handlequerytrue"onCreateFamilyVehicle""ddddffff"famidmodelc1c2XYZAngle);

Reply
#4

Why don't you use mysql_tquery?
Reply
#5

I'm using BlueG's Mysql R7, I'm looking forward to convert to the new one but It will take time and all of that, So I just want to fix the bugs in the script, Then upgrade the MySQL to the newest

EDIT: By the way, That crash also happens when performing the cmd "/createplayercar"

CMD:

PHP Code:
YCMD:createplayercar(playeridparams[], help) {
    new 
model,c1,c2,lock;
    new 
playa;
    if(
help) {
        
SendClientMessage(playeridX11_WHITE"Creates a car for a player");
        return 
1;
    }
    if (!
sscanf(params"k<playerLookup_acc>dddd"playa,modelc1c2lock))
    {
        if(!
IsPlayerConnectEx(playa)) {
            
SendClientMessage(playeridX11_WHITE"Error: player not connected");
            return 
1;
        }
        new 
EAdminFlags:aflags EAdminFlags:GetPVarInt(playerid"AdminFlags");
        if(
playerid == playa) {
            if(~
aflags EAdminFlags_CanRefundSelf) {
                
SendClientMessage(playeridX11_TOMATO_2"You cannot refund yourself!");
                return 
1;
            }
        }
        new 
Float:X,Float:Y,Float:Z,Float:A;
        
GetPlayerPos(playeridXYZ);
        
GetPlayerFacingAngle(playeridA);
        if(
c1 || c1 255 || c2 || c2 255)
        {
            
SendClientMessage(playeridX11_RED2"   Color ID can't be below 0 or above 255!");
            return 
1;
        }
        if(
lock || lock 7)
        {
            
SendClientMessage(playeridX11_RED2"   The lock ID can't be below 0 or above 7!");
            return 
1;
        }
        if(!
isValidModel(model)) {
            
SendClientMessage(playeridX11_RED2"   Invalid Vehicle Model");
            return 
1;
        }
        
CreatePlayerCar(playamodelc1c2XYZAELockType:lock);
        new 
string[128];
        
format(stringsizeof(string), "* Vehicle successfully created.");
        
SendClientMessage(playeridCOLOR_LIGHTGREENstring);
        
format(stringsizeof(string), "An admin added a %s to your cars."VehiclesName[model-400]);
        
SendClientMessage(playaX11_ORANGEstring);
        if(
GetPVarInt(playerid"AdminHidden") != 2) {
            
format(stringsizeof(string), "* %s has given %s a %s",GetPlayerNameEx(playeridENameType_AccountName), GetPlayerNameEx(playaENameType_CharName),  VehiclesName[model-400]);
            
ABroadcast(X11_YELLOWstringEAdminFlags_AdminManage);
        }
    } else {
        
SendClientMessage(playeridX11_WHITE"USAGE: /createplayercar [playerid/name] [model] [colour1] [colour2] [locktype]");
        
SendClientMessage(playeridX11_WHITE"Lock types: 0 = Default, 1 = Simple, 2 = remote, 3 = remote, 4 = advanced, 5 = satelitte, 6 = titanium laser, 7 = bio");
    }
    return 
1;

CreatePlayerCar stock.

PHP Code:
CreatePlayerCar(playeridmodelc1c2Float:XFloat:YFloat:ZFloat:AngleELockType:locktypeputincar 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_handlequerytrue"onPlayerVehicleCreate""ddddffffdd",playerid,model,c1,c2,X,Y,Z,Angle,_:locktype,putincar);
    return 
0;

Reply
#6

Quote:
Originally Posted by JasonRiggs
View Post
I'm using BlueG's Mysql R7, I'm looking forward to convert to the new one but It will take time and all of that, So I just want to fix the bugs in the script, Then upgrade the MySQL to the newest
Mysql R7 is outdated
Reply
#7

Quote:
Originally Posted by iLearner
View Post
Why don't you use mysql_tquery?
There is no need to use tquery is this case. He is not expecting any results from this. You should only be using threaded queries if you expect a result.

However yes mysql r7 is outdated.
Reply
#8

So? No solutions except upgrading to the latest plugin?? However it is outdated or not, The server is working using it, And totally all the functions are working except the cars function..
Reply
#9

Quote:
Originally Posted by HoussemGaming
View Post
Mysql R7 is outdated
Quote:
Originally Posted by azzerking
View Post
However yes mysql r7 is outdated.
No fucking shit, but unless you are willing to update the damn script for him, or at least help him do so without linking up a tutorial saying 'here you go' and leaving him to it, I'd suggest you don't post.



OP: Were the commands that you're using, added recently? Were they actually the same as when you got the gamemode, and did they ever really work?
Reply
#10

They are from the actual gamemode, Only the things related to creating a car for a family/faction/player causes server crash, none other..
Reply
#11

Maybe if you've got other updated includes, they need to be rolled back to the release versions setup.

Are you sure the DB got imported correctly?
Reply
#12

Hi OP:
-What i suggest you to do to track down /What/ causes this, is to debug the code.
Createplayercar is not a large snippet of code, and could lead us in some direction with debug messages added to it.
Here is an example, look at the prints. When the server crashes, it won't handle the prints, so that way you can locate where it stops exactly.

Can you try something like this, and come back with the results?
PHP Code:
YCMD:createplayercar(playeridparams[], help) { 
    new 
model,c1,c2,lock
    new 
playa
    print(
"debug message 1"); //prints to log 
    
if(help) { 
        
SendClientMessage(playeridX11_WHITE"Creates a car for a player"); 
        return 
1
    } 
    if (!
sscanf(params"k<playerLookup_acc>dddd"playa,modelc1c2lock)) 
    { 
        if(!
IsPlayerConnectEx(playa)) { 
            
SendClientMessage(playeridX11_WHITE"Error: player not connected"); 
            return 
1
        } 
        print(
"debug message 2"// and so on.
        
new EAdminFlags:aflags EAdminFlags:GetPVarInt(playerid"AdminFlags"); 
        if(
playerid == playa) { 
            if(~
aflags EAdminFlags_CanRefundSelf) { 
                
SendClientMessage(playeridX11_TOMATO_2"You cannot refund yourself!"); 
                return 
1
            } 
        } 
        new 
Float:X,Float:Y,Float:Z,Float:A
        
GetPlayerPos(playeridXYZ); 
        print(
"debug message 3"//
        
GetPlayerFacingAngle(playeridA); 
        if(
c1 || c1 255 || c2 || c2 255
        { 
            
SendClientMessage(playeridX11_RED2"   Color ID can't be below 0 or above 255!"); 
            return 
1
        } 
        if(
lock || lock 7
        { 
            
SendClientMessage(playeridX11_RED2"   The lock ID can't be below 0 or above 7!"); 
            return 
1
        }
        print(
"debug message 4"//
        
if(!isValidModel(model)) { 
            
SendClientMessage(playeridX11_RED2"   Invalid Vehicle Model"); 
            return 
1
        } 
        print(
"debug message 5"//
        
CreatePlayerCar(playamodelc1c2XYZAELockType:lock); 
        print(
"debug message 6"//for example, if createplayercar above caused the crash, this message will not appear in the log.
        
new string[128]; 
        
format(stringsizeof(string), "* Vehicle successfully created."); 
        
SendClientMessage(playeridCOLOR_LIGHTGREENstring); 
        
format(stringsizeof(string), "An admin added a %s to your cars."VehiclesName[model-400]); 
        
SendClientMessage(playaX11_ORANGEstring); 
        if(
GetPVarInt(playerid"AdminHidden") != 2) { 
            
format(stringsizeof(string), "* %s has given %s a %s",GetPlayerNameEx(playeridENameType_AccountName), GetPlayerNameEx(playaENameType_CharName),  VehiclesName[model-400]);
        print(
"debug message 7"// 
            
ABroadcast(X11_YELLOWstringEAdminFlags_AdminManage); 
        } 
    } else { 
        
SendClientMessage(playeridX11_WHITE"USAGE: /createplayercar [playerid/name] [model] [colour1] [colour2] [locktype]"); 
        
SendClientMessage(playeridX11_WHITE"Lock types: 0 = Default, 1 = Simple, 2 = remote, 3 = remote, 4 = advanced, 5 = satelitte, 6 = titanium laser, 7 = bio"); 
    } 
    return 
1

Reply
#13

Using these debug messages, I've found out that the line "CreatePlayerCar" just before "debug message 6" and the function "CreatePlayerCar" is listed above at the post..
Reply
#14

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)