This is not only if a function calls itself. Big scripts (many lines, many large arrays etc) usually have estimated max. usage as unknown.
|
[11.03.2014, 09:06] Error: AMX backtrace: #0 native GetAmxBacktrace () [f6766850] from crashdetect.so #1 00248abc in public globalPlayerLoop@_yT (p=4, ... <1 argument>) at ../bugged/logs.inc:63 Native backtrace: #0 f676931b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so #1 f67637c2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so #2 f6766430 in ?? () from plugins/crashdetect.so #3 08093d84 in ?? () from samp03svr #4 f676103c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so #5 f6767458 in ?? () from plugins/crashdetect.so #6 f676bc61 in amx_Exec () from plugins/crashdetect.so #7 f67635ad in _ZN11CrashDetect15HandleExecErrorEiPiRK8AMXError () from plugins/crashdetect.so #8 f67673b8 in ?? () from plugins/crashdetect.so #9 f6769fb6 in amx_RaiseExecError () from plugins/crashdetect.so #10 f676c50a in amx_Exec () from plugins/crashdetect.so #11 f6763708 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so #12 f67671c9 in ?? () from plugins/crashdetect.so #13 080e57b5 in ?? () from samp03svr #14 080acedb in ?? () from samp03svr #15 080a81ae in ?? () from samp03svr #16 f752abd6 in __libc_start_main () from /lib32/libc.so.6 #17 0804b4a1 in ?? () from samp03svr
public OnRuntimeError(code, &bool: suppress)
{
SO(COLOR_OWNER, "[ERROR] Runtime error (crashdetect).");
new debug_text[2000];
new yy, mm, dd, hh, ii, ss;
getdate(yy, mm, dd);
gettime(hh, ii, ss);
new File:hFile, thefile[32];
format(thefile, sizeof(thefile), "/debug/%02d_crashdetect.txt", mm);
hFile = fopen(thefile, io_append);
format(debug_text, sizeof(debug_text), "\n[%02d.%02d.%04d, %02d:%02d] Error:\n", dd, mm, yy, hh, ii);
fwrite(hFile, debug_text);
GetAmxBacktrace(debug_text,sizeof(debug_text)); // <- this is line 63
fwrite(hFile, debug_text);
GetNativeBacktrace(debug_text, sizeof(debug_text));
fwrite(hFile, debug_text);
fclose(hFile);
return 1;
}
[18:21:28] [debug] Run time error 4: "Array index out of bounds" [18:21:28] [debug] Accessing element at negative index -1 [18:21:28] [debug] AMX backtrace: [18:21:28] [debug] Server crashed while executing RCRP_MySQL.amx [18:21:28] [debug] AMX backtrace:
[18:21:28] [debug] Server crashed while executing RCRP_MySQL.amx
Under onplayerdeath add a checking
if( killerid != INVALID_PLAYER_ID && playerid != INVALID_PLAYER_ID && playerid != -1 && killerid != -1 ) |
[16:41:02] [debug] Server crashed due to an unknown error [16:41:02] [debug] Native backtrace: [16:41:04] [debug] #0 0174155f in Load () from C:\Documents and Settings\Administrator\Desktop\GAME\plugins\crashd etect.dll [16:41:04] [debug] #1 01742844 in Load () from C:\Documents and Settings\Administrator\Desktop\GAME\plugins\crashd etect.dll [16:41:04] [debug] #2 0174470e in Load () from C:\Documents and Settings\Administrator\Desktop\GAME\plugins\crashd etect.dll [16:41:04] [debug] #3 77e76297 in RemoveDirectoryA () from C:\WINDOWS\system32\kernel32.dll [16:41:04] [debug] #4 0049f096 in ?? () from C:\Documents and Settings\Administrator\Desktop\GAME\samp-server.exe [16:41:04] [debug] #5 004984d1 in ?? () from C:\Documents and Settings\Administrator\Desktop\GAME\samp-server.exe [16:41:04] [debug] #6 77e6f32b in ProcessIdToSessionId () from C:\WINDOWS\system32\kernel32.dll |
[2014/08/28 14:25:10] [debug] Server crashed due to an unknown error [2014/08/28 14:25:10] [debug] Native backtrace: [debug] #0 0013f66b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so [debug] #1 001385bf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so [debug] #2 001398fc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so [debug] #3 0013a3e6 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so [debug] #4 0013f2bc in ?? () from plugins/crashdetect.so [debug] #5 00dea410 in ?? () [debug] #6 00f5a4d5 in ?? () from /lib/libc.so.6 [debug] #7 080a732a in ?? () from ./samp03svr [debug] #8 080a77b6 in ?? () from ./samp03svr [debug] #9 080e6219 in ?? () from ./samp03svr [debug] #10 00b1da49 in ?? () from /lib/libpthread.so.0 [debug] #11 00f03aee in clone () from /lib/libc.so.6
[2014/08/29 18:00:13] [debug] Server crashed due to an unknown error [2014/08/29 18:00:13] [debug] Native backtrace: [debug] #0 009ee66b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so [debug] #1 009e75bf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so [debug] #2 009e88fc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so [debug] #3 009e93e6 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so [debug] #4 009ee2bc in ?? () from plugins/crashdetect.so [debug] #5 009b4410 in ?? () [debug] #6 009b4430 in ?? () [debug] #7 002dbb11 in gsignal () from /lib/libc.so.6 [debug] #8 002dd3ea in abort () from /lib/libc.so.6 [debug] #9 0031b9d5 in ?? () from /lib/libc.so.6 [debug] #10 00321e31 in ?? () from /lib/libc.so.6 [debug] #11 00272df2 in _ZdlPv () from /usr/lib/libstdc++.so.6 [debug] #12 00272e4e in _ZdaPv () from /usr/lib/libstdc++.so.6 [debug] #13 0807fdc7 in ?? () from ./samp03svr [debug] #14 0808000d in ?? () from ./samp03svr [debug] #15 08074afa in ?? () from ./samp03svr [debug] #16 0807632e in ?? () from ./samp03svr [debug
*** glibc detected *** ./samp03svr: double free or corruption (fasttop): 0x09512868 *** ======= Backtrace: ========= /lib/libc.so.6(+0x70e31)[0x321e31] /usr/lib/libstdc++.so.6(_ZdlPv+0x22)[0x272df2] /usr/lib/libstdc++.so.6(_ZdaPv+0x1e)[0x272e4e] ./samp03svr[0x807fdc7] ./samp03svr[0x808000d] ./samp03svr[0x8074afa] ./samp03svr[0x807632e] /lib/libpthread.so.0(+0x6a49)[0x4a0a49] /lib/libc.so.6(clone+0x5e)[0x393aee] ======= Memory map: ======== 001c6000-002a5000 r-xp 00000000 09:03 262568 /usr/lib/libstdc++.so.6.0.13 002a5000-002a9000 r--p 000de000 09:03 262568 /usr/lib/libstdc++.so.6.0.13 002a9000-002aa000 rw-p 000e2000 09:03 262568 /usr/lib/libstdc++.so.6.0.13 002aa000-002b1000 rw-p 00000000 00:00 0 002b1000-00441000 r-xp 00000000 09:00 102 /lib/libc-2.12.so 00441000-00442000 ---p 00190000 09:00 102 /lib/libc-2.12.so 00442000-00444000 r--p 00190000 09:00 102 /lib/libc-2.12.so 00444000-00445000 rw-p 00192000 09:00 102 /lib/libc-2.12.so 00445000-00448000 rw-p 00000000 00:00 0 00448000-0044f000 r-xp 00000000 09:00 184 /lib/librt-2.12.so 0044f000-00450000 r--p 00006000 09:00 184 /lib/librt-2.12.so 00450000-00451000 rw-p 00007000 09:00 184 /lib/librt-2.12.so 00451000-00458000 r-xp 00000000 09:00 120 /lib/libcrypt-2.12.so 00458000-00459000 r--p 00007000 09:00 120 /lib/libcrypt-2.12.so 00459000-0045a000 rw-p 00008000 09:00 120 /lib/libcrypt-2.12.so 0045a000-00481000 rw-p 00000000 00:00 0 00481000-00493000 r-xp 00000000 09:00 211 /lib/libz.so.1.2.3 00493000-00494000 r--p 00011000 09:00 211 /lib/libz.so.1.2.3 00494000-00495000 rw-p 00012000 09:00 211 /lib/libz.so.1.2.3 0049a000-004b1000 r-xp 00000000 09:00 180 /lib/libpthread-2.12.so 004b1000-004b2000 r--p 00016000 09:00 180 /lib/libpthread-2.12.so 004b2000-004b3000 rw-p 00017000 09:00 180 /lib/libpthread-2.12.so 004b3000-004b5000 rw-p 00000000 00:00 0 004b5000-004cc000 r-xp 00000000 09:00 166 /lib/libnsl-2.12.so 004cc000-004cd000 r--p 00016000 09:00 166 /lib/libnsl-2.12.so 004cd000-004ce000 rw-p 00017000 09:00 166 /lib/libnsl-2.12.so 004ce000-004d0000 rw-p 00000000 00:00 0 004d0000-00519000 r-xp 00000000 09:00 31/lib/libfreebl3.so 00519000-0051a000 r--p 00048000 09:00 31/lib/libfreebl3.so 0051a000-0051b000 rw-p 00049000 09:00 31/lib/libfreebl3.so 0051b000-0051f000 rw-p 00000000 00:00 0 0051f000-00534000 r-xp 00000000 09:00 182 /lib/libresolv-2.12.so 00534000-00535000 ---p 00015000 09:00 182 /lib/libresolv-2.12.so 00535000-00536000 r--p 00015000 09:00 182 /lib/libresolv-2.12.so 00536000-00537000 rw-p 00016000 09:00 182 /lib/libresolv-2.12.so 00537000-00539000 rw-p 00000000 00:00 0 00539000-00543000 r-xp 00000000 09:00 269 /lib/libkrb5support.so.0.1 00543000-00544000 r--p 00009000 09:00 269 /lib/libkrb5support.so.0.1 00544000-00545000 rw-p 0000a000 09:00 269 /lib/libkrb5support.so.0.1 00545000-00562000 r-xp 00000000 09:00 225 /lib/libselinux.so.1 00562000-00563000 r--p 0001c000 09:00 225 /lib/libselinux.so.1 00563000-00564000 rw-p 0001d000 09:00 225 /lib/libselinux.so.1 00564000-00570000 r-xp 00000000 09:00 172 /lib/li
CrashDetect 4.14 is released!
|