SA-MP Forums Archive
[Plugin] CrashDetect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] CrashDetect (/showthread.php?tid=262796)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Respuesta: Re: CrashDetect 4.13 - Gryphus One - 18.02.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
This is not only if a function calls itself. Big scripts (many lines, many large arrays etc) usually have estimated max. usage as unknown.
Good to know this, because I too had read about recursion happening when a function calls itself but I don't think I have made such a thing.


Re: CrashDetect 4.13 - Kyle - 21.02.2014

I've posted an issue in the crashdetect github.


Re: CrashDetect 4.13 - im - 11.03.2014

In server_log.txt errors are printet correctly, but OnRuntimeError always prints this for any error:

Код:
[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
The code:
pawn Код:
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;
}



Re: CrashDetect 4.13 - xeeZ - 14.03.2014

Fixed, thanks.


Re: CrashDetect 4.13 - Boooth - 16.03.2014

I am having an issue with the plugin.

A little while ago when I used crashdetect on a seperate dedicated server the plugin worked beautifully but recently when I have tried to use it this is pretty much all the information I would get:

Код:
[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:
This is if I use an outdated version of the plugin, if I use the 4.13 version I literally get:

Код:
[18:21:28] [debug] Server crashed while executing RCRP_MySQL.amx
I have no idea what is causing this both the servers were linux, any ideas?


Re: CrashDetect 4.13 - feartonyb - 17.03.2014

Under onplayerdeath add a checking
if( killerid != INVALID_PLAYER_ID && playerid != INVALID_PLAYER_ID && playerid != -1 && killerid != -1 )


Re: CrashDetect 4.13 - Boooth - 17.03.2014

Quote:
Originally Posted by feartonyb
Посмотреть сообщение
Under onplayerdeath add a checking
if( killerid != INVALID_PLAYER_ID && playerid != INVALID_PLAYER_ID && playerid != -1 && killerid != -1 )
Adding this or something similiar hasn't resolved my issue unfortunately, thanks for replying anyway.


AW: CrashDetect 4.13.1 - Mellnik - 08.07.2014

Works, thanks.
On CentOS it requires the package cmake28 and gcc-c++ instead of gcc-multilib,g++-multilib, just in case you want to add this information to the repo wiki.


Re: CrashDetect 4.13.1 - DavidKember - 08.07.2014

I want to know, what this plugin does exactly?


Re: CrashDetect 4.13.1 - Konstantinos - 08.07.2014

Quote:
Originally Posted by DavidKember
Посмотреть сообщение
I want to know, what this plugin does exactly?
"This plugin helps you debug runtime errors and server crashes. When something goes wrong you see a more or less detailed error message that contains a description of the error and a stack trace." - from the page on github.


Re: CrashDetect 4.13.1 - HawkKey - 14.08.2014

Quote:

[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

please help, Shut down server
How to fix ?


Re: CrashDetect 4.13.1 - Toolkit - 14.08.2014

Quote:
Originally Posted by HawkKey
Посмотреть сообщение
please help, Shut down server
How to fix ?
probably where you are hosting your server is not prepared To have the server online, try to talk to the company and find a solution..

Greetings..



Re: CrashDetect 4.13.1 - xeeZ - 18.08.2014

CrashDetect 4.14 is released!
Download


Re: CrashDetect 4.13.1 - stabker - 28.08.2014

Hello. Can someone explain the possible causes of this error?

Код:
[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
or

Код:
[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
& console:

Код:
*** 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
Compiled with the parameter -d3.

Sorry for my bad English.


Re: CrashDetect 4.13.1 - nemesis- - 30.09.2014

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
CrashDetect 4.14 is released!
  • Added two server.cfg options:
    • trace <flags> - enable tracing; flags is one or combination of the following (the order doesn't matter):
      • n - trace native functions
      • p - trace public functions
      • f - trace normal functions
      This means that pn will trace both public and native functions, and pfn will trace all.
    • trace_filter <regexp> - filter the output of trace according to a (Perl-compatible) regexp. For example:
      • trace_filter Player - only output functions whose name contains Player
      • trace_filter playerid=0 - show functions whose playerid parameter is equal to 0
  • Fixed issues with long scripts (the 65k problem)
  • Fixed slightly incorrect instruction address in Runtime error 6 message when doing HALT
Download
Thanks Zeex for your hard work. This plugin has been immensely helpful in tracking down elusive crash bugs.


Re: CrashDetect 4.13.1 - xeeZ - 13.10.2014

CrashDetect 4.15 is released!
Download


Respuesta: CrashDetect 4.13.1 - DekaAlexander - 13.10.2014

Ty


Re: CrashDetect 4.13.1 - MasonSFW - 01.11.2014

How to install this plugin ?


Re : CrashDetect 4.13.1 - S4t3K - 01.11.2014

Download it and add "crashdetect.so" (or crashdetect.dll if you are on Windows) to your "plugins" line (or plugins2 if you're using the UFS plugin).


Re: CrashDetect 4.13.1 - BaTcoH - 17.11.2014

What's my error? Server crashed.

[17:45:21] [debug] Server crashed due to an unknown error
[17:45:22] [debug] Native backtrace:
[debug] #0 f745666b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[debug] #1 f744f5bf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[debug] #2 f74508fc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[debug] #3 f74513e6 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[debug] #4 f74562bc in ?? () from plugins/crashdetect.so
[debug] #5 ffffe410 in __kernel_rt_sigreturn () from linux-gate.so.1
[debug] #6 f49e74b0 in ?? () from plugins/streamer.so
[debug] #7 f49e36c2 in ?? () from plugins/streamer.so
[debug] #8 f49e63c8 in ?? () from plugins/streamer.so
[debug] #9 f49e667c in ?? () from plugins/streamer.so
[debug] #10 f49a82f6 in ProcessTick () from plugins/streamer.so
[debug] #11 080cf9f2 in ?? () from ./samp03svr
[debug] #12 080ad5cc in ?? () from ./samp03svr
[debug] #13 080a88ce in ?? () from ./samp03svr
[debug] #14 f749e646 in __libc_start_main () from /lib32/libc.so.6
[debug] #15 0804b4d1 in ??