NexiusTailer / Nex-AC

Anticheat system
https://pawn.wiki/index.php?/topic/27641-nex-ac/
GNU Lesser General Public License v3.0
212 stars 156 forks source link

Pawn.Raknet's giving too many errors #275

Closed recepilhanli closed 1 year ago

recepilhanli commented 1 year ago

[23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnOutgoingPacket: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [23:41:50] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_PASSENGER_SYNC: Array index out of bounds

When I saw these kinnda errors, server couldnt response.

NexiusTailer commented 1 year ago

What's the version of Pawn.RakNet plugin you use?

recepilhanli commented 1 year ago

1.5.1 the lastest version of pawn.raknet. (For SA-MP Server, not for O:MP)

NexiusTailer commented 1 year ago

Add crashdetect plugin and re-compile your scripts with -d3 compilation flag, then try to reproduce this problem again. Log messages should be more detailed with mentioned plugin and you'll probably see where exactly you have out-of-bounds issue.

recepilhanli commented 1 year ago

Thx I'll try.

Edit: How Can I add -d3 compilation flag?

NexiusTailer commented 1 year ago
  1. Go to a folder with your compiler (pawno folder in default server package) and create a file named "pawn.cfg" there (enable showing file extensions in explorer to make .cfg extension from .txt to it)
  2. Open this file via notepad and add -d3 there, save and close
  3. Re-compile your scripts and you should see some extended compilation info when it finishes (this means you do everything right)
recepilhanli commented 1 year ago

[19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public OnIncomingPacket: Array index out of bounds [19:49:49] [Pawn.RakNet] EveryScriptImpl: AMX error occurred in public pr_ip_AC_DRIVER_SYNC: Array index out of bounds

same thing happened. Nothing changed.

Maybe we can check all variables with IsNaN method?

NexiusTailer commented 1 year ago

same thing happened. Nothing changed.

There must be logs from crashdetect if something really goes wrong with such type of runtime error. Re-check if you done everything right and attach full logs instead of this specific part of Pawn.RakNet plugin's prints.

Maybe we can check all variables with IsNaN method?

How this related to listed problem? Every float variable which ain't checked and validated by samp is validated by the anticheat already. These runtime errors has nothing to do with float values nor their limits in any sync parameter.

recepilhanli commented 1 year ago

But there isnt. Every day (at least once) this thing's happening. just i have these. I did what you said. :)

NexiusTailer commented 1 year ago

I don't know what could be the cause for your case then.

recepilhanli commented 1 year ago

I'm working on it. If I get something new i will text here. Edit: When this thing was happening player could spawn and send text messages. But my scripts werent working. Just as if a samp server from scratch.

AbdulOmarCR commented 1 year ago

Hello, I've recently updated Pawn.RakNet, and had the same problem, but it is not Nex-AC fault, idk why but since Pawn.RakNet v1.5.0 if you have an array index out of bounds it produces these problems.

You can test this by accessing an invalid array index, for example in a command:

new ErrorTest[MAX_PLAYERS]; //create this global array CMD:errortest(playerid, params[]) { ErrorTest[playerid+MAX_PLAYERS]; return true; } //this command will access an invalid array index

NexiusTailer commented 1 year ago

@AbdulOmarCR the thing is in that any such code must trigger crashdetect log at first, but @recepilhanli says there's no any of [debug] ones, only from Pawn.RakNet which is pretty weird. Anyway, since this probably not related to the anticheat as you mentioned, I'll wait for a couple of days for a final response from @recepilhanli if he found anything related the the real cause or not and then close the issue.

AbdulOmarCR commented 1 year ago

I think he is not including crashdetect first in server.cfg, thats why it is not even loading crashdetect, but yes, i've tested this and it's something with Pawn.RakNet when there is an array index out of bounds.

recepilhanli commented 1 year ago

I've already included it in server.cfg. i did what you guys said. That's kindda weird error. I've checked all of my gamemode but i found nothing. I'm still searching. Fact: I havent touched my pawn.raknet scripts since 1 year.

NexiusTailer commented 1 year ago

@recepilhanli did you found anything since the last checking?