Jump to content
  • 0

Problemă Crash


Alexx.

Question

Problema intalnita (descriere): Salutare SA-MP România, am nevoie de ajutorul vostru în legătură cu o mare problemă. Serverul ia crash în momentul în care playerii se împușcă, după 1-2 gloanțe trase, dar nu tot timpul, are perioade. Dacă nu se împușcă nimeni nu are probleme.. Nu știu care este problema și nu îmi dau seama cum să rezolv asta... Am băgat crashdetect și primesc o groază de debug-uri. Vă rog să mă ajutați.
Ero(area / rile) / warning-(ul / urile): Aceasta o primesc de cele mai multe ori, ea predomină în server_log:

[21:55:37] [debug] Run time error 4: "Array index out of bounds"
[21:55:37] [debug]  Accessing element at index 49 past array upper bound 48
[21:55:37] [debug] AMX backtrace:
[21:55:37] [debug] #0 000674bc in public SetPlayerUnjail () from Gamemode.amx

Și mai sunt câteva ce apar mai rar:

[22:38:24] [debug] Run time error 4: "Array index out of bounds"
[22:38:24] [debug]  Accessing element at index 65535 past array upper bound 499
[22:38:24] [debug] AMX backtrace:
[22:38:24] [debug] #0 00072ecc in public OnPlayerTakeDamage (0, 65535, 1103367301, 54, 3) from Gamemode.amx
[22:39:52] [debug] Run time error 4: "Array index out of bounds"
[22:39:52] [debug]  Accessing element at index 65535 past array upper bound 499
[22:39:52] [debug] AMX backtrace:
[22:39:52] [debug] #0 00072ecc in public OnPlayerTakeDamage (1, 65535, 1126498304, 54, 3) from Gamemode.amx
[22:39:52] [debug] Run time error 4: "Array index out of bounds"
[22:39:52] [debug]  Accessing element at index 65535 past array upper bound 499
[22:39:52] [debug] AMX backtrace:
[22:39:52] [debug] #0 0008d1d4 in public AB_OnPlayerDeath (1, 65535, 54) from Gamemode.amx
[22:39:52] [debug] #1 0001e964 in public fk_OnPlayerDeath (1, 65535, 54) from Gamemode.amx
[22:39:52] [debug] #2 00018aa0 in public OnPlayerDeath (1, 65535, 54) from Gamemode.amx
[22:39:52] [death] Admin. died 54


Liniile de cod / sursa / script-ul(obligatoriu): SetPlayerUnjail OnPlayerTakeDamage OnPlayerDeath
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: M-am uitat la fiecare public, dar tot nu îi dau de cap. 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Deci, am rezolvat prima problemă, acum nu imi mai apare în server_log debug-ul:

[21:55:37] [debug] Run time error 4: "Array index out of bounds"
[21:55:37] [debug]  Accessing element at index 49 past array upper bound 48
[21:55:37] [debug] AMX backtrace:
[21:55:37] [debug] #0 000674bc in public SetPlayerUnjail () from Gamemode.amx

Informații cu care vă mai pot ajuta:

Acum apare mereu acest debug

[19:54:21] [debug] Run time error 4: "Array index out of bounds"
[19:54:21] [debug]  Accessing element at index 611 past array upper bound 610
[19:54:21] [debug] AMX backtrace:
[19:54:21] [debug] #0 000885a4 in ?? (611) from Gamemode.amx
[19:54:21] [debug] #1 00166314 in public SaveData () from Gamemode.amx

Am căutat în gamemode [611] și am găsit:

new vehSlots[611];
new vehName[611][611];
new vehPrice[611];
new vehPprice[611];

Și am scris 610, dar apoi apare că array-ul este de 610, pun 609 și tot așa...

 

Iar o altă informație foarte importantă este atunci când împușc un player, chiar înainte de restart găsesc:

[20:07:03] [debug] Server crashed while executing Gamemode.amx
[20:07:03] [debug] AMX backtrace:
[20:07:03] [debug] #0 native SendClientMessage () from samp03svr
[20:07:03] [debug] #1 0008d540 in public AB_OnPlayerDeath (1, 0, 34) from Gamemode.amx
[20:07:03] [debug] #2 0001e964 in public fk_OnPlayerDeath (1, 0, 34) from Gamemode.amx
[20:07:03] [debug] #3 00018aa0 in public OnPlayerDeath (1, 0, 34) from Gamemode.amx
[20:07:03] [debug] Native backtrace:
[20:07:03] [debug] #0 f6bd4e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[20:07:03] [debug] #1 f6bcdbcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[20:07:03] [debug] #2 f6bcedbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[20:07:03] [debug] #3 f6bcf226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[20:07:03] [debug] #4 f6bd4adc in ?? () from plugins/crashdetect.so
[20:07:03] [debug] #5 f7719410 in ?? ()
[20:07:03] [debug] #6 f74642f4 in _IO_vfprintf () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[20:07:03] [debug] #7 f748401c in vsprintf () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[20:07:03] [debug] #8 080ad731 in ?? () from samp03svr
[20:07:03] [debug] #9 080d99e9 in ?? () from samp03svr
[20:07:03] [debug] #10 080950e4 in ?? () from samp03svr
[20:07:03] [debug] #11 f6bd094b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[20:07:03] [debug] #12 f6bd38f8 in ?? () from plugins/crashdetect.so
[20:07:03] [debug] #13 f6bd7916 in amx_Exec () from plugins/crashdetect.so
[20:07:03] [debug] #14 f6bcfbe6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[20:07:03] [debug] #15 f6bd3659 in ?? () from plugins/crashdetect.so
[20:07:03] [debug] #16 f6b1127c in ?? () from plugins/streamer.so
[20:07:03] [debug] #17 080a5347 in ?? () from samp03svr
[20:07:03] [debug] #18 080cb2b2 in ?? () from samp03svr
[20:07:03] [debug] #19 080b1002 in ?? () from samp03svr
[20:07:03] [debug] #20 08071d38 in ?? () from samp03svr
[20:07:03] [debug] #21 08071e32 in ?? () from samp03svr
[20:07:03] [debug] #22 0807bc50 in ?? () from samp03svr
[20:07:03] [debug] #23 080aed3d in ?? () from samp03svr
[20:07:03] [debug] #24 080aef02 in ?? () from samp03svr
[20:07:03] [debug] #25 080aa13a in ?? () from samp03svr
[20:07:03] [debug] #26 f7436e46 in __libc_start_main () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[20:07:03] [debug] #27 0804b4e1 in ?? () from samp03svr

Și apoi serverul primește crash.. Asta se întâmplă de fiecare dată când playerii se împușcă, dar nu știu ce să fac la OnPlayerDeath..

Link to comment
Share on other sites

  • 0

public SaveData()
{
        foreach(Player, x)
        {
            savePlayerData(x);
        }
        for(new xh = 0; xh < MAX_HOUSES; xh++)
        {
            saveHouse(xh);
        }
        for(new xf = 0; xf < MAX_GROUPS; xf++)
        {
            saveGroup(xf);
        }
        for(new xc = 0; xc < MAX_CLANS; xc++)
        {
            saveClan(xc);
        }
        for(new xf = 0; xf < MAX_BUSINESSES; xf++)
        {
            saveBusiness(xf);
        }
        for(new xf = 0; xf < MAX_ASSETS; xf++)
        {
            saveAsset(xf);
        }
        for(new ff = 0; ff < 612; ff++)
        {
            saveDealer(ff);
        }
}

EDIT: Am rezolvat cu SaveData, acum nu îmi mai apare acel debug. Dar încă am probleme cu restartul.. Când împușc un player se restartează.. De exemplu am rezolvat un contract în hitman, imediat s-a restartat. Apoi l-am împușcat cu un deagle fără să am contract pe el (prima dată am crezut că e de la contract) și tot se restartează..

Tot asta îmi arată în server_log:

[19:23:52] [debug] Server crashed while executing Gamemode.amx
[19:23:52] [debug] AMX backtrace:
[19:23:52] [debug] #0 native SendClientMessage () from samp03svr
[19:23:52] [debug] #1 0008d540 in public AB_OnPlayerDeath (1, 0, 34) from Gamemode.amx
[19:23:52] [debug] #2 0001e964 in public fk_OnPlayerDeath (1, 0, 34) from Gamemode.amx
[19:23:52] [debug] #3 00018aa0 in public OnPlayerDeath (1, 0, 34) from Gamemode.amx
[19:23:52] [debug] Native backtrace:
[19:23:52] [debug] #0 f6c44e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[19:23:52] [debug] #1 f6c3dbcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[19:23:52] [debug] #2 f6c3edbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[19:23:52] [debug] #3 f6c3f226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[19:23:52] [debug] #4 f6c44adc in ?? () from plugins/crashdetect.so
[19:23:52] [debug] #5 f7767410 in ?? ()
[19:23:52] [debug] #6 f74d42f4 in _IO_vfprintf () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[19:23:52] [debug] #7 f74f401c in vsprintf () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[19:23:52] [debug] #8 080ad731 in ?? () from samp03svr
[19:23:52] [debug] #9 080d99e9 in ?? () from samp03svr
[19:23:52] [debug] #10 080950e4 in ?? () from samp03svr
[19:23:52] [debug] #11 f6c4094b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[19:23:52] [debug] #12 f6c438f8 in ?? () from plugins/crashdetect.so
[19:23:52] [debug] #13 f6c47916 in amx_Exec () from plugins/crashdetect.so
[19:23:52] [debug] #14 f6c3fbe6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[19:23:52] [debug] #15 f6c43659 in ?? () from plugins/crashdetect.so
[19:23:52] [debug] #16 f6b9127c in ?? () from plugins/streamer.so
[19:23:52] [debug] #17 080a5347 in ?? () from samp03svr
[19:23:52] [debug] #18 080cb2b2 in ?? () from samp03svr
[19:23:52] [debug] #19 080b1002 in ?? () from samp03svr
[19:23:52] [debug] #20 08071d38 in ?? () from samp03svr
[19:23:52] [debug] #21 08071e32 in ?? () from samp03svr
[19:23:52] [debug] #22 0807bc50 in ?? () from samp03svr
[19:23:52] [debug] #23 080aed3d in ?? () from samp03svr
[19:23:52] [debug] #24 080aef02 in ?? () from samp03svr
[19:23:52] [debug] #25 080aa13a in ?? () from samp03svr
[19:23:52] [debug] #26 f74a6e46 in __libc_start_main () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
[19:23:52] [debug] #27 0804b4e1 in ?? () from samp03svr

 

P.S.: Mai jos am atașat o îmagine care arată asta.

sa-mp-017.png

Edited by Alexx.
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.