SphereServer BugTracker - SphereServer
View Issue Details
0001744SphereServerexecutable - genericpublic04-05-10 02:1615-09-10 01:53
Incanus 
MrSugarCube 
highmajorrandom
resolvedfixed 
0.56c Nightly 
0.56c Nightly 
Not Available
None
None
0001744: Server and client can get out of sync about character position
This happens when a character uses some kind of teleporter and then moves quickly after this. Unfortunately it's hard to reproduce because it's kind of random.

Using the update command sets the character to the correct position.
 
Version r1265 - r1276 (not tested on earlier versions)
Windows
Client 5.04b
UseAsyncNetwork=1
UsePacketPriority=1
MaxSizePerTick=12000
MaxPacketsPerTick=50
EF_NetworkOutThread enabled
No tags attached.
related to 0001752resolved MrSugarCube Strange problem with using world items while moving. 
png outofsync.png (89,587) 04-05-10 02:16
http://tracker.sphere.torfo.org/bugs/file_download.php?file_id=31&type=bug
txt move_error.txt (4,235) 15-05-10 22:24
http://tracker.sphere.torfo.org/bugs/file_download.php?file_id=33&type=bug
txt move_correct.txt (4,235) 15-05-10 22:24
http://tracker.sphere.torfo.org/bugs/file_download.php?file_id=34&type=bug
txt error_2.txt (3,811) 31-05-10 02:39
http://tracker.sphere.torfo.org/bugs/file_download.php?file_id=38&type=bug
txt error_3.txt (6,126) 31-05-10 02:39
http://tracker.sphere.torfo.org/bugs/file_download.php?file_id=39&type=bug
Issue History
04-05-10 02:16IncanusNew Issue
04-05-10 02:16IncanusFile Added: outofsync.png
04-05-10 02:16IncanusNightly Version => Not Available
04-05-10 02:16IncanusExperimental Flags => None
04-05-10 02:16IncanusOption Flags => None
10-05-10 17:53IncanusNote Added: 0000467
15-05-10 22:24IncanusFile Added: move_error.txt
15-05-10 22:24IncanusFile Added: move_correct.txt
15-05-10 22:36IncanusNote Added: 0000470
27-05-10 13:06HOCOKNote Added: 0000477
27-05-10 13:08HOCOKNote Edited: 0000477
30-05-10 15:41MrSugarCubeNote Added: 0000481
31-05-10 02:38IncanusNote Added: 0000483
31-05-10 02:39IncanusFile Added: error_2.txt
31-05-10 02:39IncanusFile Added: error_3.txt
31-05-10 02:41IncanusNote Edited: 0000483
15-06-10 08:39MrSugarCubeNote Added: 0000490
03-07-10 00:21MrSugarCubeStatusnew => feedback
23-08-10 17:28MrSugarCubePrioritynormal => high
13-09-10 11:26MrSugarCubeRelationship addedrelated to 0001752
13-09-10 11:30MrSugarCubeNote Added: 0000620
14-09-10 04:10IncanusNote Added: 0000622
14-09-10 04:10IncanusStatusfeedback => new
14-09-10 04:34MrSugarCubeNote Added: 0000623
15-09-10 01:11IncanusNote Added: 0000624
15-09-10 01:18MrSugarCubeNote Added: 0000625
15-09-10 01:24IncanusNote Added: 0000627
15-09-10 01:53MrSugarCubeNote Added: 0000628
15-09-10 01:53MrSugarCubeStatusnew => resolved
15-09-10 01:53MrSugarCubeFixed in Version => 0.56c Nightly
15-09-10 01:53MrSugarCubeResolutionopen => fixed
15-09-10 01:53MrSugarCubeAssigned To => MrSugarCube

Notes
(0000467)
Incanus   
10-05-10 17:53   
Disabling UsePacketPriority does not fix this problem
(0000470)
Incanus   
15-05-10 22:36   
Added two SpyUO logs. The logs were created running through a teleporter logging the pacekts ReqMove (02), CharMoveRejection (21), MoveAllowed (22) and MoveMobile (20).

Sphere sends the CharMoveRejection Packet after using a teleporter, with the sequence number 0.
The error occurs when the client sends a new ReqMove Packet with sequence number 0, before it has received the CharMoveRejection packet for the teleport.
Thus the client thinks its move request got rejected causing server and client getting out of sync about the characters position.
(0000477)
HOCOK   
27-05-10 13:06   
(edited on: 27-05-10 13:08)
confirm.

it's only with new sockets, if you use sphere "September 20 2009" , there is no such problem.

you can reproduce it by putting teleport(end) 1 tile after wall, and run into teleport(start), and you will be in wall.

(0000481)
MrSugarCube   
30-05-10 15:41   
I'm struggling to reproduce this, although I have found and fixed what I think would cause this problem.

Could you please re-check this in tomorrow's automated build? (version #1287+)
(0000483)
Incanus   
31-05-10 02:38   
(edited on: 31-05-10 02:41)
Thank you, it's much better now. But I'm afraid the problem is not fixed 100%. I walked like 200 times through my test gates and the bug appeared only 2 times. Before rev 1287 I had the bug in 25% of the tests.
I'll add the SpyUO logs.

Tested with these settings on an remote server:
EF_NetworkOutThread
MaxPacketsPerTick=100
MaxQueueSize=400
MaxSizePerTick=18000
UseAsyncNetwork=1
UsePacketPriority=1

(0000490)
MrSugarCube   
15-06-10 08:39   
Is there any change on the latest automated build? (version #1289+)
(0000620)
MrSugarCube   
13-09-10 11:30   
Can someone (who was able to reproduce this) check if this is still a problem on the latest automated builds? I would like to avoid having to close this issue without knowing if it has been resolved.
(0000622)
Incanus   
14-09-10 04:10   
The bug stills exists for me on build r1332
Settings:
EF_NetworkOutThread
MaxPacketsPerTick=100
MaxQueueSize=400
MaxSizePerTick=18000
UseAsyncNetwork=1
UsePacketPriority=1
TooltipMode=1

Ping to server: 60 ms

Client: 5.04b

I found that I have the most success reproducing this bug is to run through a gate, changing direction immediately and taking the gate back in the other direction. This way I can reproduce the bug 5% of the tries.
If it helps I could make a video
(0000623)
MrSugarCube   
14-09-10 04:34   
Thanks, can you check this again on the next automated build (version #1333+)? If the problem is still present, it may also help to try with UsePacketPriority=0 as well.
(0000624)
Incanus   
15-09-10 01:11   
Thanks, seems to be fixed. I could not reproduce it anymore in like 100 tries.
(0000625)
MrSugarCube   
15-09-10 01:18   
Was that with UsePacketPriority=1 as well?
(0000627)
Incanus   
15-09-10 01:24   
yes, settings are:
EF_NetworkOutThread
MaxPacketsPerTick=100
MaxQueueSize=400
MaxSizePerTick=18000
UseAsyncNetwork=1
UsePacketPriority=1
TooltipMode=0
ToolTipCache=0
(0000628)
MrSugarCube   
15-09-10 01:53   
Great news, thanks. ;)