Public Server crash - Problems: OnPlayerUpdate, GlobalTimer1Sec, OnPlayerDeath
#1

Okay, so im getting my server offline after some period of time. I put crashdetector on panel of my samp server and here are the next errors i cut from server_log.txt:

Код:
[08:08:33] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[08:08:34] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[08:08:36] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[08:08:38] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[08:10:20] [debug] Run time error 4: "Array index out of bounds"
[08:10:20] [debug]  Accessing element at index 65535 past array upper bound 499
[08:10:20] [debug] AMX backtrace:
[08:10:20] [debug] #0 00027ba8 in ?? (0x00000005, 0x0000ffff, 0x000000ff) from novo.amx
[08:10:20] [debug] #1 0000658c in public OnPlayerDeath (0x00000005, 0x0000ffff, 0x000000ff) from novo.amx

[11:33:11] [debug] AMX backtrace:
[11:33:11] [debug] #0 000439f0 in ?? (0x00000018) from novo.amx
[11:33:11] [debug] #1 00008d70 in public OnPlayerUpdate (0x00000018) from novo.amx
[11:33:11] [debug] Run time error 4: "Array index out of bounds"
[11:33:11] [debug]  Accessing element at index 24 past array upper bound 23

[11:36:36] [debug] AMX backtrace:
[11:36:36] [debug] #0 00055ff4 in public GlobalTimer1Sec () from novo.amx
[11:36:37] [debug] Run time error 4: "Array index out of bounds"
[11:36:37] [debug]  Accessing element at index 24 past array upper bound 23
[21:55:35] [debug] AMX backtrace:
[21:55:35] [debug] #0 000439f0 in ?? (0x0000002a) from novo.amx
[21:55:35] [debug] #1 00008d70 in public OnPlayerUpdate (0x0000002a) from novo.amx
[21:55:35] [debug] Run time error 4: "Array index out of bounds"
[21:55:35] [debug]  Accessing element at index 29 past array upper bound 23
[21:55:35] [debug] AMX backtrace:
[21:55:35] [debug] #0 000439f0 in ?? (0x0000001d) from novo.amx
[21:55:35] [debug] #1 00008d70 in public OnPlayerUpdate (0x0000001d) from novo.amx
[21:55:35] [debug] Run time error 4: "Array index out of bounds"
[21:55:35] [debug]  Accessing element at index 41 past array upper bound 23
[21:55:35] [debug] AMX backtrace:
[21:55:35] [debug] #0 000439f0 in ?? (0x00000029) from novo.amx
[21:55:35] [debug] #1 00008d70 in public OnPlayerUpdate (0x00000029) from novo.amx
[21:55:35] [debug] Run time error 4: "Array index out of bounds"
[21:55:35] [debug]  Accessing element at index 24 past array upper bound 23
[21:55:35] [debug] AMX backtrace:
[21:55:35] [debug] #0 000439f0 in ?? (0x00000018) from novo.amx
[21:55:35] [debug] #1 00008d70 in public OnPlayerUpdate (0x00000018) from novo.amx
[21:55:35] [debug] Run time error 4: "Array index out of bounds"
[21:55:35] [debug]  Accessing element at index 26 past array upper bound 23
[21:55:35] [debug] AMX backtrace:
[21:55:35] [debug] #0 000439f0 in ?? (0x0000001a) from novo.amx
[21:55:35] [debug] #1 00008d70 in public OnPlayerUpdate (0x0000001a) from novo.amx
[21:55:35] [debug] Run time error 4: "Array index out of bounds"
[21:55:35] [debug]  Accessing element at index 29 past array upper bound 23
[21:55:35] [debug] AMX backtrace:
[21:55:35] [debug] #0 000439f0 in ?? (0x0000001d) from novo.amx
[21:55:35] [debug] #1 00008d70 in public OnPlayerUpdate (0x0000001d) from novo.amx
[21:55:35] [debug] Run time error 4: "Array index out of bounds"
[21:55:35] [debug]  Accessing element at index 34 past array upper bound 23
[21:55:35] [debug] AMX backtrace:
[21:55:35] [debug] #0 000439f0 in ?? (0x00000022) from novo.amx
[21:55:35] [debug] #1 00008d70 in public OnPlayerUpdate (0x00000022) from novo.amx
[21:55:35] [debug] Run time error 4: "Array index out of bounds"
[21:55:35] [debug]  Accessing element at index 36 past array upper bound 23

[11:36:53] [debug] Server crashed while executing novo.amx
My OnPlayerUpdate - http://pastebin.com/fGm73RQH
My GlobalTimer1Sec - http://pastebin.com/QLA0z7ya
My OnPlayerDeath - http://pastebin.com/gkC02sHf


I updated all plugins, i try to make code simple as i can. But my public server still crash. I need help as fast as possible so my players dont run away

And i have one question, does all these errors can affect on not showing "removebuildingforplayer..", or saving stats, its like my whole server gets epp... Please help
Reply
#2

You need check in OnPlayerDeath if killerid equal INVALID_PLAYER_ID!
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    Stvariizdeadha(playerid);
if(killerid == INVALID_PLAYER_ID) return 1;
    PlayerInfo[playerid][pDeaths] += 1;
    PlayerInfo[killerid][pKills] += 1;

//code
Reply
#3

I deleted this AFK system and now it doesnt crash but after some time i have another problems:

Код:
[20:40:59] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[20:41:00] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[20:41:00] [debug] Run time error 20: "Invalid index parameter (bad entry point)"
[20:41:00] [debug] Run time error 4: "Array index out of bounds"
[20:41:00] [debug]  Accessing element at negative index -1
[20:41:00] [debug] AMX backtrace:
[20:41:00] [debug] #0 0000e378 in ?? (0xffffffff) from novo.amx
[20:41:00] [debug] #1 00064188 in public SavePlayer (0x00000009) from novo.amx
[20:41:00] [debug] #2 000e1dbc in public @_yCaccount (0x00000009, 0x011c0f40, 0x00000000) from novo.amx
[20:41:00] [debug] #3 000e1b74 in public @yC_account (0x00000009, 0x011c0f40, 0x00000000, 0x00000000) from novo.amx
[20:41:00] [debug] #4 native CallRemoteFunction () [080df570] from samp03svr
[20:41:00] [debug] #5 00019c90 in ?? (0x00000009, 0x011c0f04, 0x00000000) from novo.amx
[20:41:00] [debug] #6 0001954c in ?? (0x00000009, 0x011c0f04) from novo.amx
[20:41:00] [debug] #7 00006ac8 in public OnPlayerCommandText (0x00000009, 0x011c0f04) from novo.amx
[20:41:00] [debug] Run time error 4: "Array index out of bounds"
[20:41:00] [debug]  Accessing element at negative index -1
[20:41:00] [debug] AMX backtrace:
[20:41:00] [debug] #0 0000e378 in ?? (0xffffffff) from novo.amx
[20:41:00] [debug] #1 00065e04 in ?? (0x0000000b) from novo.amx
[20:41:00] [debug] #2 000b0300 in ?? (0x0000000b, 0x00000005) from novo.amx
[20:41:00] [debug] #3 0003d42c in ?? (0x0000000c, 0x00000025, 0x00000001, 0x00000004, 0x011c0f04) from novo.amx
[20:41:00] [debug] #4 0000942c in public OnDialogResponse (0x0000000c, 0x00000025, 0x00000001, 0x00000004, 0x011c0f04) from novo.amx
It doesnt Save statistics from player
I have band safe, and from that one they took gun (from dialog) and it wont give them at all. Its like server got EPP after some time. When i GMX server, restart it. Everything is okay and fine :S
Reply
#4

Someone please? Its urgent
Reply
#5

Get the newest crashdetect plugin and compile with extra debug info (pass the -d3 flag to the compiler). That should help you see exactly which variable is going out of bounds and where.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)