Hallo,
Ich habe seit kurzem ein kurioses Problem: Beim Serverstart, also beim Laden der meisten Daten aus der Mysql Datenbank stoppt der Server einfach mit der Meldung Segementation fault. Ich habe nun schon sowohl mit Strickenkid's, als auch mit BlueG's Plugin probiet. Habe das Script nacheinander für beide Plugins angepasst - leider ohne erfolg. Hier ein auszug aus der Log von dem Plugin von BlueG:
[22:04:29] ---------------------------
[22:04:29] MySQL Debugging activated (06/13/13)
[22:04:29] ---------------------------
[22:04:29]
[22:04:29] >> mysql_query( Connection handle: 1 )
[22:04:29] CMySQLHandler::Query(SELECT * FROM config LIMIT 1) - Successfully executed.
[22:04:29] >> mysql_store_result( Connection handle: 1 )
[22:04:29] CMySQLHandler::StoreResult() - Result was stored.
[22:04:29] >> mysql_num_rows( Connection handle: 1 )
[22:04:29] CMySQLHandler::NumRows() - Returned 1 row(s)
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("hausanzahl") -
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("staatskasse") -
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("steuern") -
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("kfzsteuer") -
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("benzinsteuer") -
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("vermoegenssteuer") -
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("arbeitslosengeld") -
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("lotto") -
[22:04:29] >> mysql_free_result( Connection handle: 1 )
[22:04:29] CMySQLHandler::FreeResult() - Result was successfully free'd.
[........}
[22:04:29] CMySQLHandler::Query(SELECT * FROM fraktionen WHERE id = 23) - Successfully executed.
[22:04:29] >> mysql_store_result( Connection handle: 1 )
[22:04:29] CMySQLHandler::StoreResult() - Result was stored.
[22:04:29] >> mysql_num_rows( Connection handle: 1 )
[22:04:29] CMySQLHandler::NumRows() - Returned 0 row(s)
[22:04:29] >> mysql_free_result( Connection handle: 1 )
[22:04:29] CMySQLHandler::FreeResult() - Result was successfully free'd.
[22:04:29] >> mysql_query( Connection handle: 1 )
[22:04:29] CMySQLHandler::Query(SELECT * FROM haeuser) - Successfully executed.
[22:04:29] >> mysql_store_result( Connection handle: 1 )
[22:04:29] CMySQLHandler::StoreResult() - Result was stored.
[22:04:29] >> mysql_fetch_row_format( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchRow() - Return: 0|1|niemand|1|1|1|1|1|1|1|1
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
[22:04:29] CMySQLHandler::FetchField("hid") - 0
[22:04:29] >> mysql_fetch_field_row( Connection handle: 1 )
Strickenkid's Plugin:
[Thu Jun 13 21:39:07 2013] Logging Started
[Thu Jun 13 21:39:07 2013] -------------------------
[Thu Jun 13 21:39:07 2013] Function: mysql_init executed with result: "0".
[Thu Jun 13 21:39:07 2013] Connected (0) to sa-mp @ 127.0.0.1 via TCP/IP.
[Thu Jun 13 21:39:07 2013] MySQL Server Version 5.1.66-0+squeeze1.
[Thu Jun 13 21:39:07 2013] Function: mysql_query executed: "SELECT * FROM config LIMIT 1" with result: "0".
[Thu Jun 13 21:39:07 2013] Function: mysql_store_result executed with result: "1"
[Thu Jun 13 21:39:07 2013] Function: mysql_num_rows executed with result: "%".
[Thu Jun 13 21:39:07 2013] Function: mysql_fetch_field executed.
Server log:
----------
Loaded log file: "server_log.txt".
----------
----------------------
v0.3x, (C)2005-2013 SA-MP Team
[22:02:19]
[22:02:19] Server Plugins
[22:02:19] --------------
[22:02:19] Loading plugin: mysql.so
[22:02:19]
[22:02:19] Loading plugin: streamer.so
[22:02:19]
[22:02:19] Loaded 2 plugins.
[22:02:19] Filterscripts
[22:02:19] ---------------
[22:02:19] Loaded 0 filterscripts.
[22:02:19] 1
[22:02:19] 2
[22:02:19] 3
[22:02:19] 4
[22:02:19] 5
[22:02:19] 6
[22:02:19] 7
[22:02:19] Config wurde geladen!
[22:02:19] Fraktionen werden geladen..
[22:02:19] Fraktionsid 1, Name: wurde geladen
[22:02:19] Fraktionen wurden geladen!
[22:02:19] Häuser werden geladen..
config laden:
{
print("1");
new data[128];
print("2");
mysql_query("SELECT * FROM config LIMIT 1");
print("3");
mysql_store_result();
print("4");
if(mysql_num_rows())
{
print("5");
data = "baum";
mysql_fetch_field("hausanzahl",data);
Config[hausanzahl] = strval(data);
mysql_fetch_field("staatskasse",data);
Config[staatskasse] = strval(data);
mysql_fetch_field("steuern",data);
Config[steuern] = strval(data);
mysql_fetch_field("kfzsteuer",data);
Config[kfzsteuer] = strval(data);
mysql_fetch_field("benzinsteuer",data);
Config[benzinsteuer] = strval(data);
mysql_fetch_field("vermoegenssteuer",data);
Config[vermoegenssteuer] = strval(data);
mysql_fetch_field("arbeitslosengeld",data);
Config[arbeitslosengeld] = strval(data);
mysql_fetch_field("lotto",data);
Config[lotto] = strval(data);
}
print("6");
mysql_free_result();
print("7");
return 1;
}
Häuser laden:
{
new data[128];
mysql_query("SELECT * FROM haeuser");
mysql_store_result();
new count;
new string[128], result[256];
while(mysql_fetch_row(result))
{
mysql_fetch_field("hid",data);
hInfo[count][hid] = strval(data);
mysql_fetch_field("hart",data);
hInfo[count][hArt] = strval(data);
mysql_fetch_field("hbesitzer",data);
hInfo[count][hBesitzer] = data;
mysql_fetch_field("henterx",data);
hInfo[count][hEnterX] = floatstr(data);
mysql_fetch_field("hentery",data);
hInfo[count][hEnterY] = floatstr(data);
mysql_fetch_field("henterz",data);
hInfo[count][hEnterZ] = floatstr(data);
mysql_fetch_field("hexitx",data);
hInfo[count][hExitX] = floatstr(data);
mysql_fetch_field("hexity",data);
hInfo[count][hExitY] = floatstr(data);
mysql_fetch_field("hexitz",data);
hInfo[count][hExitZ] = floatstr(data);
mysql_fetch_field("hint",data);
hInfo[count][hInt] = strval(data);
mysql_fetch_field("hpreis",data);
hInfo[count][hPreis] = strval(data);
format(string, sizeof(string), "Haus: %i, %i, %s, %f.2,%f.2,%f.2,%f.2,%f.2,%f.2,%i,%i erfolgreich geladen!",
hInfo[count][hid], hInfo[count][hArt], hInfo[count][hBesitzer], hInfo[count][hEnterX], hInfo[count][hEnterY], hInfo[count][hEnterZ],
hInfo[count][hExitX], hInfo[count][hExitY], hInfo[count][hExitZ], hInfo[count][hInt], hInfo[count][hPreis]);
print(string);
count++;
}
mysql_free_result();
}
PuTTy sagt einfach Segementation fault....
Komischerweise stoppen beide Plugins an einer anderen Stelle, ich kann euch versichern: Es hat, bevor ich apt-get upgrade durchgeführt habe(ich glaube das ist die Ursache), definitiv funktioniert.
MfG
Hammerboy