Eredeti téma: http://forum.sa-mp.com/showthread.php?t=262796
Szóval,én nagyon megörültem neki amikor megláttam,mivel tényleg az a dolga amit a neve is tükröz :) Itt egy kis fordítás:
A plugin dolga hogy kiderítse miért crashel szervered,Windowson és Linuxon is.
Példák
Ez a kód crashelni fogja a szervert:
[pawn]#include <a_samp>
main() {
function1();
}
function1() {
function2();
}
function2() {
new buf[10];
fread(File:123, buf);
}[/pawn]
Alapméretezetten amikor meghívódik a function2,a szervered azonnal leáll és ha windowst használsz bedob valami értelmetlen szöveget a crashinfo.txt-be.
De a chrashdetectel,ilyesmit fogsz látni a szervered logjában:
[12:23:12] Crash caused by fread at address 00000090 (gamemodes\\test.amx)
Ez kicsit árulkodóbb. Mostmár viszont tudod,hogy az fread miatt crashelt a szervered!
What is more interesting is to find how this managed to happen... And you can! Just compile that script with symbolic information (pass -d3 flag to the compiler), you will get this:[/quote]
Ebbõl azt vettem ki,hogy még több információt kapunk a crashrõl ha valamilyen információval fordítjuk le a scriptünket,ott volt egy link amibõl kihalásztam ezt a témát: http://forum.sa-mp.com/showpost.php?p=1253632&postcount=7 és ebbõl a tlmából meg kihaklásztam ezt a témát: http://forum.sa-mp.com/showthread.php?t=249897
Amibõl azt vettem ki,hogy a pawno könyvtárában (szóval ahol van a fordítód) létre kell hozni egy pawn.cfg nevû fájlt és ezt kell bele írni:
-d0 -r
Helyesbítés,ezt kell bele írni:
-d3
Eredmény:
[12:20:55] Crash caused by fread on line 13 in test.pwn (gamemodes\\test.amx)
[12:20:55] Stack trace of gamemodes\\test.amx (most recent call first):
[12:20:55] function2 on line 8 in test.pwn
[12:20:55] function1 on line 4 in test.pwn
[12:20:55] main (entry point)
Én még nem teszteltem,de érdekesnek látszik
Eléggé elavult a téma, de elérhetõ újabb verzió is.
Nagyon ajánlom mindenkinek aki használja, hogy frissítsen.
Nekem ez az új verzió máris megtalált egy crashet, amit a régebbik nem.
Ezenkívül mostmár az idõt is menti, hogy mikor crashelt.
Az idõformátumot az strftime-nek megfelelõen lehet módosítani, ahogy a server.cfg-ben.
Letöltés.
Példa:
[2011/11/03 22:26:30]
[2011/11/03 22:26:30] ----- Crashdetect v3.6 loaded -----
[2011/11/03 22:26:32] Loaded debug info from \'gamemodes/nmss.amx\'
[2011/11/05 14:22:33] Script[gamemodes/nmss.amx]: In file \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\' at line 18841:
[2011/11/05 14:22:33] Script[gamemodes/nmss.amx]: Run time error 4: \"Array index out of bounds\".
[2011/11/05 14:22:33] Backtrace (most recent call first):
[2011/11/05 14:22:33] File \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\'
[2011/11/05 14:22:33] cmd_propdata(playerid=0x1) [entry point]
[2011/11/05 14:22:33] Error details:
[2011/11/05 14:22:33] Array max. index is 211 but accessing element at 4294966896
[2011/11/05 14:22:39] Script[gamemodes/nmss.amx]: In file \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\' at line 18841:
[2011/11/05 14:22:39] Script[gamemodes/nmss.amx]: Run time error 4: \"Array index out of bounds\".
[2011/11/05 14:22:39] Backtrace (most recent call first):
[2011/11/05 14:22:39] File \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\'
[2011/11/05 14:22:39] cmd_propdata(playerid=0x1) [entry point]
[2011/11/05 14:22:39] Error details:
[2011/11/05 14:22:39] Array max. index is 211 but accessing element at 4294966896
[2011/11/05 14:22:43] Script[gamemodes/nmss.amx]: In file \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\' at line 18841:
[2011/11/05 14:22:43] Script[gamemodes/nmss.amx]: Run time error 4: \"Array index out of bounds\".
[2011/11/05 14:22:43] Backtrace (most recent call first):
[2011/11/05 14:22:43] File \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\'
[2011/11/05 14:22:43] cmd_propdata(playerid=0x1) [entry point]
[2011/11/05 14:22:43] Error details:
[2011/11/05 14:22:43] Array max. index is 211 but accessing element at 4294966896
[2011/11/05 14:34:08] Server crashed due to an unknown error.
[2011/11/05 14:34:19]
[2011/11/05 14:34:19] ----- Crashdetect v3.6 loaded -----
[2011/11/05 14:34:21] Loaded debug info from \'gamemodes/nmss.amx\'
[2011/11/06 18:19:20] Script[gamemodes/nmss.amx]: In file \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\' at line 16416:
[2011/11/06 18:19:20] Script[gamemodes/nmss.amx]: Run time error 4: \"Array index out of bounds\".
[2011/11/06 18:19:20] Backtrace (most recent call first):
[2011/11/06 18:19:20] File \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\'
[2011/11/06 18:19:20] cmd_warns(playerid=0xe, params[]=0x146550) [entry point]
[2011/11/06 18:19:20] Error details:
[2011/11/06 18:19:20] Array max. index is 59 but accessing element at 65535
[2011/11/06 18:20:11] Script[gamemodes/nmss.amx]: In file \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\' at line 16416:
[2011/11/06 18:20:11] Script[gamemodes/nmss.amx]: Run time error 4: \"Array index out of bounds\".
[2011/11/06 18:20:11] Backtrace (most recent call first):
[2011/11/06 18:20:11] File \'C:\\Program Files (x86)\\Rockstar Games\\GTA San Andreas\\SERVER\\gamemodes\\Backup\\nmss_Last_0.3c.pwn\'
[2011/11/06 18:20:11] cmd_warns(playerid=0xe, params[]=0x146550) [entry point]
[2011/11/06 18:20:11] Error details:
[2011/11/06 18:20:11] Array max. index is 59 but accessing element at 65535