Server Crashing (probably due to streamer)
#1

So, I lately wanted to update my server to the newest version of my gamemode (maybe ~2-3 days after) and suddenly when joining it crashes the whole server.

I've downloaded crashdetect and get the following (whole server log):
Код:
SA-MP Dedicated Server
----------------------
v0.3.7-RC2, ©2005-2015 SA-MP Team

[16:42:40] filterscripts = "" (string)
[16:42:40] 
[16:42:40] Server Plugins
[16:42:40] --------------
[16:42:40] Loading plugin: mysql_static.so
[16:42:40] >> plugin.mysql: R39-3 successfully loaded.
[16:42:40] Loaded.
[16:42:40] Loading plugin: crashdetect.so
[16:42:40] CrashDetect v4.15.1 is OK.
[16:42:40] Loaded.
[16:42:40] Loading plugin: streamer.so
[16:42:40] 

*** Streamer Plugin v2.7.5.1 by Incognito loaded ***

[16:42:40] Loaded.
[16:42:40] Loading plugin: sscanf.so
[16:42:40] 

[16:42:40] ===============================

[16:42:40] sscanf plugin loaded. 

[16:42:40] Version: 2.8.1 

[16:42:40] © 2012 Alex "******" Cole 

[16:42:40] ===============================

[16:42:40] Loaded.
[16:42:40] Loading plugin: whirlpool.so
[16:42:40] 
[16:42:40] ==================
[16:42:40] 
[16:42:40] Whirlpool loaded
[16:42:40] 
[16:42:40] ==================
[16:42:40] 
[16:42:40] Loaded.
[16:42:40] Loading plugin: nativechecker.so
[16:42:40] Loaded.
[16:42:40] Loaded 6 plugins.

[16:42:40] 
[16:42:40] Filterscripts
[16:42:40] ---------------
[16:42:40] Loaded 0 filterscripts.

[16:42:40] 
[16:42:40] 
[16:42:40] 
[16:42:40] ======================================= 
[16:42:40] | | 
[16:42:40] | YSI version 3.09.0684 | 
[16:42:40] | By Alex "******" Cole | 
[16:42:40] | | 
[16:42:40] ======================================= 
[16:42:40] 
[16:42:40] Successfully connected to the database.
[16:42:40] 1
[16:42:40] Number of vehicle models: 8
[16:42:44] Incoming connection: 83.128.191.142:51232 id: 0
[16:42:47] [join] Zumorio has joined the server (0:83.128.191.142)
[16:42:54] [debug] Server crashed while executing crp.amx
[16:42:54] [debug] AMX backtrace:
[16:42:54] [debug] #0 native CallLocalFunction () from samp03svr
[16:42:54] [debug] #1 00006c98 in public HTTP_OnLookupResponse (0, 200, 1231116) from crp.amx
[16:42:54] [debug] Native backtrace:
[16:42:54] [debug] #0 b646de8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[16:42:54] [debug] #1 b6466bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[16:42:54] [debug] #2 b6467dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[16:42:54] [debug] #3 b6468226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[16:42:54] [debug] #4 b646dadc in ?? () from plugins/crashdetect.so
[16:42:54] [debug] #5 b7789600 in ?? ()
[16:42:54] [debug] #6 080dd65c in ?? () from ./samp03svr
[16:42:54] [debug] #7 080940d4 in ?? () from ./samp03svr
[16:42:54] [debug] #8 b646994b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[16:42:54] [debug] #9 b646c8f8 in ?? () from plugins/crashdetect.so
[16:42:54] [debug] #10 b6470916 in amx_Exec () from plugins/crashdetect.so
[16:42:54] [debug] #11 b6468be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[16:42:54] [debug] #12 b646c659 in ?? () from plugins/crashdetect.so
[16:42:54] [debug] #13 b6068f1a in ?? () from plugins/streamer.so
[16:42:54] [debug] #14 080e6d5f in ?? () from ./samp03svr
[16:42:54] [debug] #15 080ad721 in ?? () from ./samp03svr
[16:42:54] [debug] #16 080a894e in ?? () from ./samp03svr
[16:42:54] [debug] #17 b746ea83 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
I'm running Ubuntu 14.04 LTS on 32 bit with SA-MP 0.3.7-RC2

Thank you.
Reply
#2

-removed-
Reply
#3

If I remember correctly, CallLocalFunction can crash the server if you pass an empty string so be sure it's not null before pass it as an argument.
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
If I remember correctly, CallLocalFunction can crash the server if you pass an empty string so be sure it's not null before pass it as an argument.
Here are some snippets of where I used CallLocalFunction:
pawn Код:
case THREAD_LOAD_ACCOUNT:
        {
            cache_get_field_content(0, "accountindex", result); PlayerData[extra][AccountID] = strval(result);
           
            cache_get_field_content(0, "admin", result); PlayerData[extra][Admin] = strval(result);
            cache_get_field_content(0, "vip", result); PlayerData[extra][VIP] = strval(result);

            cache_get_field_content(0, "money", result); PlayerData[extra][Money] = strval(result);
            cache_get_field_content(0, "bankmoney", result); PlayerData[extra][BankMoney] = strval(result);
            cache_get_field_content(0, "score", result); PlayerData[extra][Score] = strval(result);
            cache_get_field_content(0, "tutorialcomplete", result); PlayerData[extra][TutorialCompleted] = strval(result);
           
            cache_get_field_content(0, "skin", result); PlayerData[extra][Skin] = strval(result);
            cache_get_field_content(0, "mph", result); PlayerData[extra][MPH] = strval(result);
           
            cache_get_field_content(0, "posx", result); PlayerData[extra][posX] = strval(result);
            cache_get_field_content(0, "posy", result); PlayerData[extra][posY] = strval(result);
            cache_get_field_content(0, "posz", result); PlayerData[extra][posZ] = strval(result);

            CallLocalFunction("OnPlayerLoginEx", "i", extra);
        }
pawn Код:
forward OnPlayerLogoutEx(playerid, reason);
public OnPlayerLogoutEx(playerid, reason)
{
    if (PlayerData[playerid][Logged])
    {
        CallLocalFunction("OnPlayerSave", "i", playerid);
        PlayerData[playerid][Logged] = 0;
    }
    return 1;
}
pawn Код:
public OnGameModeExit()
{
    new reason[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        CallLocalFunction("OnPlayerLogoutEx", "ii", i, reason);
    }
   
    mysql_close();
    return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    KillTimer(Anticheat[playerid]);
    KillTimer(SaveCurrent[playerid]);
    KillTimer(pTextD[playerid]);
   
    CallLocalFunction("OnPlayerLogoutEx", "ii", playerid, reason);
   
    ResetMissionData(playerid);

    PlayerTextDrawHide(playerid, HDGTextdraw0[playerid]);
    PlayerTextDrawHide(playerid, HDGTextdraw1[playerid]);
    PlayerTextDrawHide(playerid, HDGTextdraw2[playerid]);
    PlayerTextDrawHide(playerid, HDGTextdraw3[playerid]);
    PlayerTextDrawHide(playerid, HDGTextdraw4[playerid]);
    PlayerTextDrawHide(playerid, HDGTextdraw5[playerid]);
    PlayerTextDrawHide(playerid, HDGTextdraw6[playerid]);
    PlayerTextDrawHide(playerid, HDGTextdraw7[playerid]);
   
    if(IsBeingSpeced[playerid] == 1)
    {
        foreach(Player,i)
        {
            if(spectatorid[i] == playerid)
            {
                TogglePlayerSpectating(i,false);
            }
        }
    }
    return 1;
}
pawn Код:
if (response)
            {
                if (strlen(inputtext) < 3)
                {
                    new dialogtitle[48], dialoginfo[197];
                    format(dialogtitle, sizeof(dialogtitle), "{FFFFFF}Project: Aviation - Register!");
                    format(dialoginfo, sizeof(dialoginfo), "{FFFFFF}Welcome to the server, %s!\n\nThis account is not registered and you may continue by registering it below.\nYou must have at least three characters in your password.\n", GetPlayerNameEx(playerid, 1));
                    return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, dialogtitle, dialoginfo, "Register", "Cancel");
                }
                WP_Hash(PlayerData[playerid][Password], 129, inputtext);

                CallLocalFunction("OnPlayerRegister", "i", playerid);
            }
I really can't see the problem.
Reply
#5

Issue fixed after I removed a lookup include which is downloaded earlier today.

-solved-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)