Array index out of bounds
#1

My server doesn't start, i get an "array index out of bounds" in server log. Installed CD (CrashDetect) and got this:

Quote:

[16:09:14] [debug] Run time error 4: "Array index out of bounds"
[16:09:14] [debug] Attempted to read/write array element at index 32 in array of size 32
[16:09:14] [debug] AMX backtrace:
[16:09:14] [debug] #0 0000c4cc in ?? (381904742, 0, 0, 18206696, 32, -659480) in server.amx
[16:09:14] [debug] #1 0000ca14 in ?? (18203172, 0, 0, 18206696, -659480) in server.amx
[16:09:14] [debug] #2 0000e954 in ?? (18203172, 18206696, 18203160, 18203156) in server.amx
[16:09:14] [debug] #3 0000ee14 in ?? (18206696) in server.amx
[16:09:14] [debug] #4 0001443c in ?? () in server.amx
[16:09:14] [debug] #5 000119d0 in public AMX_OnScriptInit () in server.amx
[16:09:14] [debug] #6 0000f980 in public Debug_OnScriptInit () in server.amx
[16:09:14] [debug] #7 00007990 in public YVers_OnScriptInit () in server.amx
[16:09:14] [debug] #8 00007178 in public ScriptInit_OnScriptInit () in server.amx
[16:09:14] [debug] #9 00006e50 in public SSCANF_OnGameModeInit () in server.amx
[16:09:14] [debug] #10 000011a0 in public OnGameModeInit () in server.amx
[16:09:14] [debug] Run time error 4: "Array index out of bounds"
[16:09:14] [debug] Attempted to read/write array element at index 204131 in array of size 1
[16:09:14] [debug] AMX backtrace:
[16:09:14] [debug] #0 0003dfbc in ?? () in server.amx
[16:09:14] [debug] #1 0003daa4 in main () in server.amx
[16:09:14] Script[gamemodes/server.amx]: Run time error 4: "Array index out of bounds"
[16:09:14] Number of vehicle models: 0

But i don't know what could cause this.

Includes:

Quote:

#include <a_samp>
#include <a_mysql>
#include <sscanf2>
#include <streamer>
#include <crashdetect>
#include <colors>
#include <foreach>
#include <zcmd>
#include <gl_common>
#include <sqlitei>
#include <easyDialog>
#include <YSI\y_timers>
#include <YSI\y_iterate>
#include <YSI\y_groups>

Recently i wrote a party command, thinking was that the problem i removed it, but nothing, still that error.

Any help?
Reply
#2

Attempted to read/write array element at index 32 in array of size 32.
See what you've modified and try to do it before, (the length of a 32 vector starts from 0 to 31) you can't write on 32, that's what you say there.
Check where you have exceeded the limit.
Reply
#3

I seriously don't know where i can search...searched for every created string but nothing found.
Reply
#4

I do not know exactly how you can find the variable, see what you've added to it, wait, maybe somebody here knows a better solution.
Use Zeex Pawn Compiler maybe it helps you.
Reply
#5

I've deleted everything i added in last 30 minutes, but still getting this error.

I'm gonna try Zeex's compiler, lets see what happens.

EDIT: Tried Zeex's compiler and got this:

https://pastebin.com/cqiMHgmP

I'm gonna kill myself bye.
Reply
#6

Please try version 3.10.8 version 3.10.9 gives you any information about anything that might be wrong or should be added but not mandatory and posting line 1187.
Reply
#7

Quote:
Originally Posted by SymonClash
Посмотреть сообщение
I've deleted everything i added in last 30 minutes, but still getting this error.

I'm gonna try Zeex's compiler, lets see what happens.

EDIT: Tried Zeex's compiler and got this:

https://pastebin.com/cqiMHgmP

I'm gonna kill myself bye.
Use 3.10.8, as 3.10.9 adds more checks to code.

Btw are you compiling your gamemode with -d3?
Reply
#8

Pass -d3 flag to compiler settings. If you use pawno editor, follow this tutorial: https://github.com/Zeex/samp-plugin-...ith-debug-info
This debug level will display name of functions and lines.

As for the community compiler, either downgrade to 3.10.8 (const-correctness was implemented in latest) or update to YSI 5 but some other includes may still give the error.
Reply
#9

Ok, downgraded to 3.10.8, added -d3 flag to pawn.cfg and got this after compiling:

Quote:

gamemodes\server.pwn(4823) : warning 203: symbol is never used: "GetVehicleSpeed"
gamemodes\server.pwn(4823) : warning 203: symbol is never used: "ReturnVehicleHealth"
Pawn compiler 3.10.8 Copyright © 1997-2006, ITB CompuPhase

Header size: 9884 bytes
Code size: 823008 bytes
Data size: 1168092 bytes
Stack/heap size: 17039360 bytes; estimated max. usage=3303 cells (13212 bytes)
Total requirements:19040344 bytes

2 Warnings.
Warnings are normal, but the rest?
Reply
#10

Quote:
Originally Posted by SymonClash
Посмотреть сообщение
Ok, downgraded to 3.10.8, added -d3 flag to pawn.cfg and got this after compiling:



Warnings are normal, but the rest?
Yes. Its normal
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)