NetStats_MessagesReceived - crash server
#1

Good day!

Function in a one-second timer NetStats_MessagesReceived would crash the server.

p.s. Crash occurred in the past ( in 0.3x), when I had to parse the data GetPlayerNetworkStats

Why is this happening?

Code:
pawn Код:
for(new i, m = GetMaxPlayers(); i < m; i ++) {
        if(!IsPlayerConnected(i)) continue;

        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] 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
Reply


Messages In This Thread
NetStats_MessagesReceived - crash server - by x_O - 17.02.2014, 08:19
Re: NetStats_MessagesReceived - crash server - by JernejL - 17.02.2014, 18:10
Re: NetStats_MessagesReceived - crash server - by x_O - 12.03.2014, 02:30
Re: NetStats_MessagesReceived - crash server - by ][Noname][ - 12.03.2014, 05:16
Re: NetStats_MessagesReceived - crash server - by ][Noname][ - 09.04.2014, 18:12
Re: NetStats_MessagesReceived - crash server - by d0 - 09.04.2014, 18:15
Re: NetStats_MessagesReceived - crash server - by AssMunchingFool - 09.04.2014, 23:26

Forum Jump:


Users browsing this thread: 1 Guest(s)