server crash
#1

pawn Код:
[16:54:37] [debug] Server crashed while executing rp.amx
[16:54:37] [debug] AMX backtrace:
[16:54:37] [debug] #0 0017ff04 in PlayerUpdateListener (playerid=44) at C:\Users\Filip\Desktop\SAMP 0.3Z\TRUNK\payphone\rp.pwn:32226
[16:54:37] [debug] #1 000b26bc in public CrashListener () at C:\Users\Filip\Desktop\SAMP 0.3Z\TRUNK\payphone\rp.pwn:9532
[16:54:37] [debug] System backtrace:
[16:54:38] [debug] #0 f6b7035b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[16:54:38] [debug] #1 f6b69389 in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[16:54:38] [debug] #2 f6b6b8ed in _ZN11crashdetect11OnExceptionEPv () from plugins/crashdetect.so
[16:54:38] [debug] #3 f6b6fe68 in ?? () from plugins/crashdetect.so
[16:54:38] [debug] #4 f7747410 in ?? ()
[16:54:38] [debug] #5 080c9e97 in ?? () from /home/gsp_1327/93.119.26.14-7777/samp03svr
[16:54:38] [debug] #6 080cbca5 in ?? () from /home/gsp_1327/93.119.26.14-7777/samp03svr
[16:54:38] [debug] #7 f6b4b0e6 in ?? () from plugins/sscanf.so
[16:54:38] [debug] #8 f6b7219f in amx_Exec () from plugins/crashdetect.so
[16:54:38] [debug] #9 f6b6bdab in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[16:54:38] [debug] #10 f6b6e457 in ?? () from plugins/crashdetect.so
[16:54:38] [debug] #11 080dc3f5 in ?? () from /home/gsp_1327/93.119.26.14-7777/samp03svr
[16:54:38] [debug] #12 080b5efb in ?? () from /home/gsp_1327/93.119.26.14-7777/samp03svr
[16:54:38] [debug] #13 080b16d3 in ?? () from /home/gsp_1327/93.119.26.14-7777/samp03svr
[16:54:38] [debug] #14 f7486e46 in __libc_start_main () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[16:54:38] [debug] #15 0804b521 in ?? () from /home/gsp_1327/93.119.26.14-7777/samp03svr
pawn Код:
else if(key == KEY_SPRINT)
        {

            active_character[playerid] = character_offset[playerid];
            choosing_character[playerid] = false;
     //error line SetPlayerName(playerid,CharacterInfo[playerid][active_character[playerid]][cName]);
            character_chosen[playerid] = true;
            ProcessSpawn(playerid);
            LoadNotes(playerid);
            LoadInventory(playerid);
            LoadRingtone(playerid);
            //format(accent[playerid],16,"%s",CharacterInfo[playerid][active_character[playerid]][cAccent]);
            SetPlayerHealth(playerid,CharacterInfo[playerid][active_character[playerid]][cHealth]);
            SetPlayerArmour(playerid,CharacterInfo[playerid][active_character[playerid]][cArmor]);
            character_offset[playerid] = 0;
        }
Reply
#2

That's the 32226 line?
pawn Код:
SetPlayerName(playerid,CharacterInfo[playerid][active_character[playerid]][cName]);
SetPlayerName crashes the server if the new name is null/empty but it doesn't show that the native crashed the server.
Reply
#3

Under my eyes, it seems like the generic bug of not checking if the player is online, or not.
Try to place ontop this:
pawn Код:
if(!IsPlayerConnected(playerid)) return 0;
This should work most of the time, I encourted this too.
You can understand it by your own:
Код:
[16:54:37] [debug] #0 0017ff04 in PlayerUpdateListener (playerid=44)
-- Okay! So it crashed on PlayerUpdateListener, under playerid 44. But wait? Do we even have an id 44 connected? (After checking again)
- No! Script is getting runned over and over when the player isn't even online! It tries to run a native that requires a player to be online for.
- Yes? Seems like we have a bug of a null string attempting to change the active MPPool of the server, resulting in a nusty crash.
Reply
#4

and how to fix this problem ?
Hawk: Yes id 44 it's connected.
Reply
#5

i read some problems with setplayer name and i found something ... it's this correct ? what i make ?

pawn Код:
else if(key == KEY_SPRINT)
        {

            active_character[playerid] = character_offset[playerid];
            choosing_character[playerid] = false;
            if(!isnull(CharacterInfo[playerid][active_character[playerid]][cName])) SetPlayerName(playerid,CharacterInfo[playerid][active_character[playerid]][cName]);
            character_chosen[playerid] = true;
            ProcessSpawn(playerid);
            LoadNotes(playerid);
            LoadInventory(playerid);
            LoadRingtone(playerid);
            //format(accent[playerid],16,"%s",CharacterInfo[playerid][active_character[playerid]][cAccent]);
            SetPlayerHealth(playerid,CharacterInfo[playerid][active_character[playerid]][cHealth]);
            SetPlayerArmour(playerid,CharacterInfo[playerid][active_character[playerid]][cArmor]);
            character_offset[playerid] = 0;
        }
Reply
#6

It's correct, if what I said is the actual reason of crashing the server, that prevents it from happening again.
Reply
#7

Ok , thank's !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)