Jump to content
  • 0

[AJUTOR] Crash


adytzabb

Question

Nume: AdytzaBB

Problem? întâlnit?: Servarul de SA:MP se restarteaza singur ( primeste crash ) comform crashdetect.so respectiv .dll

Ce am încercat pân? acum: Am instalat acel plugin , am aflat erorile ... crashurile , insa nu realizez care este problema

Erori / Warnings : 0

Codul sursa/Log/Altele:

[pawn]    [20:47:48] [debug] Server crashed while executing Godfather.amx

    [20:47:48] [debug] AMX backtrace:

    [20:47:48] [debug] #0 native fwrite () [0809aa10] from samp03svr

    [20:47:48] [debug] #1 0009dc08 in public SaveZones () from Godfather.amx

    [20:47:48] [debug] #2 000515e0 in public OnPlayerSpawn (0x00000006) from Godfather.amx

    [20:47:48] [debug] Native backtrace:

    [20:47:48] [debug] #0 f739b09b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so

    [20:47:48] [debug] #1 f73962d2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so

    [20:47:48] [debug] #2 f7396ebc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so

    [20:47:48] [debug] #3 f7397366 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so

    [20:47:48] [debug] #4 f739acec in ?? () from plugins/crashdetect.so

    [20:47:48] [debug] #5 f7767410 in ?? ()

    [20:47:48] [debug] #6 f7767430 in ?? ()

    [20:47:48] [debug] #7 f74c8951 in gsignal () from /lib32/libc.so.6

    [20:47:48] [debug] #8 f74cbd82 in abort () from /lib32/libc.so.6

    [20:47:48] [debug] #9 f74c17b8 in __assert_fail () from /lib32/libc.so.6

    [20:47:48] [debug] #10 0809a63c in ?? () from samp03svr

    [20:47:48] [debug] #11 0809aa9f in ?? () from samp03svr

    [20:47:48] [debug] #12 08093d84 in ?? () from samp03svr

    [20:47:48] [debug] #13 f7393b9c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so

    [20:47:48] [debug] #14 f7399d38 in ?? () from plugins/crashdetect.so

    [20:47:48] [debug] #15 f73a01f8 in amx_Exec () from plugins/crashdetect.so

    [20:47:48] [debug] #16 f7396218 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so

    [20:47:48] [debug] #17 f7399aa9 in ?? () from plugins/crashdetect.so

    [20:47:48] [debug] #18 080a3939 in ?? () from samp03svr

    [20:47:48] [debug] #19 080aebfa in ?? () from samp03svr

    [20:47:48] [debug] #20 08071a92 in ?? () from samp03svr

    [20:47:48] [debug] #21 08071bc2 in ?? () from samp03svr

    [20:47:48] [debug] #22 0807ba20 in ?? () from samp03svr

    [20:47:48] [debug] #23 080acbfd in ?? () from samp03svr

    [20:47:48] [debug] #24 080acda2 in ?? () from samp03svr

    [20:47:48] [debug] #25 080a81ae in ?? () from samp03svr

    [20:47:48] [debug] #26 f74b4bd6 in __libc_start_main () from /lib32/libc.so.6

    [20:47:48] [debug] #27 0804b4a1 in ?? () from samp03svr[/pawn]

[pawn]    public SaveZones()

    {

    new idx;

    new File: file2;

    while (idx < sizeof(ZoneInfo))

    {

    new coordsstring[256];

    format(coordsstring, sizeof(coordsstring), "%s|%f|%f|%f|%f|%d\n",

    ZoneInfo[idx][zOwner],

    ZoneInfo[idx][zMinX],

    ZoneInfo[idx][zMinY],

    ZoneInfo[idx][zMaxX],

    ZoneInfo[idx][zMaxY],

    ZoneInfo[idx][zTeam]);

    if(idx == 0)

    {

    file2 = fopen("Altele/gzones.cfg", io_write);

    }

    else

    {

    file2 = fopen("Altele/gzones.cfg", io_append);

    }

    fwrite(file2, coordsstring);

    idx++;

    fclose(file2);

    }

    return 1;

    }[/pawn]

Public OnPlayerSpawn

[pawn]for(new i=0; i < sizeof(ZoneInfo); i++)

    {

        new leadername[MAX_PLAYER_NAME];

        GetPlayerName(playerid,leadername,128);

        if(togzones[playerid] == 1)

        {

            GangZoneShowForPlayer(playerid, Zones, GetTeamZoneColor(ZoneInfo[zTeam]));

            if(ZoneInfo[zTakeOn] == 1 && takezone == 1) GangZoneFlashForPlayer(playerid, i, COLOR_RED);

            SetTimer("ShowZones",3000,0);

        }

        if(PlayerInfo[playerid][pLeader]==12 && ZoneInfo[zTeam] == 12)

        {

            strmid(ZoneInfo[zOwner],leadername,0,strlen(leadername),255);

            SaveZones();

        }

        else if(PlayerInfo[playerid][pLeader]==13 && ZoneInfo[zTeam] == 13)

        {

            strmid(ZoneInfo[zOwner],leadername,0,strlen(leadername),255);

            SaveZones();

        }

        else if(PlayerInfo[playerid][pLeader]==14 && ZoneInfo[zTeam] == 14)

        {

            strmid(ZoneInfo[zOwner],leadername,0,strlen(leadername),255);

            SaveZones();

        }

        else if(PlayerInfo[playerid][pLeader]==15 && ZoneInfo[zTeam] == 15)

        {

            strmid(ZoneInfo[zOwner],leadername,0,strlen(leadername),255);

            SaveZones();

        }

        else if(PlayerInfo[playerid][pLeader]==16 && ZoneInfo[zTeam] == 16)

        {

            strmid(ZoneInfo[zOwner],leadername,0,strlen(leadername),255);

            SaveZones();

        }

        else if(PlayerInfo[playerid][pLeader]==17 && ZoneInfo[zTeam] == 17)

        {

            strmid(ZoneInfo[zOwner],leadername,0,strlen(leadername),255);

            SaveZones();

        }

    }[/pawn]

PS: Functia SaveZones este utilizata OnPlayerSpawn si la sfarsitul unui takezone . Tin sa precizez ca in momentul crashului * restartului nu era nici un fel de TAKEZONE ! Posibil sa fie apelata de la OnPlayerSpawn ?

Eu am incercat sa scot functia de la OnPlayerSpawn sa vad ce efect are . Rog daca aveti idee cum as putea sa rezolv sa ma ajutati . Multumesc !

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Ca sa vezi exact la ce linie da crashul trebuie sa compilezi gamemode-ul in Debug Mode.

http://forum.sa-mp.com/showpost.php?p=1253632&postcount=7

Pe scurt: in folderul pawno creezi "pawno.cfg" si in el adaugi -d3. Apoi deschizi gamemode-ul si-l compilezi.

Apoi cand va da crash serverul, va zice exact linia la care a dat crash.

O mica sugestie: verifica daca exista acele foldere in care scrii. Vad ca zice ca problema este la o linie "fwrite", si fwrite da crash (nu mereu din cauza asta, dar de cele mai multe ori d'asta da) atunci cand nu exista acel folder. Probabil aceasta este cauza.

Link to comment
Share on other sites

Foldarele exista , functie SaveZones este apelata la fiecare sfarsit de takezone si nu genereaza crash . Mi s-a explicat prin alte parti ca exista posibiliatate ca GM-ul uneori sa nu poate deschide acel folder si ca functia mea nu tine cont daca este sau nu deschis acel folder . Am schimbat SaveZones inca nu s-a restartat servarul .... Daca se intampla din nou o sa va rog si pe voi sa ma sfatuiti cum puteti mai bine . Multumesc

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.