16.02.2014, 07:56
Добрый день!
Функция NetStats_MessagesReceived в односекундном таймере крашит сервер.
Крашы происходили и раньше (в 0.3x), когда приходилось парсить данные GetPlayerNetworkStats
Код:
[15/02/14 16:23:52] [debug] Server crashed while executing GameMode.amx
[15/02/14 16:23:52] [debug] AMX backtrace:
[15/02/14 16:23:52] [debug] #0 native NetStats_MessagesReceived () [080d9ec0] from samp03svr
[15/02/14 16:23:52] [debug] #1 000ebe50 in public TimerOneSecond () from GameMode.amx
[15/02/14 16:23:52] [debug] Native backtrace:
[15/02/14 16:23:52] [debug] #0 006d360b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #1 006cae92 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #2 006cc8d9 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #3 006d32a0 in ?? () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #4 00d8c410 in ?? ()
[15/02/14 16:23:52] [debug] #5 08082a46 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #6 0807e43c in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #7 0806fd49 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #8 080d9f08 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #9 08093d84 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #10 006ca5fc in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #11 006cf15c in ?? () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #12 006d764d in amx_Exec () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #13 006ccabb in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #14 006cf100 in ?? () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #15 080e57a5 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #16 080acedb in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #17 080a81ae in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #18 001cece6 in __libc_start_main () from /lib/libc.so.6
[15/02/14 16:23:52] [debug] #19 0804b4a1 in ?? () from ./samp03svr
Функция NetStats_MessagesReceived в односекундном таймере крашит сервер.
Крашы происходили и раньше (в 0.3x), когда приходилось парсить данные GetPlayerNetworkStats
Код:
pawn Code:
var = NetStats_MessagesReceived(i);
if(var - MessagesCount[i] > 1000) {
printf("playerid: %i, messagesReceived: %i messagesCount %i", i, var, MessagesCount[i]);
Ban(i);
continue;
}
else MessagesCount[i] = var;
[15/02/14 16:23:52] [debug] AMX backtrace:
[15/02/14 16:23:52] [debug] #0 native NetStats_MessagesReceived () [080d9ec0] from samp03svr
[15/02/14 16:23:52] [debug] #1 000ebe50 in public TimerOneSecond () from GameMode.amx
[15/02/14 16:23:52] [debug] Native backtrace:
[15/02/14 16:23:52] [debug] #0 006d360b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #1 006cae92 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #2 006cc8d9 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #3 006d32a0 in ?? () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #4 00d8c410 in ?? ()
[15/02/14 16:23:52] [debug] #5 08082a46 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #6 0807e43c in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #7 0806fd49 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #8 080d9f08 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #9 08093d84 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #10 006ca5fc in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #11 006cf15c in ?? () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #12 006d764d in amx_Exec () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #13 006ccabb in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #14 006cf100 in ?? () from plugins/crashdetect.so
[15/02/14 16:23:52] [debug] #15 080e57a5 in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #16 080acedb in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #17 080a81ae in ?? () from ./samp03svr
[15/02/14 16:23:52] [debug] #18 001cece6 in __libc_start_main () from /lib/libc.so.6
[15/02/14 16:23:52] [debug] #19 0804b4a1 in ?? () from ./samp03svr