AMX backtrace - nothing to show
zoransalamun opened this issue · 14 comments
I have tested plugin on my dedicated machine on lvdm gamemode, and worked fine - showed AMX backtrace. Than i made same code on my gamemode, there gamemode crash but wont show what is problem.
error code on main():
new blabla = 51618;
new nest[100] = 1;
nest[blabla] = 1;
crash log with test gm:
[01:51:55] [debug] Run time error 4: "Array index out of bounds"
[01:51:55] [debug] Accessing element at index 51618 past array upper bound 99
[01:51:55] [debug] AMX backtrace:
[01:51:55] [debug] #0 000000dc in main () at C:\Users\Y_D_Komp\Desktop\3.0 CHRP SP\gamemodes\lvdm.pwn:91
[01:51:55] Script[gamemodes/lvdm.amx]: Run time error 4: "Array index out of bounds"
crash log with productiongm.amx:
[03:18:39] [debug] Run time error 4: "Array index out of bounds"
[03:18:39] [debug] Accessing element at index 51618 past array upper bound 99
[03:18:39] [debug] AMX backtrace:
[03:18:39] [debug] Server crashed while executing productiongm.amx
[03:18:39] [debug] AMX backtrace:
test gm(lv dm) have about 1000lines
productiongm.amx gm have about 120 000 lines
Does number of gamemode lines have something with not showing AMX backtrace? Or something else...
Includes are not problem, becasue i included same includes on both gamemodes, and i tryied -d3 and -d2 flags...
Which version are you using?
Latest version, i downloaded yesterday crashdetect-4.10-linux.tar.gz and tested... this problem happend before also, and my gamemode is to bih to rewrap lines with notepad++, i need days for do that...
I tested lvdm few hours ago, and when i have more than 65and something thousands lines, crashdetect plugin wont print line in gamemode...
I have new information, i think that problem with line numbers is only with linux version. On windows server even wont crash on wrong array index, on linux is same only if number of gamemode lines is under 65535 lines
Can that be fixed? Or i must reduce line numbers in gamemode?
There's a patch for the pawn compiler here: https://github.com/Zeex/pawn-3.2.3664_patches/tree/master/not_samp_compatible (actually in two files) that fixes that limitation but you'll have to re-compile crashdetect as well (with the new header) to make it work.
Ok, thanks, i will test it today
"but you'll have to re-compile crashdetect as well (with the new header) to make it work." - can you tell me how to compile crashdetect plugin with new header? what i must change frow original source and how?
If you already patched the compiler then you just copy the new amxdbg.h
from pawn/source/amx/
to crashdetect/amx/
and build crashdetect
Ok, i have downloaded new patched compiler from link(Pre-compiled binaries): https://github.com/Zeex/pawn-3.2.3664_patches
Now where can i find new amxdbg.h to recompile crashdetect plugin?
Those binaries contain only SA-MP compatible patches, so you have to patch it yourself adding the patches from not_samp_compatible/
(just use apply_all.sh
instead of apply_compatible.sh
)
Ok, i have try, but its not working. Can you tell me did i do something wrong:
1.) I have follow Build Instructions on this link: https://github.com/Zeex/pawn-3.2.3664_patches
- And compile with apply_all-sh
2.) Downloaded crashdetect master
3.) Replaced amxdbg.h in crashdetect/amx/ width amxdbg.h from pawn patches
4.) Compile crashdetect plugin i got crashdetect.so
5.) Placed in plugins folder
6.) Recompile samp gamemode with new pawncc
And everything is the same, its not showing information about crash.
I have try -d2, -d3 flags, nothing, its still problem with number of lines in gamemode...
Tested on Ubuntu and Centos.
Do you have solution? Did you tested any gamemode with more than 65535 lines?
Hontestly I've never tested a gamemode with more than 65k lines with that compiler but I'm sure it should work.
Are you sure all the patches have been applied? I've just found a minor mistake in that script that was preventing the not_samp_compatible
patches from being applied (seems like I forgot to test in combination with apply_all.sh
).
Anyway, I'm going to build the compiler with those patches and upload new binaries today, stay tuned.
Here you go:
https://github.com/Zeex/pawn-3.2.3664_patches/raw/downloads/pawncc-windows-all.zip
https://github.com/Zeex/pawn-3.2.3664_patches/raw/downloads/pawncc-linux-all.tar.gz
The patched amxdbg.h
is here:
https://gist.github.com/Zeex/5128070
CrashDetect:
https://dl.dropbox.com/u/26413047/crashdetect-4.10-win32.zip
Thanks, i will test later on centos and ubuntu with compiling crashdetect plugin with new amxdbg.h.
Thanks Zeex, i have recompiled plugin for ubuntu and everything is working fine.