Crash Debug

Započeo salvainz., Maj 25, 2020, 01:58:40 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Nedavno mi server poceo crashovat, ubacio sam crashdetect plugin i evo debug
Dio skripte: [pawn]public OnPlayerDisconnect(playerid, reason)
{
    for(new i=0; i <= GetPlayerPoolSize(); i++)
    {
        if(gPlayerLogged == 1)
        {
            if(specid == playerid)
            {
                LolSpec = 0;
            PlayerTextDrawHide(i, Spec1);
             PlayerTextDrawHide(i, Spec2);
             PlayerTextDrawHide(i, Spec3);
              PlayerTextDrawHide(i, Spec4);
               PlayerTextDrawHide(i, Spec5);
             PlayerTextDrawHide(i, Spec5);
             PlayerTextDrawHide(i, Spec7);
             PlayerTextDrawHide(i, Spec8);
             PlayerTextDrawHide(i, Spec9);
             PlayerTextDrawHide(i, Spec10);
             PlayerTextDrawHide(i, Spec11);
             PlayerTextDrawHide(i, Spec12);
            TogglePlayerSpectating(i, 0);
            EnterijerIzasao(i);
            //SpawnPlayer(i);
            if(IsPlayerInAnyVehicle(i)) UpaliTDVozilo(i);
            IGTDsShow(i);
            specid = 9999;
         }
      }
   }
      SetTimerEx("RekordTimer", 50, false, "d", playerid);
    EnCV[playerid] = -1;
   gActivePlayers[playerid]--;
   OnPlayerDisconnect(playerid, reason);
       new Float:hppp, Float:armmm;
      GetPlayerHealth(playerid, hppp);
      GetPlayerArmour(playerid, armmm);
      PlayerInfo[playerid][pCHP] = hppp;
      PlayerInfo[playerid][pCArmour] = armmm;
      if(armmm > playerarmour[playerid])
      {
           PlayerInfo[playerid][pCHP] = 0;
         PlayerInfo[playerid][pCArmour] = 0;
      }
      if(UsaoTek[playerid] == 1)
      {
          PlayerInfo[playerid][pCHP] = 0;
         PlayerInfo[playerid][pCArmour] = 0;
      }
//==============================================================================
   numplayers--;
   PlayerInfo[playerid][pAdjustable] = 1;
   SavePlayer(playerid);
   RoadBlockDeployed[playerid] = 0;
   DestroyDynamicObject(PlayerRB[playerid]);
   KillTimer(RentTimer[playerid]);
   KillTimer(SMTimer[playerid]);
   KillTimer(SHPTimer[playerid]);
   KillTimer(SARMTimer[playerid]);
   KillTimer(TPTimer[playerid]);
   if(IgracRanet[playerid] >= 1) { lz_GivePlayerMoney(playerid, -1500); IgracRanet[playerid] = 0; }
   for(new i = 0; i <= GetPlayerPoolSize(); i++)
   {
       if(IsPlayerConnected(i))
       {
           if(TaxiAccepted < 999)
           {
              if(TaxiAccepted == playerid)
              {
                  TaxiAccepted = 999;
                  GameTextForPlayer(i, "~w~Taksi povik~n~~r~Se iskjuci od igra", 5000, 1);
                  TaxiCallTime = 0;
                  lz_DisablePlayerCheckpoint(i);
              }
           }
           else if(BusAccepted < 999)
           {
              if(BusAccepted == playerid)
              {
                  BusAccepted = 999;
                  GameTextForPlayer(i, "~w~Avtobus Povik~n~~r~se iskjuci od igra", 5000, 1);
                  BusCallTime = 0;
                  lz_DisablePlayerCheckpoint(i);
              }
           }
       }
   }
   if(GettingCK[playerid] < 999)
   {
       if(IsPlayerConnected(GettingCK[playerid]))
       {
           SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Vasiot karakter zamina od server, obidete se podocna.");
           OnCK[GettingCK[playerid]] = 999;
       }
   }
   if(Rentao[playerid] != 9999)
   {
      Rentao[playerid] = 9999;
   }
   if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
   {
       if(IsPlayerConnected(TransportDriver[playerid]))
      {
          new string[64];
          TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
          TransportTime[TransportDriver[playerid]] = 0;
          TransportCost[TransportDriver[playerid]] = 0;
          format(string, sizeof(string), "~w~Patnik izleze~n~~g~Zaraboteno %d den.",TransportCost[playerid]);
          GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
      }
   }
   if(GotHit[playerid] > 0)
   {
       if(GetChased[playerid] < 999)
       {
           if(IsPlayerConnected(GetChased[playerid]))
           {
              SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Vasata meta zamina od igra.");
               GoChase[GetChased[playerid]] = 999;
         }
       }
   }
   if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
   {
       KartingPlayers --;
   }
    if(TransportDuty[playerid] == 1)
   {
      TaxiDrivers -= 1;
   }
    else if(TransportDuty[playerid] == 2)
   {
      BusDrivers -= 1;
   }
   if(PlayerInfo[playerid][pJob] == 11)
   {
       if(JobDuty[playerid] == 1) { Medics -= 1; }
   }
   else if(PlayerInfo[playerid][pJob] == 7)
   {
       if(JobDuty[playerid] == 1) { Mechanics -= 1; }
   }

   SavePlayer(playerid);
}[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
[01:44:56] [01:44:56] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[01:44:56] [debug]  Stack pointer (STK) is 0x1E492CC, heap pointer (HEA) is 0x1E49290
[01:44:56] [debug] AMX backtrace:
[01:44:56] [debug] #0 000edcb8 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #1 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #2 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #3 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #4 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #5 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #6 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #7 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #8 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #9 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #10 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #11 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #12 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #13 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #14 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #15 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #16 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #17 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #18 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #19 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #20 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #21 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #22 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #23 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #24 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #25 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #26 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #27 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #28 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #29 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #30 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #31 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #32 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #33 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #34 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #35 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #36 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #37 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #38 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #39 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #40 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #41 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #42 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #43 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #44 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #45 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #46 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #47 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #48 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #49 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #50 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #51 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #52 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #53 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #54 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #55 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #56 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #57 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #58 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #59 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #60 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #61 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #62 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #63 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #64 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #65 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #66 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #67 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #68 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #69 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #70 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #71 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #72 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #73 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #74 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #75 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #76 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #77 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #78 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #79 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #80 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #81 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #82 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #83 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #84 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #85 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #86 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #87 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #88 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #89 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #90 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #91 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #92 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #93 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #94 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #95 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #96 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #97 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #98 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #99 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #100 000ee244 in public FC_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #101 native CallLocalFunction () in samp-server.exe
[01:44:56] [debug] #102 000316ac in ?? (0, 1) in Test.amx
[01:44:56] [debug] #103 00013958 in public SSCANF_OnPlayerDisconnect (0, 1) in Test.amx
[01:44:56] [debug] #104 00005c0c in public OnPlayerDisconnect (0, 1) in Test.amx

Slika/video (ukoliko je problem ingame): //

Nisam zagledao, ali sam ubedjen da je ovaj deo gde si pozvao OnPlayerDisconnect u
samom sebi sto dovodi do toga da ce on bezbroj puta da se pozove i u trenutku ti iskoristi svu slobodnu memoriju.
[pawn]
public OnPlayerDisconnect(playerid, reason)
{
    for(new i=0; i <= GetPlayerPoolSize(); i++)
    {
        if(gPlayerLogged == 1)
        {
            if(specid == playerid)
            {
                LolSpec = 0;
PlayerTextDrawHide(i, Spec1);
PlayerTextDrawHide(i, Spec2);
PlayerTextDrawHide(i, Spec3);
  PlayerTextDrawHide(i, Spec4);
    PlayerTextDrawHide(i, Spec5);
    PlayerTextDrawHide(i, Spec5);
    PlayerTextDrawHide(i, Spec7);
    PlayerTextDrawHide(i, Spec8);
    PlayerTextDrawHide(i, Spec9);
    PlayerTextDrawHide(i, Spec10);
    PlayerTextDrawHide(i, Spec11);
    PlayerTextDrawHide(i, Spec12);
TogglePlayerSpectating(i, 0);
EnterijerIzasao(i);
//SpawnPlayer(i);
if(IsPlayerInAnyVehicle(i)) UpaliTDVozilo(i);
IGTDsShow(i);
specid = 9999;
}
}
}
    SetTimerEx("RekordTimer", 50, false, "d", playerid);
    EnCV[playerid] = -1;
gActivePlayers[playerid]--;
OnPlayerDisconnect(playerid, reason); // ----------------------- obrisi ovo
    new Float:hppp, Float:armmm;
GetPlayerHealth(playerid, hppp);
GetPlayerArmour(playerid, armmm);
...
[/pawn]
Poslednja Izmena: Maj 25, 2020, 03:31:45 PRE PODNE od algorhitmically
[Include] > Optidraw
[Include] > Model-Sizes-SQL