IS4Code / YSF

YSF Server Functions
Other
98 stars 34 forks source link

New crashes since R18 #50

Closed rt-2 closed 7 years ago

rt-2 commented 7 years ago

Hello (It's me again), Sorry to flood you with issues, but I have narrowed a problem with the new version R18-2 of YSF. I recently updated from R16, my server almost never crashed (or almost) before. Now that I updated to R18-2, I have experienced 3 crashes in less than 10h of operations. I started my server at 01:55:40 before going to sleep, it crashed at 06:53:08 the same day. I restarted it back at 11:27:56 and it crashed again at 14:03:00, then I restarted it again at 19:09:22 and it crashed at 20:09:28. So it never been able to stay up for more than a couple hours before crashing. Then I recompiled the same script with R16 and restarted it and it has been up with no problem for more than 12h now and I am very confident that the new version of YSF was the cause, since I only changed that and the problem disappeared. All 3 times that the server crashed, the last thing in the log was a printf in OnPlayerDisconnect, so I suspect something in there, also, there is a message like [part] Player_Name has left the server (X:X) that is supposed to come on, it's not, my OnPlayerDisconnect is executed, but the server crashed before officially writing the player disconnection in the server_log (the message generated by SAMP itself). Crashdetect is installed and I have tested it, but nothing comes out with those crashes, the last thing I know is that OnPlayerDisconnect was executed.

Thank you, rt-2

ghost commented 7 years ago

Intresting.. Are you do something at OnPlayerDisconnect with dialogs? Or with some ysf function?

rt-2 commented 7 years ago

I will do some research in my script and try to find something, I will respond in about 30-60min

rt-2 commented 7 years ago

I will tell you one thing from the log file, players concerned by the OnPlayerDisconnect possibly all had dialog showing when they disconnected and/or were kicked. I am never showing a dialog IN OnPlayerDisconnect but when it crashed, the players were be kicked with a dialog shown about 300-1500ms before, or had a dialog showing when disconnected. I am 70% sure of that with the logs. I am gonna do my research now in the script for anythign dialog or YSF in any OnPlayerDisconnect. Thank you

ghost commented 7 years ago

I have fixed somr bugs couple of days ago but nowadays i dont have internet access on my pc so i cant bring a new release

rt-2 commented 7 years ago

Do you have any idea when you will be able to release a fixed version? If there is any way I can help out let me know. Thank you,

ghost commented 7 years ago

Might after one week, however i will to try connect my pc to mobile internet which is 64kbit/s..

Anyway do you need a Linux build for tesing too or just windows.is enough?

rt-2 commented 7 years ago

Windows is the version I am using, I don't have any machine able to test the Linux version at the moment.

ghost commented 7 years ago

Latest build, hope it will work: https://www.solidfiles.com/v/33maL3q8K5PPr

Also please test AttachDynamicObjectToPlayer that it is fixed or not.

rt-2 commented 7 years ago

Thank you, sorry for the delay of answer. I will try this, and before tomorrow morning I will give you an answer about the crashes, and as soon as I restart the server I will tell you about the first person and AttachDynamicObjectToPlayer.

Thank you, rt-2

rt-2 commented 7 years ago

Hi, I have tested today, the AttachDynamicObjectToPlayer is working for me like before. I have not been able to crash the server intentionally with the old public build so we will have to wait and see if the crashes come back with this new one. I started my server now and if tomorrow morning it is still up I will be pretty confident that the crash bug is fixed for good...

I hope this works, I will keep you updated in about 12-14h max when I will wake up, Thank you very much for your help sir, rt-2

rt-2 commented 7 years ago

Well, Unfortunately, I was going to sleep, logging off my admin made the server crash. There was no dialog shown when I logged off. I have reverted to R16 now. I will investigate tomorrow but will only do some tests next week not to disturb the weekend player rush.

ghost commented 7 years ago

Best would be if you could give me what crashdetect reports

rt-2 commented 7 years ago

Unfortunately there is nothing from crashdetect, I have tested it working(crashdetect), but nothing printed when the crashes happens.

rt-2 commented 7 years ago

Hello, I have seen that you made some other changes lately, Do you think it would be worthy to try out your latest build? Sorry if I cannot give more information, the crash detect plugin doesn't print anything on those crashes unfortunately.

Thank you, rt-2

ghost commented 7 years ago

I think yes, iwill upload a compiled version soon or if you have vs2015 you can do it for yourself

rt-2 commented 7 years ago

Yesterday I compiled it, tried it, still crashed on OnPlayerDisconnect unfortunatly, but not everytime.

ghost commented 7 years ago

Check the latest post on sampforums, that build which íve uploaded couple of hours ago must work. Thanks

rt-2 commented 7 years ago

Ok thank you, I will test it tonight and will come back with the result tomorrow morning, for me the crash is happening pretty fast (1-6h max) so I will be able to tell almost for sure if it is fixed.

rt-2 commented 7 years ago

Hello, It now been 2 days and no crashes, I think it is safe to say that it is fixed. One thing tho, I sourced out something, I think it may have happened when something like: new message[144]; SendClientMessage(playerid, 0xFFFFFFDD, message); was called, meaning a client message with an empty string. Anyway the crashes are fixed with R19, Thank you very much for your work!

ghost commented 7 years ago

This bug which we was talking about caused by some bugged code with object material texts, thats 100% :)