DEBUG ERROR [URGENT]
#1

Код:
[09:00:21] [debug] Server crashed while executing PHRP_1.2.amx
[09:00:21] [debug] AMX backtrace:
[09:00:21] [debug] #0 native fwrite () [0809aa10] from samp03svr
[09:00:21] [debug] #1 0000f9c0 in ?? () from PHRP_1.2.amx
[09:00:21] [debug] #2 002d1d18 in ?? () from PHRP_1.2.amx
[09:00:21] [debug] #3 002d1300 in public SyncTime () from PHRP_1.2.amx
[09:00:21] [debug] #4 002e3bec in public @yT_60000_SyncUp () from PHRP_1.2.amx
[09:00:21] [debug] Native backtrace:
[09:00:21] [debug] #0 0019f09b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[09:00:21] [debug] #1 0019a2d2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[09:00:21] [debug] #2 0019aebc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[09:00:21] [debug] #3 0019b366 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[09:00:21] [debug] #4 0019ecec in ?? () from plugins/crashdetect.so
[09:00:21] [debug] #5 001df40c in ?? ()
[09:00:21] [debug] #6 001df424 in ?? ()
[09:00:21] [debug] #7 002f5b11 in gsignal () from /lib/libc.so.6
[09:00:21] [debug] #8 002f73ea in abort () from /lib/libc.so.6
[09:00:21] [debug] #9 002eee2b in ?? () from /lib/libc.so.6
[09:00:21] [debug] #10 002eeee6 in ?? () from /lib/libc.so.6
[09:00:21] [debug] #11 0809a63c in ?? () from ./samp03svr
[09:00:21] [debug] #12 0809aa9f in ?? () from ./samp03svr
[09:00:21] [debug] #13 08093d84 in ?? () from ./samp03svr
[09:00:21] [debug] #14 00197b9c in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[09:00:21] [debug] #15 0019dd38 in ?? () from plugins/crashdetect.so
[09:00:21] [debug] #16 001a41f8 in amx_Exec () from plugins/crashdetect.so
[09:00:21] [debug] #17 0019a218 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[09:00:21] [debug] #18 0019daa9 in ?? () from plugins/crashdetect.so
[09:00:21] [debug] #19 080e57a5 in ?? () from ./samp03svr
[09:00:21] [debug] #20 080acedb in ?? () from ./samp03svr
[09:00:21] [debug] #21 080a81ae in ?? () from ./samp03svr
[09:00:21] [debug] #22 002e1d26 in __libc_start_main () from /lib/libc.so.6
[09:00:21] [debug] #23 0804b4a1 in ?? () from ./samp03svr
How to fix?
Reply
#2

A problem from "samp03svr" sucks free hosting
Reply
#3

Quote:
Originally Posted by ChuckyBabe
Посмотреть сообщение
A problem from "samp03svr" sucks free hosting
SHIT, So what do i need to do?
Reply
#4

Change your free hosting..
Reply
#5

https://github.com/Zeex/samp-plugin-...ith-debug-info

And then post the server_logs here. It is some sort of crash related to your script, it doesn't relates to your hosting.

Some hints are mentioned too:

Код:
[09:00:21] [debug] #3 002d1300 in public SyncTime () from PHRP_1.2.amx
[09:00:21] [debug] #4 002e3bec in public @yT_60000_SyncUp () from PHRP_1.2.amx
Post those callback(s) here.
Reply
#6

Quote:
Originally Posted by iZN
Посмотреть сообщение
https://github.com/Zeex/samp-plugin-...ith-debug-info

And then post the server_logs here. It is some sort of crash related to your script, it doesn't relates to your hosting.

Some hints are mentioned too:

Код:
[09:00:21] [debug] #3 002d1300 in public SyncTime () from PHRP_1.2.amx
[09:00:21] [debug] #4 002e3bec in public @yT_60000_SyncUp () from PHRP_1.2.amx
Post those callback(s) here.
pawn Код:
forward SyncTime();
public SyncTime()
{
    new string[64];
    new tmphour;
    new tmpminute;
    new tmpsecond;
    gettime(tmphour, tmpminute, tmpsecond);
    FixHour(tmphour);
    tmphour = shifthour;
    if((tmphour > ghour) || (tmphour == 0 && ghour == 23))
    {
        format(string, sizeof(string), "The time is now %d:00.",tmphour);
        SendClientMessageToAllEx(COLOR_WHITE,string);
        ghour = tmphour;
        TotalUptime += 1;
        PayDay();

        SetWorldTime(tmphour);

        SaveFamilies();
    }
}
Reply
#7

https://sampwiki.blast.hk/wiki/Fwrite

It's in SaveFamilies or in a function inside SaveFamilies that uses fwrite and it doesn't check if the file handle is valid before writing to the file (+ closing the file). There is an example in the wiki (link above).

EDIT:

Quote:
Originally Posted by EpicMan
Посмотреть сообщение
Change your hosting or change your script
This is not a solution.. it's scripting mistake.
Reply
#8

Change your hosting or change your script
Reply
#9

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/Fwrite

It's in SaveFamilies or in a function inside SaveFamilies that uses fwrite and it doesn't check if the file handle is valid before writing to the file (+ closing the file). There is an example in the wiki (link above).

EDIT:



This is not a solution.. it's scripting mistake.
!
Код:
stock SaveFamilies()
{
	new idx;
	new File: file2;
	while (idx < sizeof(FamilyInfo))
	{
		new coordsstring[512];
		format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%d|%d|%d|%f|%f|%f|%d|%d|%d|%s|%s|%s|%s|%s|%s|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
		FamilyInfo[idx][FamilyTaken],
		FamilyInfo[idx][FamilyName],
		FamilyInfo[idx][FamilyMOTD],
		FamilyInfo[idx][FamilyLeader],
		FamilyInfo[idx][FamilyBank],
		FamilyInfo[idx][FamilyCash],
		FamilyInfo[idx][FamilyUSafe],
		FamilyInfo[idx][FamilySafe][0],
		FamilyInfo[idx][FamilySafe][1],
		FamilyInfo[idx][FamilySafe][2],
		FamilyInfo[idx][FamilyPot],
		FamilyInfo[idx][FamilyCrack],
		FamilyInfo[idx][FamilyMats],
		FamilyInfo[idx][FamilyRank1],
		FamilyInfo[idx][FamilyRank2],
		FamilyInfo[idx][FamilyRank3],
		FamilyInfo[idx][FamilyRank4],
		FamilyInfo[idx][FamilyRank5],
		FamilyInfo[idx][FamilyRank6],
		FamilyInfo[idx][FamilyMembers],
		FamilyInfo[idx][FamilyMaxSkins],
		FamilyInfo[idx][FamilySkins][0],
		FamilyInfo[idx][FamilySkins][1],
		FamilyInfo[idx][FamilySkins][2],
		FamilyInfo[idx][FamilySkins][3],
		FamilyInfo[idx][FamilySkins][4],
		FamilyInfo[idx][FamilySkins][5],
		FamilyInfo[idx][FamilySkins][6],
		FamilyInfo[idx][FamilySkins][7],
		FamilyInfo[idx][FamilyColor],
		FamilyInfo[idx][FamilyTurfTokens],
		FamilyInfo[idx][FamilyGuns][0],
		FamilyInfo[idx][FamilyGuns][1],
		FamilyInfo[idx][FamilyGuns][2],
		FamilyInfo[idx][FamilyGuns][3],
		FamilyInfo[idx][FamilyGuns][4],
		FamilyInfo[idx][FamilyGuns][5],
		FamilyInfo[idx][FamilyGuns][6],
		FamilyInfo[idx][FamilyGuns][7],
		FamilyInfo[idx][FamilyGuns][8],
		FamilyInfo[idx][FamilyGuns][9]);
		if(idx == 0)
		{
			file2 = fopen("families.cfg", io_write);
		}
		else
		{
			file2 = fopen("families.cfg", io_append);
		}
		fwrite(file2, coordsstring);
		idx++;
		fclose(file2);
	}
	return 1;
}
Reply
#10

2 Suggestions:

1) There are better ways of saving some data such as SQL and y_ini. Using file functions is not very recommended.
2) In case you don't want to change, you should have a variable and store to it how many loaded families there are so you can loop through only them. If there are 10 families and the size of FamilyInfo is 50, the 40 families left will be saved as empty.

pawn Код:
stock SaveFamilies()
{
    new File: file2 = fopen("families.cfg", io_append), coordsstring[512];
    if (file2)
    {
        for (new idx; idx != sizeof(FamilyInfo); ++idx)
        {
            format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%d|%d|%d|%f|%f|%f|%d|%d|%d|%s|%s|%s|%s|%s|%s|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
            FamilyInfo[idx][FamilyTaken],
            FamilyInfo[idx][FamilyName],
            FamilyInfo[idx][FamilyMOTD],
            FamilyInfo[idx][FamilyLeader],
            FamilyInfo[idx][FamilyBank],
            FamilyInfo[idx][FamilyCash],
            FamilyInfo[idx][FamilyUSafe],
            FamilyInfo[idx][FamilySafe][0],
            FamilyInfo[idx][FamilySafe][1],
            FamilyInfo[idx][FamilySafe][2],
            FamilyInfo[idx][FamilyPot],
            FamilyInfo[idx][FamilyCrack],
            FamilyInfo[idx][FamilyMats],
            FamilyInfo[idx][FamilyRank1],
            FamilyInfo[idx][FamilyRank2],
            FamilyInfo[idx][FamilyRank3],
            FamilyInfo[idx][FamilyRank4],
            FamilyInfo[idx][FamilyRank5],
            FamilyInfo[idx][FamilyRank6],
            FamilyInfo[idx][FamilyMembers],
            FamilyInfo[idx][FamilyMaxSkins],
            FamilyInfo[idx][FamilySkins][0],
            FamilyInfo[idx][FamilySkins][1],
            FamilyInfo[idx][FamilySkins][2],
            FamilyInfo[idx][FamilySkins][3],
            FamilyInfo[idx][FamilySkins][4],
            FamilyInfo[idx][FamilySkins][5],
            FamilyInfo[idx][FamilySkins][6],
            FamilyInfo[idx][FamilySkins][7],
            FamilyInfo[idx][FamilyColor],
            FamilyInfo[idx][FamilyTurfTokens],
            FamilyInfo[idx][FamilyGuns][0],
            FamilyInfo[idx][FamilyGuns][1],
            FamilyInfo[idx][FamilyGuns][2],
            FamilyInfo[idx][FamilyGuns][3],
            FamilyInfo[idx][FamilyGuns][4],
            FamilyInfo[idx][FamilyGuns][5],
            FamilyInfo[idx][FamilyGuns][6],
            FamilyInfo[idx][FamilyGuns][7],
            FamilyInfo[idx][FamilyGuns][8],
            FamilyInfo[idx][FamilyGuns][9]);
           
            fwrite(file2, coordsstring);
        }
        fclose(file2);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)