Posts: 372
Threads: 37
Joined: Jul 2007
Reputation:
0
15.07.2011, 02:40
(
Последний раз редактировалось MisterTickle; 29.09.2011 в 12:38.
)
So I have this issue which I have narrowed down to OnPlayerUpdate as I have certain thing that happen under OnPlayerUpdate that don't happen once you get in this "desynced" state so basically you end up at a point where you can't spawn any vehicles, see any players, any players you do see are completely frozen, /freeze doesn't work on you.. you appear on the map to other people standing still.. and the only way to resolve this is to relog. I can't pin it to a specific time or event it just randomly happens and is a reoccurring problem in my script which is causing massive issues and I could use some help pinning down the problem. Thanks.
Posts: 6,129
Threads: 36
Joined: Jan 2009
If you return 0 in OnPlayerUpdate, 'this player will not be replicated to other clients'.
If you're sure that you don't return 0 in OnPlayerUpdate, please can you show us your code?
Posts: 2,203
Threads: 154
Joined: Oct 2009
Reputation:
0
Also if you have to much checks under OnPlayerUpdate than it can be lag to...(server just freeze)
Posts: 372
Threads: 37
Joined: Jul 2007
Reputation:
0
I am still having this issue and it wasn't OnPlayerUpdate as I commented out all the code I thought ti would be
Below is a message I sent to Kalcor but I received no response and the problem persist.
---
I have had an issue with my script for some time now. I have an issue which my community has nicknamed the "desync bug" It occurs are random times.. Their seems to be no individual thing that ties it down. I've tried commenting out MANY things.. Even commented out all the stuff inside OnPlayerUpdate.. tried playing with no one on but myself but people always end up getting "desynced" in which sometimes they can type text and other players will see it but not them.. time textdraws will stop working.. they can't see people moving around.. objects stop loading.. than they semi come back where they see text again and everything stops again. Sometimes they start seeing people move around yet. They can't be frozen or teleported. Pressing F5 reveals normal network statistics. I am at the wits end with diagnosing the problem. I'm on a Burstnet dedicated which I heard there are some problems with network lag and such but.. This isn't lag this is disconnection of some sort. Sometimes you can't even see when players join as the player list becomes stuck. Pings go to 0 or remain in the same position. I hope you might be able to point me in the right direction. It happens so.. spontanously its difficult to pinpoint. I could be driving on a motorcycle by myself and all of a sudden my text appears to be "lagging" (even though people claim when its happening they see me typing just fine) and objects start vanishing. The only way to ever correct this bug fully has been to relog or to force disconnect someone by adding their IP to the samp ban list and unbanning it when they reconnect. I would appreciate any help. My players have reported it appears to be happen alot when entering/exiting vehicles but I haven't found anything that could be a problem. Its the only major bug with the script I have (And I've done alot of overhauling to alot of it and still nothing changed its been going on for 6 months +)
Have you tried a different host?( Or even a blank GM? ) I see you mentioned "Burstnet" and network lag. There can be a lot of factors that could be messing up your server.
Loops that don't end.
Coding mistakes - Are you freeing MySQL - SQL result when needed, etc..?
Heavy timers?
Updated plugins?
Have you tried the Profiler plugin? Not sure if that will work since you mentioned "Network lag", but it's always an option. That can pretty much tell you what's using the most resources.
Posts: 372
Threads: 37
Joined: Jul 2007
Reputation:
0
Well I do have some pretty heavy timers but the CPU usage is pretty consistently low and it doesn't lag other than when this "desync" happens. Lots of plugins aswell. I use Files aswell not MySQL.
I have an idea of a specific system that may be the problem I'm gonna give a try but I'm also gonna try the profiler plugin.
Would there be something wrong with having a timer for speeometer that starts when you get in a vehicle and ends when you get on? I heard theirs a problem with multiple timers of the same ms causing problems (if 500 people we're on the server at once their would be 500 times all running at 1000ms) but I thought it'd be better than having a loop checking if EVERY player online was in a vehicle every second than just to have it start / end the timer when the player enters / exits a vehicle.
I haven't tried a different host yet.
Posts: 372
Threads: 37
Joined: Jul 2007
Reputation:
0
This issue still persists with nearly every avenue exhausted. I'm trying to the crash detect plugin working properly but it isn't running right.