SA-MP Forums Archive
Clothes system crashing my server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Clothes system crashing my server (/showthread.php?tid=653745)



Clothes system crashing my server - Ducati - 11.05.2018

I'm not sure how much info is required here to get help with this, but I'm having trouble pinpointing exactly what is causing my server to crash, even though I know the line which is causing it.

Ive spent hours on my test server adding, editing, removing about 30 different clothing items, resizing them, moving them around, etc. and cannot recreate the crash. However, when used on my main server it randomly causes a server crash (happened first time at 28 players, and a second time (after I thought id fixed it) at 14 players).
The problem is that I have no idea which player did what in order to cause the crash, so cannot recreate it myself in order to start fixing the problem.


I know this isn't much information but is it enough for any of you out there to give me some idea what could be causing this line to create a crash?
Код:
SaveClothingObjects(playerid, Index, clothid, bone, Float:c_foffsetX, Float:c_foffsetY, Float:c_foffsetZ, Float:c_fRotX, Float:c_fRotY, Float:c_fRotZ, Float:c_fScaleX, Float:c_fScaleY, Float:c_fScaleZ)
{
    new F1[15],F2[15],F3[15],F4[15],F5[15],F6[15],F7[15],F8[15],F9[15],F10[15],F11[15];

    if(dini_Exists(UserClothPath(playerid)))
    {
    format(F1,15,"O_Model_%d",Index);
    dini_IntSet(UserClothPath(playerid),F1,clothid);

    format(F2,15,"O_Bone_%d",Index);///////////CRASHES SERVER
    dini_IntSet(UserClothPath(playerid),F2,bone);

	format(F3,15,"O_OffX_%d",Index);
	dini_FloatSet(UserClothPath(playerid),F3,c_foffsetX);

    format(F4,15,"O_OffY_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F4,c_foffsetY);

    format(F5,15,"O_OffZ_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F5,c_foffsetZ);

    format(F6,15,"O_RotX_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F6,c_fRotX);

    format(F7,15,"O_RotY_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F7,c_fRotY);

    format(F8,15,"O_RotZ_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F8,c_fRotZ);

    format(F9,15,"O_ScaleX_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F9,c_fScaleX);

    format(F10,15,"O_ScaleY_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F10,c_fScaleY);

    format(F11,15,"O_ScaleZ_%d",Index);
    dini_FloatSet(UserClothPath(playerid),F11,c_fScaleZ);
    }
}



Re: Clothes system crashing my server - Fairuz - 12.05.2018

Compile your scripts with -d3 and post the last server log here when crashed.


and.. why are you still using dini? SQL is better option.


Re: Clothes system crashing my server - Ducati - 13.05.2018

Quote:
Originally Posted by Dice_
Посмотреть сообщение
Compile your scripts with -d3 and post the last server log here when crashed.


and.. why are you still using dini? SQL is better option.
I stupidly rebooted the server before checking/saving the logs and it overwrote (ultra-h). I cant manage to recreate the problem so I cant get the crashdetect info again

I'm using dini because I don't know enough about SQL to re-script it to save with MySQL.

Any ideas what the problem could possibly be from the line shown above? like multiple clothes attached to the same bone, etc


Re: Clothes system crashing my server - andrejc999 - 13.05.2018

Quote:
Originally Posted by Dice_
Посмотреть сообщение
Compile your scripts with -d3 and post the last server log here when crashed.


and.. why are you still using dini? SQL is better option.
A bit off topic but what is called compiling with -d3?


Re: Clothes system crashing my server - Dayrion - 13.05.2018

Quote:
Originally Posted by andrejc999
Посмотреть сообщение
A bit off topic but what is called compiling with -d3?
https://github.com/Zeex/samp-plugin-...ith-debug-info


Re: Clothes system crashing my server - Ducati - 15.05.2018

post is at the bottom now we here
bump


Re: Clothes system crashing my server - CodeStyle175 - 15.05.2018

no dont use dini for clothing items, its slowest possible way to save anything


Re: Clothes system crashing my server - GTLS - 15.05.2018

Possibly a wrong skin ID or something? - https://sampwiki.blast.hk/wiki/Skins:All

Also, It could be your host (Ultra-H)'s fault. It was not able to handle your server resources or something.

Also, tell me how'd you know that Clothing system is the one causing this problem?


Re: Clothes system crashing my server - Ducati - 15.05.2018

Quote:
Originally Posted by GTLS
Посмотреть сообщение
Possibly a wrong skin ID or something? - https://sampwiki.blast.hk/wiki/Skins:All

Also, It could be your host (Ultra-H)'s fault. It was not able to handle your server resources or something.

Also, tell me how'd you know that Clothing system is the one causing this problem?
All the skin IDs seem correct, they preview properly in the class selection and work properly when spawned, I was also thinking it could be an ultra-H issue, I'm having trouble with it writing other info too (like AKA information to a .txt after 65 lines) but I cant think of any way around that without changing host

I know its the clothing because I saved the 'problem line' it gave in the server log before accidentally clearing the rest of the information from it, also the problem only occurs when ive got the clothes cmds enabled.
Ran the server for 3 weeks without the clothes and it didn't crash once, then when I turn it on it crashes within a few hours.

I'm piss poor at MySQL related stuff so I cant even upgrade it from dini