Segmentation fault... stickenkid's MySQL
#1

So, yesterday I went to update the server and after restarting, it crashed down, logged on putty, did nohup ./samp03svr and it gave an error "Segmentation fault".
I view the server logs and it basically executes OnGameModeInit and nothing else happens after it..
We formatted the dedicated server 2 times, deleted the files, re-added fresh ones, still same problem.
However we somehow noticed it was the MySQL which was causing it, basically it somehow got corrupt or something..
So we re-created the database, added back the users files and then it worked.

Any ideas why is this happening? Why does MySQL go corrupt or something..?
Like currently we're gonna need to re-create the MySQL database every time after we restart the server.
Reply
#2

Well, I deleted all the data from "clans" table, appears it was causing it.

pawn Код:
new Query[25];
    format(Query, sizeof(Query), "SELECT * FROM clans");
    mysql_query(Query);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        new field[21];
        while(mysql_fetch_row(Query))
        {
            new id;
            mysql_fetch_int("id", id);
            mysql_fetch_string("name", Clans[id][CName]);
            mysql_fetch_int("owner", Clans[id][COwner]);
            mysql_fetch_int("maxlvl", Clans[id][CMaxLvl]);
            mysql_fetch_int("kicklvl", Clans[id][CKickLvl]);
            mysql_fetch_int("hirelvl", Clans[id][CHireLvl]);
            mysql_fetch_int("status", Clans[id][CStatus]);
            printf("id %d name %s owner %d maxlvl %d kicklvl %d hirelvl %d status %d", id, Clans[id][CName], Clans[id][COwner], Clans[id][CMaxLvl], Clans[id][CKickLvl], Clans[id][CHireLvl], Clans[id][CStatus]);
        }
    }
    mysql_free_result();
Anything wrong in this code?
It sends the print message properly

As well I see this message in the server logs:
*** Streamer Plugin: Include file version (0x27002) does not match plugin version (0x275201) (script might need to be recompiled with the latest include file)

Even though I downloaded new one (2.7.5.2) and re-compiled with it as well as I placed it's files in the dedi and on my comp.
https://github.com/samp-incognito/sa...in-2.7.5.2.zip
Reply
#3

Make sure you're using the same streamer.inc version as the plugin version, it seems to be outdated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)