Guten Nachmittag Breadfisher.
Ich habe momentan ein blödes Problem. Manchmal wenn ein Spieler connected und sich einloggt, aber nicht immer, crasht der Server.
Das komische daran ist, dass es laut Crashdetect nicht immer die gleiche Stelle ist, wodurch ich es nicht gut beheben kann.
Hier mal Logs und Code:
new query[128],bool:requireEmail = false,data[64],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(query, sizeof(query), "SELECT * FROM User WHERE Name = '%s'", playername);
mysql_query(query,-1,-1,connection);
mysql_store_result(connection);
mysql_fetch_field("ID",data,connection);
SetPVarInt(playerid,DBID_KEY,strval(data));
mysql_fetch_field("Admin",data,connection);
SetPVarInt(playerid,ADMIN_KEY,strval(data));
mysql_fetch_field("Email",data,connection);
SetPVarString(playerid,EMAIL_KEY,data);
if(strcmp(data,"notset",true) == 0 && strlen(data) != 0)
{
requireEmail = true;
}
mysql_fetch_field("Kills",data,connection);
SetPVarInt(playerid,KILLS_KEY,strval(data));
mysql_fetch_field("Tode",data,connection);
SetPVarInt(playerid,TODE_KEY,strval(data));
mysql_fetch_field("Warn",data,connection);
SetPVarInt(playerid,WARN_KEY,strval(data));
mysql_fetch_field("Prison",data,connection);
SetPVarInt(playerid,PRISON_KEY,strval(data));
.
.
.
.
ZitatAlles anzeigen[23:14:43] [debug] Server crashed while executing Mafia-Policev9X_1.amx
[23:14:43] [debug] AMX backtrace:
[23:14:43] [debug] #0 0005fd8c in loadPlayer (playerid=0) at M:\samp03x_Mafia-Police\gamemodes\Mafia-Policev9X_1.pwn:11116
[23:14:43] [debug] #1 000454dc in public OnDialogResponse (playerid=0, dialogid=1, response=1, listitem=-1, inputtext[]=@0x00069118 "") at M:\samp03x_Mafia-Police\gamemodes\Mafia-Policev9X_1.pwn:8198
[23:14:43] [debug] System backtrace:
[23:14:43] [debug] #0 b6c090f3 in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[23:14:43] [debug] #1 b6c00b61 in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[23:14:43] [debug] #2 b6c03405 in _ZN11crashdetect15SystemExceptionEPv () from plugins/crashdetect.so
[23:14:43] [debug] #3 b6c08c42 in ?? () from plugins/crashdetect.so
[23:14:43] [debug] #4 b74c4b08 in ?? () from /lib32/libc.so.6
[23:14:43] [debug] #5 b750de30 in ?? () from /lib32/libc.so.6
[23:14:43] [debug] #6 b742bd9b in _Z9SetStringP6tagAMXiPKc () from plugins/mysql.so
[23:14:43] [debug] #7 b742f701 in _ZN7Natives19n_mysql_fetch_fieldEP6tagAMXPi () from plugins/mysql.so
[23:14:43] [debug] #8 b6c0b267 in amx_Exec () from plugins/crashdetect.so
[23:14:43] [debug] #9 b6c038b4 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[23:14:43] [debug] #10 b6c07203 in ?? () from plugins/crashdetect.so
[23:14:43] [debug] #11 080ae33f in ?? () from ./samp03svr
[23:14:43] [debug] #12 080b97da in ?? () from ./samp03svr
[23:14:43] [debug] #13 08071ae8 in ?? () from ./samp03svr
[23:14:43] [debug] #14 08071be2 in ?? () from ./samp03svr
[23:14:43] [debug] #15 0807ba00 in ?? () from ./samp03svr
[23:14:43] [debug] #16 080b59ad in ?? () from ./samp03svr
[23:14:43] [debug] #17 080b5b42 in ?? () from ./samp03svr
[23:14:43] [debug] #18 080b1453 in ?? () from ./samp03svr
[23:14:43] [debug] #19 b74b0ca6 in __libc_start_main () from /lib32/libc.so.6
[23:14:43] [debug] #20 0804b521 in ?? () from ./samp03svr
Zeile 1898 ruft nur die stock Funktion loadPlayer auf, aus dem der obige Code ist.
Zeile 11116 (die mit dem Fehler) ist in diesem Falle
mysql_fetch_field("Tode",data,connection);
Aber ich hatte auch schon Errors in denen eine der anderen mysql_fetch_field Methoden den Error geworfen hat.
Hat da jemand eine Lösung parat?
edit 1: push: letzter edit: 2.9.13 um 16:21 , also mehr als 48 h