Very weird situation with the server, variables mess up
#1

Hi,
i got a very very weird situation with SA-MP 0.3x R2 server.
The server is running good, then people start to say that things stopped working (like some events dont end and people are trapped inside)
Everything starts to mess up and stops working or gets bugged as hell. For example you are playing and you try to send some message but it blocks it and says that you are in jail and cant send messages etc.
Then the log is spammed as hell with AMX backtraces, which you will see later.
All variables get crazy and get some very weird values out of nowhere, global textdraws disappear etc.. example:
Код:
[11:04:24] [debug]  Accessing element at index 16777216 past array upper bound 54
Or
Код:
[11:04:22] [debug]  Accessing element at negative index -1384207844
[11:04:22] [debug] AMX backtrace:
[11:04:22] [debug] #0 000ca608 in Biznes_Buy (playerid=13, biznesid=-1384207844) at ./current/libs/player/biznesy.inc:190
In the last example, the minimal value of the variable called 'biznesid' is 0 and maximal is 200, so how the hell it got a value of -1384207844 ? The problem grows huge because one variable gets messed up, some functions take its value to do something and they get messed up also because the value isnt proper.
List of includes:
Код:
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 166
#include <sscanf2>
#include <mysql>
#include <streamer>
#include <filemanager>
#include <foreach>
#if defined AUDIO_USED
#include <audio>
#endif
#include <YSI\y_hooks>
#include <YSI\y_va>
#include <YSI\y_iterate>
#include <YSI\y_timers>
#include <YSI\y_commands>
#include <progress>
#include <dutils>
When this happens there is about 50 to 70/90 players on the server.
Also there was a problem with player names, because the player name was saved when the player connected to an array, but when the bug appeared these player names stored in that array changed to some weird characters (the name variable got messed up, just like all the others) redoing the way the names are taken fixed it. Now everytime i want to do something with player name i use this function:
Код:
stock playerNick(playerid)
{
new namees[2][MAX_PLAYER_NAME+1];
GetPlayerName(playerid, namees[0], MAX_PLAYER_NAME);
mysql_real_escape_string(namees[0], namees[1]);
return namees[1];
}
Example of these weird characters:


And here you can see the log with the backtraces: http://pastebin.com/8R15QZNH

The server doesnt crash though, i need to reset it.
What may it be, how to fix it, do others have this problem also ?
Thanks in advance.
Reply
#2

http://pastebin.com/RdkMu6aF

Quote:

[17:33:48] [join] Mr_Nimrud has joined the server (16:95.153.206.72)
[17:33:48] [debug] Run time error 5: "Invalid memory access"
[17:33:48] [debug] AMX backtrace:
[17:33:48] [debug] #0 0012b9ac in public S@@_OnPlayerConnect (playerid=16) at current.pwn:608
[17:33:48] [debug] #1 0000f5b4 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:618
[17:33:48] [debug] #2 000090b0 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_iterate.inc :646
[17:33:48] [debug] #3 00007bec in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\streamer.inc:277
[17:33:48] [debug] #4 00001414 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\sscanf2.inc:205
[17:33:48] [debug] Run time error 5: "Invalid memory access"
[17:33:48] [debug] AMX backtrace:
[17:33:48] [debug] #0 0013213c in public S@@_OnPlayerUpdate (playerid=50) at current.pwn:1069
[17:33:48] [debug] #1 0001281c in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:2032
[17:33:48] [debug] Run time error 5: "Invalid memory access"
[17:33:48] [debug] AMX backtrace:
[17:33:48] [debug] #0 0013213c in public S@@_OnPlayerUpdate (playerid=52) at current.pwn:1069
[17:33:48] [debug] #1 0001281c in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:2032
[17:33:48] [debug] Run time error 5: "Invalid memory access"
[17:33:48] [debug] AMX backtrace:
[17:33:48] [debug] #0 0013213c in public S@@_OnPlayerUpdate (playerid=53) at current.pwn:1069
[17:33:48] [debug] #1 0001281c in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:2032
[17:33:48] [part] MandP has left the server (20:2)
[17:33:48] [part] matkacek has left the server (28:2)
[17:33:49] [part] Kicusiekk has left the server (13:1)
[17:33:49] [chat] [[P4S]_Muaha]: nieeee !
[17:33:50] [chat] [TheDarkBpK]: aaa
[17:33:52] [chat] [[P4S]Melonowy]: Znowu to!
[17:33:52] [chat] [karo292]: znowu
[17:33:52] [part] [P4S]Pitresc has left the server (0:1)
[17:33:53] [chat] [karo292]: xD
[17:33:53] [part] karkos has left the server (17:2)
[17:33:53] [chat] [[P4S]_Muaha]: nieeee !
[17:33:54] [chat] [DobraDupeczka]: spedycjaexit
[17:33:56] [chat] [TheDarkBpK]: kradną mi $
[17:33:57] [chat] [Neko]: elem masz bana, nie palisz
[17:33:57] [part] Dev_100PRO has left the server (26:1)
[17:33:59] [part] DobraDupeczka has left the server (25:1)
[17:34:03] [part] Misiolol has left the server (1:1)
[17:34:04] [death] Luqiz died 54
[17:34:04] [chat] [[P4S]ZieliN_PL]: aa
[17:34:04] [chat] [[P4S]Melonowy]: znowu.
[17:34:05] [chat] [bialyyy]: wtf??
[17:34:05] Incoming connection: 83.5.15.119:58399
[17:34:06] [join] [P4S]Zbychuu has joined the server (0:83.5.15.119)
[17:34:06] [debug] Run time error 5: "Invalid memory access"
[17:34:06] [debug] AMX backtrace:
[17:34:06] [debug] #0 0012b9ac in public S@@_OnPlayerConnect (playerid=0) at current.pwn:608
[17:34:06] [debug] #1 0000f5b4 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:618
[17:34:06] [debug] #2 000090b0 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_iterate.inc :646
[17:34:06] [debug] #3 00007bec in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\streamer.inc:277
[17:34:06] [debug] #4 00001414 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\sscanf2.inc:205
[17:34:06] [part] TheDarkBpK has left the server (3:2)
[17:34:06] [part] Lessi has left the server (47:1)
[17:34:08] [chat] [[P4S]_TTroOniK_[HH]]: wtf
[17:34:10] [chat] [Super]: .
[17:34:10] [chat] [[PST]Rafaelx]: czego kasa sama leci
[17:34:13] [chat] [[P4S]_TTroOniK_[HH]]: znowu !!!
[17:34:13] [join] lihgting has joined the server (1:85.2
[17:34:15] [part] Kondziu_RS has left the server (45:2)
[17:34:15] [death] PandM died 255
[17:34:15] [chat] [[P4S]Krupnik[KT]]: mi też
[17:34:15] [chat] [Neko]: WYCHODZIĆ Z SERWERA
[17:34:16] [chat] [[P4S]_TTroOniK_[HH]]: ZNOWU ATAK
[17:34:17] [part] kubeczek has left the server (32:2)
[17:34:19] [death] BobMarley died 255
[17:34:19] [part] karo292 has left the server (55:1)
[17:34:19] [chat] [[MZS]KoperDzifko]: znowu
[17:34:20] [part] [P4S]Krupnik[KT] has left the server (67:1)
[17:34:22] [part] dusk has left the server (43:1)
[17:34:22] [part] [P4S]Melonowy has left the server (22:1)
[17:34:23] [chat] [kamilLVC]: tt
[17:34:23] [chat] [kamilLVC]: t
[17:34:23] [part] [EX][DJO]ChewBacca has left the server (54:2)
[17:34:23] [chat] [Zoch]: ...
[17:34:25] [chat] [kamilLVC]: bkjfugjfgx\
[17:34:25] [chat] [kamilLVC]: g
[17:34:26] [death] [p4s]speedfull54 died 255
[17:34:26] [chat] [[P4S]ZieliN_PL]: lol ale bugi
[17:34:28] Incoming connection: 79.185.190
[17:34:28] [join] [P4S]ToMeK=) has joined the server (3
[17:34:29] Incoming connection: 178.
[17:34:29] [chat] [kamilLVC]: t
[17:34:29] [chat] [ZwR.EleM]: kasa leci jak na tym filmie Iluzja 2013 - polecam
[17:34:30] [join] [G]vladon has joined the server (13:178.67.249.190)
[17:34:30] [debug] Run time error 5: "Invalid memory access"
[17:34:30] [debug] AMX backtrace:
[17:34:30] [debug] #0 0012b9ac in public S@@_OnPlayerConnect (playerid=13) at current.pwn:608
[17:34:30] [debug] #1 0000f5b4 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:618
[17:34:30] [debug] #2 000090b0 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_iterate.inc :646
[17:34:30] [debug] #3 00007bec in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\streamer.inc:277
[17:34:30] [debug] #4 00001414 in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\sscanf2.inc:205
[17:34:30] [debug] Run time error 5: "Invalid memory access"
[17:34:30] [debug] AMX backtrace:
[17:34:30] [debug] #0 0013213c in public S@@_OnPlayerUpdate (playerid=39) at current.pwn:1069
[17:34:30] [debug] #1 0001281c in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:2032
[17:34:30] [debug] Run time error 5: "Invalid memory access"
[17:34:30] [debug] AMX backtrace:
[17:34:30] [debug] #0 0013213c in public S@@_OnPlayerUpdate (playerid=41) at current.pwn:1069
[17:34:30] [debug] #1 0001281c in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:2032
[17:34:30] [debug] Run time error 5: "Invalid memory access"
[17:34:30] [debug] AMX backtrace:
[17:34:30] [debug] #0 0015fd1c in public S@@_OnPlayerKeyStateChange (playerid=42, newkeys=8, oldkeys=24) at current.pwn:4593
[17:34:30] [debug] #1 000124f4 in Command_Add (... <3 variable arguments>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:1942
[17:34:30] [debug] Run time error 5: "Invalid memory access"
[17:34:30] [debug] AMX backtrace:
[17:34:30] [debug] #0 0013213c in public S@@_OnPlayerUpdate (playerid=42) at current.pwn:1069
[17:34:30] [debug] #1 0001281c in Command_Add (... <1 variable argument>) at D:\GTA\serwermap\include\include\YSI\y_hooks/impl.inc:2032
[17:34:30] [part] [P4S]_Muaha has left the server (34:2)
[17:34:30] [part] [PST]Rafaelx has left the server (65:1)
[17:34:30] [chat] [Mr_Nimrud]: ęу
[17:34:31] [death] Dale died 54
[17:34:34] [death] Oskar_Puzulis died 255
[17:34:34] [chat] [kamilLVC]: w/cars
[17:34:35] [chat] [bialyyy]: aaa
[17:34:37] [kill] [p4s]speedfull54 killed [P4S]_TTroOniK_[HH] Combat Shotgun
[17:34:37] [part] Dale has left the server (36:2)
[17:34:39] [chat] [[P4S]Zbychuu]: SIEMA czemu jak wchodze nie ma wpisywania hasła ?
[17:34:39] [chat] [bialyyy]: wtf?
[17:34:40] Incoming connection: 91.2
[17:34:40] [join] matkacek has joined the server (17:9
[17:34:40] [part] SebQ has left the server (18:2)
[17:34:40] [chat] [[P4S]Wrathu]: Armagedon
[17:34:46] [part] [EX]Jesion has left the server (66:2)
[17:34:46] [part] PandM has left the server (6:1)
[17:34:46] [part] kamilLVC has left the server (59:1)
[17:34:49] Incoming connection: 8
[17:34:49] [join] [P4S]Krupnik[KT] has joined the server (6:8
[17:34:50] Incoming connection: 89.23
[17:34:50] [part] Bo0brIx has left the server (5:2)
[17:34:50] [join] kubeczek has joined the server (18:8
[17:34:51] [part] DjSzoko99 has left the server (72:1)
[17:34:51] [part] kuba266 has left the server (42:2)
[17:34:51] [chat] [BobMarley]: kiedy wyjde z wiezienia

Reply
#3

Yeah, please notice that the IP that connects just before the run time error is from russia, same with all other IPs that connect before the errors appear. Another SA-MP update coming soon ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)