The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: freddyhayward on September 24, 2020, 08:48:53 AM

Title: "Lost synchronisation with server" report thread
Post by: freddyhayward on September 24, 2020, 08:48:53 AM
Moderator note: please do not post reports of crashes here, even if the crashes cause loss of synchronisation errors. Bugs relating to crashes should be reported on their own thread. Thank you.

The purpose of this thread is to allow users to report any losses of synchronisation without needing to locate or create an issue-specific thread. I would be grateful if James could pin this (or a similar thread).

How to generate checklist mismatch messages
1) Run simutrans-extended with the options (at least on linux, can someone let me know about Windows?) " -debug 2 -log simu.log" to generate checklist mismatch messages when they occur.
1a) If you are running a server, run it with server_frames_between_checks = 0 in simuconf.tab to ensure that mismatches are detected as soon as they occur.
2) Your client will pause upon a loss of synchronisation. If you can, please keep it paused and open! There might be further useful information hidden in the game state.
3) After you lose synchronisation, search for "disconnecting due to checklist mismatch" and post the message below here. The message should look something like this image (credit to Phystam):
(https://media.discordapp.net/attachments/737992275220627456/754778019058679858/unknown.png?width=1440&height=175)

How to investigate convoy mismatches
1) When individual convoys go out of sync, this will manifest in mismatching debug sums, shown here:
(https://i.imgur.com/q2Gur8t.png)

2) Open a calculator and divide the difference of the right-hand sum by the difference of the left-hand sum to get the ID of the convoy. If the numbers don't divide evenly, there might be multiple convoys involved, or there might be a problem with the logging system.
(https://i.imgur.com/SKzYund.png)

2) On your client, search for the ID found in the previous step by opening the vehicle list (Shift-V), click the checkbox to enable filter, click "Settings" to open the filter window, click the "Filter names:" checkbox and type in the ID. You may need to do this for multiple companies before finding it, so start with the largest companies first to speed up the process.
(https://i.imgur.com/2xdjGjS.png)

Additional notes
* Please let me know if I should add any more information or clarification.
* I'm keeping a tally of the types of mismatches here: https://docs.google.com/spreadsheets/d/1Jwa-5G6aXfkrCrPYLQvDbYt7LqYMgYapW8hyOF9IB3s/edit?usp=sharing. There's no detailed information, but it gives a general idea as to where they most frequently occur. (Update 21/11/21: I no longer maintain that spreadsheet. If anyone else wants to create and maintain one, please let me know so I can link it here.)
Title: Re: "Lost synchronisation with server" report thread
Post by: Phystam on September 25, 2020, 03:29:48 PM
sum[0] and sum[2] have differences.
(https://cdn.discordapp.com/attachments/759073854781521940/759073944367398962/unknown.png)
Title: Re: "Lost synchronisation with server" report thread
Post by: Phystam on September 25, 2020, 05:50:39 PM
And double post... This is from a participant in my server. He reported that there are "no route" messages because of low axle load just after disconnection.
(https://cdn.discordapp.com/attachments/759073854781521940/759105603334438932/unknown.png)
Title: Re: "Lost synchronisation with server" report thread
Post by: freddyhayward on September 28, 2020, 06:17:45 AM
The first convoy identified under the new debug sum system: a train departing from a station after a signal displays clear. It's unclear what the actual problem is, but hopefully a noticeable pattern will emerge in time.
(https://i.imgur.com/Na6NQSE.png)
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on September 28, 2020, 11:49:02 AM
Freddy, thank you for reworking the debug sums system to get more useful results. I take it that this can be combined with the new pause-on-desync feature to identify the convoy that caused that desync (where that is the cause). Could you please post a simple explanation of how to join the dots in the log file?
Title: Re: "Lost synchronisation with server" report thread
Post by: freddyhayward on September 28, 2020, 11:51:06 AM
Quote from: Matthew on September 28, 2020, 11:49:02 AM
Freddy, thank you for reworking the debug sums system to get more useful results. I take it that this can be combined with the new pause-on-desync feature to identify the convoy that caused that desync (where that is the cause). Could you please post a simple explanation of how to join the dots in the log file?
I have edited this into the original post. Please let me know whether anything there needs clarification.
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on September 28, 2020, 01:33:32 PM
Quote from: freddyhayward on September 28, 2020, 11:51:06 AM
I have edited this into the original post. Please let me know whether anything there needs clarification.

Thank you! That looks crystal clear, but the proof of the pudding is in the eating, which will happen when I desync.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on October 02, 2020, 11:18:22 PM
I should note that I have just incorporated some fixes by Ceeac to possible undefined behaviour. These fixes should appear in to-morrow's nightly build. It is possible that these may affect loss of synchronisation errors.
Title: Re: "Lost synchronisation with server" report thread
Post by: Phystam on October 03, 2020, 05:15:24 PM
How to output the log file (Windows10):
1) Make a shortcut for Simutrans-Extended.
2) Open the shortcut property and edit this section as the following picture:
(https://cdn.discordapp.com/attachments/665986412641779712/761999625107537940/unknown.png)
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on October 18, 2020, 12:51:17 PM
Thank you very much to Freddy for compiling the spreadsheet (https://docs.google.com/spreadsheets/d/1Jwa-5G6aXfkrCrPYLQvDbYt7LqYMgYapW8hyOF9IB3s/edit#gid=1543592078) of loss of synchronisation causes. As will be appreciated, the less frequent the loss of synchronisation, the more difficult that it is to test (as there is no reliable way to know whether any given change fixed the problem if it occurs only infrequently without waiting an extremely long time). Also, the less frequent the loss of synchronisation, the less important that remedying the problem is.

Nonetheless, it is worthwhile to try to remedy these if possible, especially the most common types. The most common types so far seem to be convoy movement based losses of synchronisation (debug sums) and halt based losses of synchronisation (rands[23]).

As to the latter, the code in the haltestelle_t::step() function most likely to show a divergence of random numbers is check_transferring_cargoes, which, when dealing with passengers, invokes the RNG by generating local pedestrians whenever passengers are released from their transferring state.

However, this means that we have very little idea of where the problem is originating, as its expression in this place could mean an origin in a vast number of different places in the code.

We already have a system to check part f this, being debug sums 6 and 7 for checking the number of transferring cargoes before and after the passenger and mail generation have run.

May I suggest that future loss of synchronisation logging should explicitly check whether there is any divergence in debug sums 6 and 7 when recording a loss of synchronisation at rands[23]?
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on June 26, 2021, 11:03:28 PM
After several weeks generally free of desyncs, I have had several this evening (Europe). They have this pattern:

Quoteserver=[ss=432121 st=36010 nfc=1 rand=2601725695 halt=1415 line=1 cnvy=2049
   ssr=2031812834,0,2031812834,2031812834,2601725695,2601725695,2601725695,0
   str=963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,4175980762
   exr=4175980762,2031812834,2031812834,0,0,0,0,0
   sums=505501,924070409,24433,25200,6,0,0,0,94234,94022]
client=[ss=432121 st=36010 nfc=1 rand=4025026073 halt=1415 line=1 cnvy=2049
   ssr=2031812834,0,2031812834,2031812834,4025026073,4025026073,4025026073,0
   str=963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,963854789,4175980762
   exr=4175980762,2031812834,2031812834,0,0,0,0,0
   sums=505501,924070409,24433,25200,6,0,0,0,94234,94022]

Freddy also had desynchs following this pattern a few days ago (17 June).

I think that indicates that the desync is between debug sums 3 and 4, whicb contains these lines of code:

clear_random_mode( INTERACTIVE_RANDOM );

sync.sync_step( delta_t );


That second line appears to be the convoy movement code. But the game does not report a particular convoy as having problems in the last line of the 'desync report'. So I am not sure how to investigate further.

Title: Re: "Lost synchronisation with server" report thread
Post by: freddyhayward on June 27, 2021, 02:59:13 AM
Quote from: Matthew on June 26, 2021, 11:03:28 PM
After several weeks generally free of desyncs, I have had several this evening (Europe). They have this pattern:

Freddy also had desynchs following this pattern a few days ago (17 June).

I think that indicates that the desync is between debug sums 3 and 4, whicb contains these lines of code:

clear_random_mode( INTERACTIVE_RANDOM );

sync.sync_step( delta_t );


That second line appears to be the convoy movement code. But the game does not report a particular convoy as having problems in the last line of the 'desync report'. So I am not sure how to investigate further.
The last two debug sums were added to track the size of the sync list before and after the step. Your report oddly shows no discrepancy.
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on August 21, 2021, 03:53:18 PM
As of today's update (#f00df43) I am desynching about every 15 minutes, which is worse than before. So far the desync is always between rands 3 and 4, i.e. in sync.sync_step, but obviously that doesn't tell us much. I'm on Linux. I realize this unlikely to be fixed immediately, but thought it might be useful data.

By the way, I can't find commit #f00df43 in the repo, so maybe last night's build included something that has subsequently been reverted?
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on August 21, 2021, 04:14:28 PM
Quote from: Matthew on August 21, 2021, 03:53:18 PM
As of today's update (#f00df43) I am desynching about every 15 minutes, which is worse than before. So far the desync is always between rands 3 and 4, i.e. in sync.sync_step, but obviously that doesn't tell us much. I'm on Linux. I realize this unlikely to be fixed immediately, but thought it might be useful data.

By the way, I can't find commit #f00df43 in the repo, so maybe last night's build included something that has subsequently been reverted?

I believe that the reason that the build numbers on the compiled binaries is different to the numbers on the Github repository is that there has to be a merge to the build server because some configuration files have changed sligthly.

Can I ask how frequent the losses of synchronisation were before the latest update?
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on August 21, 2021, 07:25:39 PM
Quote from: jamespetts on August 21, 2021, 04:14:28 PM
I believe that the reason that the build numbers on the compiled binaries is different to the numbers on the Github repository is that there has to be a merge to the build server because some configuration files have changed sligthly.

That's unfortunate, as it was useful to be able to reproduce the B-B build, though I don't doubt that you had good reasons for the change.

QuoteCan I ask how frequent the losses of synchronisation were before the latest update?

In July and earlier in August I logged 20 desyncs in 71 sessions (and some of those were due to the Internet cutting out). So before today, maybe one buggy desync every 4-5 hours?
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on August 21, 2021, 10:24:25 PM
Thank you for confirming. Can I check whether anybody else has noticed a marked increase in losses of synchronisation with to-day's build in particular?
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on August 22, 2021, 05:38:28 AM
More like the opposite. Several days ago I had frequent desynchs, but yesterday I played quite a bit and remember only one, while Matt seemed to be logging on and off all the time.
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on August 24, 2021, 02:36:25 PM
The last couple of days I have gone back to the old frequency of desyncs (i.e. rare). But I haven't been logged on at the same time as Zook.

So I suspect that this may be related to Linux clients and Windows clients being connected to a server at the same time, which has been a longstanding area of concern.
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on August 27, 2021, 04:28:33 PM
I've been offline since Tuesday. Today I'm back, find Huitsi also logged in, and I desynch within a few minutes or less.
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on August 29, 2021, 03:49:20 PM
This afternoon I am back to constant desyncs (every 2-3 minutes). I have asked in the chat and apparently no one else is logged on, so that does not seem be the issue.

Looking at the desyncs reported in this thread and in #extended-desync-logs on Discord, I am beginning to wonder whether time of day might be a factor here. My frequent desyncs seem to happen around 1500-1700 GMT. If Zook made his last post when he encountered the issue, then he had problems at the same time. I didn't have such problems last night, but the server had been restarted after the crash at 1534 GMT.

Maybe the problem is at my end and the Internet connection is less reliable at that time??  ??? But I don't have these problems with PHNS4 (the Solomon Islands server). It's specific to B-B.

Or maybe B-B is slower at that time of day (maybe another VM on the same rack is busier??). Or has a memory leak? Would it be possible to auto-restart the game more frequently? I know that is a pain for Australians and others who have to wait a long time to download saves, but the save files are much smaller than they were a year ago (thanks to hard work by Freddy, Freahk, James and others).

Or this might just be a case of 'if you look hard enough for a pattern, then you will find one'.  :laugh:
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on August 31, 2021, 09:37:51 PM
Losses of synchronisation should not occur as a result of the server running slowly: I believe that Dr. Supergood fixed that a few years ago. What will instead happen is that the client will be paused until the server catches up. Therefore, if you are seeing a loss of synchronisation, the problem is a bug somewhere in the game. Unfortunately, as you will be aware, these can be almost unimaginably difficult to track down.
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 01, 2021, 12:04:48 PM
I had a desynch at about 13:00 GMT. I pinged the server a few times; average times were between 120ms and 230ms. I have no idea what a good latency would be.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on September 02, 2021, 11:02:38 PM
Quote from: zook2 on September 01, 2021, 12:04:48 PM
I had a desynch at about 13:00 GMT. I pinged the server a few times; average times were between 120ms and 230ms. I have no idea what a good latency would be.

The latency that you describe would be considered high for an action game that requires quick responses but is well within the acceptable range for Simutrans - the latency does not appear to be a cause of this issue.
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on September 20, 2021, 10:27:41 AM
Further to the posts above, I kept some notes on ping times and how often I was desynched from Bridgewater-Brunel. There does not seem to be any obvious correlation.

(https://i.imgur.com/T7czUYl.png)
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 21, 2021, 03:13:43 AM
Just an observation that could be a random effect: tonight I cut a rail line, causing an incoming train to stop with a "No route" message. I desynched before I could rebuild that one tile. My next four or five attempts to log in failed with immediate or almost immediate desynchs. That was pretty late and, after Freddy left, with no other player on the server for hours. Finally, I managed to quickly fix the line, the "No route" nagging stopped and so did the desynchs.
Title: Re: "Lost synchronisation with server" report thread
Post by: freddyhayward on September 21, 2021, 09:07:18 AM
Quote from: zook2 on September 21, 2021, 03:13:43 AMJust an observation that could be a random effect: tonight I cut a rail line, causing an incoming train to stop with a "No route" message. I desynched before I could rebuild that one tile. My next four or five attempts to log in failed with immediate or almost immediate desynchs. That was pretty late and, after Freddy left, with no other player on the server for hours. Finally, I managed to quickly fix the line, the "No route" nagging stopped and so did the desynchs.
Have you been recording the desync logs? This would be very useful.
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 21, 2021, 12:51:47 PM
I'll start now. Where do I find the logfiles?
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 21, 2021, 04:07:58 PM

Warning: NWC_CHECK:    time difference to server 1600
Warning: NWC_CHECK:    time difference to server 1600
Warning: NWC_CHECK:    time difference to server 1600
Warning: NWC_CHECK:    time difference to server 1600
Warning: NWC_CHECK:    time difference to server 1500
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (9330) Clydesdale horse (single) at Tannacaber High Street Stop
Warning: NWC_CHECK:    time difference to server 1500
Warning: NWC_CHECK:    time difference to server 1500
Warning: NWC_CHECK:    time difference to server 1500
Warning: NWC_CHECK:    time difference to server 1500
Warning: NWC_CHECK:    time difference to server 1500
Warning: NWC_CHECK:    time difference to server 1400
Warning: NWC_CHECK:    time difference to server 1400
Warning: NWC_CHECK:    time difference to server 1400
Warning: NWC_CHECK:    time difference to server 1400
Warning: NWC_CHECK:    time difference to server 1400
Warning: haltestelle_t::liefere_an():    5 Passengers delivered to Highwell were intended for a building that has been deleted.
Warning: NWC_CHECK:    time difference to server 1300
Warning: NWC_CHECK:    time difference to server 1300
Warning: NWC_CHECK:    time difference to server 1300
Warning: NWC_CHECK:    time difference to server 1300
Warning: NWC_CHECK:    time difference to server 1300
Warning: NWC_CHECK:    time difference to server 1300
Warning: NWC_CHECK:    time difference to server 1300
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: NWC_CHECK:    time difference to server 1000
Warning: haltestelle_t::liefere_an():    3 Passengers delivered to Wood Bovgrave were intended for a building that has been deleted.
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (4232) Friesian horses (pair) at Neddbury Pleasant Hill Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (4539) Friesian horses (pair) at Stokbourne Spinner's cottage Stop
Warning: haltestelle_t::liefere_an():    7 Passengers delivered to Tannacaber Village Railway Station were intended for a building that has been deleted.
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (9359) IC "Iron Horse" 1831 stock at Kingserpool Barns Railway Station
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (9684) Yorkshire coach horses (pair) at Hayford Bassett Apothecary dock
Warning: sint64 convoi_t::calc_revenue:    Average speed (19) for (7951) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:    Average speed (19) for (7951) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: haltestelle_t::liefere_an():    5 Passengers delivered to Hayford Victoria East were intended for a building that has been deleted.
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (10237) IC "Iron Horse" 1839 stock at Covhill Street Railway Station
Warning: sint64 convoi_t::calc_revenue:    Average speed (31) for (10008) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (6331) Shire horses (pair) at Carneggy Lane Stop
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=2 plnr=3 pos=4052,182,4 tool_id=4100 defpar=83 #all down slope init=0 flags=0
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (1447) Friesian horses (four-in-hand) with short stage coach at Zenlyn King George Street Stop
Warning: sint64 convoi_t::calc_revenue:    Average speed (17) for (1018) Friesian horses (six-in-hand) with rigid stage coach exceeded maximum speed (12); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:    Average speed (17) for (1018) Friesian horses (six-in-hand) with rigid stage coach exceeded maximum speed (12); falling back to overall average
Warning: haltestelle_t::liefere_an():    7 Passengers delivered to Thirlburn Dock were intended for a building that has been deleted.
Warning: void convoi_t::laden():    (7534) Post boy trying to load at Sherhill St Patrick's Road Inn when not at a halt; rerouting
Warning: haltestelle_t::liefere_an():    4 Passengers delivered to Stronbreck Trinity College Railway Station were intended for a building that has been deleted.
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (6534) Yorkshire coach horses (pair) at Alnington Street Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (5288) Friesian horses (four-in-hand) with braked mail coach at Carneggy Market Stop
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=2 plnr=3 pos=4052,182,4 tool_id=4115 defpar=StagingPost init=0 flags=0
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (8684) Friesian horses (pair) at Norburn dock
Warning: sint64 convoi_t::calc_revenue:    Average speed (14) for (4627) Friesian horses (pair) exceeded maximum speed (12); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (5497) Cleveland bay horses (pair) at Thealworth Gate Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (4442) Short stage coach at Pewton Coal merchant Stop
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=2284,811,3 tool_id=8218 defpar=b,876,1678,0,8676,0 init=1 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=3 plnr=8 pos=2284,811,3 tool_id=8218 defpar=b,876,1678,0,8676,0 init=1 flags=0
Warning: sint64 convoi_t::calc_revenue:    Average speed (21) for (8033) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (4220) Friesian horses (pair) at Finerminster Piccadilly Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (905) Friesian horses (six-in-hand) with rigid stage coach at Pollveor East Bank Stop
ERROR: float32e8_t::operator / (const float32e8_t & x) const:    Division by zero in: 2255.5295 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:    Division by zero in: 36000 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
Warning: haltestelle_t::liefere_an():    3 Passengers delivered to Tannacaber Corner Railway Station were intended for a building that has been deleted.
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (10065) Clydesdale horses (pair) with small horse omnibus at Safle Tynydd Y Llan Ioan Sant
Warning: haltestelle_t::liefere_an():    5 Passengers delivered to Kingserpool Broadway dock were intended for a building that has been deleted.
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=2284,811,3 tool_id=8216 defpar=f,9521 init=1 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=3 plnr=8 pos=2284,811,3 tool_id=8216 defpar=f,9521 init=1 flags=0
Warning: sint64 convoi_t::calc_revenue:    Average speed (19) for (1419) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:    Average speed (19) for (1419) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:    Average speed (19) for (1419) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (5757) Irish draught horses (pair) at Cookport Cooper Stop
Warning: haltestelle_t::liefere_an():    6 Passengers delivered to Hayford Bassett Tuffington Park Stop were intended for a building that has been deleted.
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=2 plnr=3 pos=4052,182,4 tool_id=4115 defpar=StagingInn init=0 flags=0
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (2099) Boat horse with market narrowboat at Zenlyn Bridge XX Quay
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=2284,811,3 tool_id=8216 defpar=g,9521,1,0,0,0,1|3|1032,1631,0,0,0,0,-1,0|1110,1695,0,0,0,0,-1,0| init=1 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=3 plnr=8 pos=2284,811,3 tool_id=8216 defpar=g,9521,1,0,0,0,1|3|1032,1631,0,0,0,0,-1,0|1110,1695,0,0,0,0,-1,0| init=1 flags=0
Warning: karte_t:::do_network_world_command:    disconnecting due to checklist mismatch:
server=[ss=288499 st=24041 nfc=7 rand=2126688056 halt=3952 line=1025 cnvy=8193
    ssr=1221388209,0,1221388209,1221388209,2126688056,2126688056,2126688056,0
    str=2979526732,2979526732,2979526732,2979526732,2979526732,2979526732,1545239459,1545239459,1545239459,1545239459,1545239459,1545239459,1545239459,1545239459,1545239459,124099349
    exr=124099349,2040328237,2040328237,0,0,0,0,0
    sums=1016167,1070413991,74969,88151,6,0,0,0,722,46]
client=[ss=288499 st=24041 nfc=7 rand=2126688056 halt=3952 line=1025 cnvy=8193
    ssr=1221388209,0,1221388209,1221388209,2126688056,2126688056,2126688056,0
    str=2979526732,2979526732,2979526732,2979526732,2979526732,2979526732,1545239459,1545239459,1545239459,1545239459,1545239459,1545239459,1545239459,1545239459,1545239459,124099349
    exr=124099349,2040328237,2040328237,0,0,0,0,0
    sums=1016167,1070413991,74969,88151,6,0,0,0,722,45]

Warning: karte_t::network_disconnect():    Lost synchronisation with server. Random flags: 0
Warning: nwc_routesearch_t::reset:    all static variables are reset
Warning: zstd_file_rdwr_stream_t::zstd_file_rdwr_stream_t:    Cannot set workers: Unsupported parameter
Warning: nwc_routesearch_t::reset:    all static variables are reset
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 21, 2021, 06:40:38 PM
And an immediate desynch.: I joined ~21:30 GMT, with one other player being online, then after loading the map the game was immediately saved (I kicked him out and he rejoined?), then upon map load I desynched.

...
ERROR: tool_build_tunnel_t::tool_build_tunnel_t():   Tunnel builder object could not be retrieved; using default tunnel waytype (road), but this may cause errors
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
Warning: obj_reader_t::resolve_xrefs():   cannot resolve 'GOOD-bulk'
Warning: tool_t::read_menu():   toolbar[11][5]: replaced way-builder(id=14) with default param=cityroad by cityroad builder(id=36)
Warning: tabfile_t::read:   No data in "<<<<<<< HEAD"
Warning: midi_init():   can't open file 'C:\Users\MK Löhne\Downloads\Simutrans-Extended-Complete\simutrans\Pak128.Britain-Ex/music\music.tab' for reading.
Warning: midi_init():   can't open file 'C:\Users\MK Löhne\Documents\Simutrans\music\music.tab' for reading.
Warning: karte_t::load:   File version: 120004, Extended version: 12, Extended revision: 21
Warning: karte_t::load():   loaded savegame from 4/1945, next month=146800640, ticks=142606446 (per month=1<<22)
Warning: nwc_routesearch_t::reset:   all static variables are reset
Warning: nwc_routesearch_t::reset:   all static variables are reset
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 35392, 24438, 11289728, 212352) apply_limits=1
Warning: nwc_routesearch_t::do_command:   apply limits=(1024, 35392, 24438, 11289728, 212352)
Warning: karte_t::load:   File version: 120007, Extended version: 14, Extended revision: 45
Warning: karte_t::load():   loaded savegame from 9/1840, next month=276824064, ticks=275639108 (per month=1<<22)
Warning: nwc_ready_t::execute:   set sync_step=416729 where map_counter=48334285
Warning: karte_t::network_game_set_pause:   steps=34727 sync_steps=416729 pause=0
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=32768,Welcome, Zook! init=1 flags=0
Warning: nwc_sync_t::do_command:   sync_steps 416730
Warning: zstd_file_rdwr_stream_t::zstd_file_rdwr_stream_t:   Cannot set workers: Unsupported parameter
Warning: karte_t::load:   File version: 120007, Extended version: 14, Extended revision: 45
Warning: karte_t::load():   loaded savegame from 9/1840, next month=276824064, ticks=275639208 (per month=1<<22)
Warning: karte_t::network_game_set_pause:   steps=34727 sync_steps=416730 pause=1
Warning: nwc_ready_t::execute:   set sync_step=416730 where map_counter=48409433
Warning: karte_t::network_game_set_pause:   steps=34727 sync_steps=416730 pause=0
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=32768,Welcome, Client no. 1! init=1 flags=0
Warning: network_world_command_t::execute:   wanted to execute(8) from another world (mpc=48437730)
Warning: network_world_command_t::execute:   wanted to execute(9) from another world (mpc=48437730)
Warning: network_world_command_t::execute:   wanted to execute(9) from another world (mpc=48437730)
Warning: network_world_command_t::execute:   wanted to execute(9) from another world (mpc=48437730)
Warning: network_world_command_t::execute:   wanted to execute(9) from another world (mpc=48437730)
Warning: nwc_sync_t::do_command:   sync_steps 416731
Warning: zstd_file_rdwr_stream_t::zstd_file_rdwr_stream_t:   Cannot set workers: Unsupported parameter
Warning: karte_t::load:   File version: 120007, Extended version: 14, Extended revision: 45
Warning: karte_t::load():   loaded savegame from 9/1840, next month=276824064, ticks=275639308 (per month=1<<22)
Warning: karte_t::network_game_set_pause:   steps=34727 sync_steps=416731 pause=1
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=16384,Now 3 clients connected. init=1 flags=0
Warning: NWC_CHECK:   time difference to server 1000
Warning: NWC_CHECK:   time difference to server 1100
Warning: NWC_CHECK:   time difference to server 1200
Warning: NWC_CHECK:   time difference to server 1300
Warning: NWC_CHECK:   time difference to server 1400
Warning: NWC_CHECK:   time difference to server 1500
Warning: NWC_CHECK:   time difference to server 1600
Warning: NWC_CHECK:   time difference to server 1700
Warning: NWC_CHECK:   time difference to server 1800
Warning: NWC_CHECK:   time difference to server 1900
Warning: NWC_CHECK:   time difference to server 2000
Warning: NWC_CHECK:   time difference to server 2100
Warning: NWC_CHECK:   time difference to server 2200
Warning: NWC_CHECK:   time difference to server 2300
Warning: NWC_CHECK:   time difference to server 2400
Warning: NWC_CHECK:   time difference to server 2500
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=32768,Client no. 1 has left. init=1 flags=0
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=16384,Now 2 clients connected. init=1 flags=0
Warning: NWC_CHECK:   time difference to server 2600
Warning: NWC_CHECK:   time difference to server 2700
Warning: NWC_CHECK:   time difference to server 2800
Warning: NWC_CHECK:   time difference to server 2900
Warning: NWC_CHECK:   time difference to server 3000
Warning: NWC_CHECK:   time difference to server 3100
Warning: NWC_CHECK:   time difference to server 3200
Warning: NWC_CHECK:   time difference to server 3300
Warning: NWC_CHECK:   time difference to server 3400
Warning: NWC_CHECK:   time difference to server 3500
Warning: NWC_CHECK:   time difference to server 3600

<snip>

Warning: NWC_CHECK:   time difference to server 33400
Warning: NWC_CHECK:   time difference to server 33500
Warning: nwc_ready_t::execute:   set sync_step=416731 where map_counter=48437730
Warning: karte_t::network_game_set_pause:   steps=34727 sync_steps=416731 pause=0
Warning: NWC_CHECK:   time difference to server 33600
Warning: NWC_CHECK:   time difference to server 33600
Warning: NWC_CHECK:   time difference to server 33600
Warning: NWC_CHECK:   time difference to server 33600
Warning: NWC_CHECK:   time difference to server 33600
Warning: sint64 convoi_t::calc_revenue:   Average speed (56) for (9228) Yorkshire coach horse exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (56) for (9228) Yorkshire coach horse exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (56) for (9228) Yorkshire coach horse exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (15) for (1761) Friesian horses (four-in-hand) with short stage coach exceeded maximum speed (12); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (67) for (2478) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (67) for (2478) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (67) for (2478) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: NWC_CHECK:   time difference to server 33600
Warning: NWC_CHECK:   time difference to server 33600
Warning: NWC_CHECK:   time difference to server 33600
Warning: NWC_CHECK:   time difference to server 33600
Warning: NWC_CHECK:   time difference to server 33600
Warning: karte_t:::do_network_world_command:   disconnecting due to checklist mismatch:
server=[ss=416739 st=34728 nfc=3 rand=139503783 halt=3952 line=1025 cnvy=8193
   ssr=296161633,0,296161633,296161633,139503783,139503783,139503783,0
   str=1656216518,1656216518,1656216518,1656216518,1656216518,1656216518,95024530,95024530,95024530,95024530,95024530,95024530,95024530,95024530,95024530,2502182557
   exr=2502182557,2380493911,2380493911,0,0,0,0,0
   sums=1020345,1069082998,76453,83433,6,0,0,0,708,41]
client=[ss=416739 st=34728 nfc=3 rand=139503783 halt=3952 line=1025 cnvy=8193
   ssr=296161633,0,296161633,296161633,139503783,139503783,139503783,0
   str=1656216518,1656216518,1656216518,1656216518,1656216518,1656216518,95024530,95024530,95024530,95024530,95024530,95024530,95024530,95024530,95024530,2502182557
   exr=2502182557,2380493911,2380493911,0,0,0,0,0
   sums=1020345,1069082998,76453,83433,6,0,0,0,708,40]

Warning: karte_t::network_disconnect():   Lost synchronisation with server. Random flags: 0
Warning: nwc_routesearch_t::reset:   all static variables are reset
Warning: nwc_routesearch_t::reset:   all static variables are reset
Warning: zstd_file_rdwr_stream_t::zstd_file_rdwr_stream_t:   Cannot set workers: Unsupported parameter
Warning: nwc_routesearch_t::reset:   all static variables are reset
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on September 21, 2021, 08:32:00 PM
I know several of us have been feeling that we desynch more often when playing alongside some players than some other players. This might not be a real phenomenon at all: I guess humans always want to blame our problems on somebody else (me included!). But I guess the only way to find out if this is an issue is to gather some data.

So I have made a simple spreadsheet (https://docs.google.com/spreadsheets/d/1J8Mfbt9wonRghMMGL4WYw4_y-FgRsSRNR8nIbFQByUI/edit?usp=sharing) that Bridgewater-Brunel players could edit to report their experiences when playing alongside each other if they want to. For simplicity, it only deals with pairs.

(https://i.imgur.com/qjLdTCb.png)

Maybe people more experienced than me will see some flaws in this idea, so please speak up if you see them!

This exercise is almost less useful than the collecting the checklist data (see the first post in this thread) and I hope this won't be a distraction from that.

Just because we often desynch with another player doesn't mean either person is doing something wrong. It could be something about the OS, the latency, how much cache they have, all kinds of things most of us can't change easily.

Quote from: zook2 on September 21, 2021, 06:40:38 PMWarning: NWC_CHECK:   time difference to server 33600

This suggests that your PC is not fast enough to keep up with the server. This is the situation that I was in last year, and I was disappointed to see it appear. However, James did slow the server down to help me, so I am surprised that it is still too fast for others.

Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 21, 2021, 08:36:55 PM
Quote from: jamespetts on October 18, 2020, 12:51:17 PM

Nonetheless, it is worthwhile to try to remedy these if possible, especially the most common types. The most common types so far seem to be convoy movement based losses of synchronisation (debug sums) and halt based losses of synchronisation (rands[23]).

As to the latter, the code in the haltestelle_t::step() function most likely to show a divergence of random numbers is check_transferring_cargoes, which, when dealing with passengers, invokes the RNG by generating local pedestrians whenever passengers are released from their transferring state.

We already have a system to check part f this, being debug sums 6 and 7 for checking the number of transferring cargoes before and after the passenger and mail generation have run.

May I suggest that future loss of synchronisation logging should explicitly check whether there is any divergence in debug sums 6 and 7 when recording a loss of synchronisation at rands[23]?

What if the server switched pedestrians off completely to see if that makes a difference? Personally I'd have done that already client-side if it were possible (which apparently it isn't), as they consume resources and add nothing for me.

Apart from that: Surely a modern computer can subtract large numbers from other large numbers. Could the debug code be modified as to automagically print the offending convoy's ID? I'm glad to help, if only out of self-interest, but doing arithmetics is just asking too much.
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 21, 2021, 08:52:47 PM
Quote from: Matthew on September 21, 2021, 08:32:00 PM
Maybe people more experienced than me will see some flaws in this idea, so please speak up if you see them!

I'm on glorious Windows, and Huitsi is either a demon or a witch (we know that because it's been said many times).

Quote
This suggests that your PC is not fast enough to keep up with the server.
That's an exception in the logs I've looked at so far, usually it never gets beyond 2000 or so. I have a dual-core with 3.something Ghz in turbo mode and 8 GB RAM. I've had many hours of uninterrupted gameplay over the weeks (with lag getting worse if more than one other player is present), but recently the desynchs are getting bad. It could be the number of convoys, which has grown steadily. I remember 5000+ some deacdes ago, now we're probably at >8000. The most obvious candidate seems to be railroads, though, because they've multiplied exponentially over the past 15 game-years, and I'd say that's when the current trouble began. How many desynchs did you get in 1790?
Title: Re: "Lost synchronisation with server" report thread
Post by: Ranran(retired) on September 21, 2021, 09:07:02 PM
Quote from: zook2 on September 21, 2021, 08:36:55 PMWhat if the server switched pedestrians off completely to see if that makes a difference?
Unfortunately, Extended cannot exterminate pedestrians by change its setting. The display option can reduce pedestrian spawning a bit.
Especially, "Pedestrians at stop" option is almost broken and makes little sense.
These seems to have changed that way over 10 years ago, but I don't know why.

Certainly removing pedestrians will greatly reduce the burden on your computer. Especially large maps and fast forwards mode.
But we need to change the code to completely remove the pedestrian. So the easiest change is to remove pedestrians.pak from pakset...
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 22, 2021, 03:55:32 AM
Best Simutrans night I had in weeks. No other player, no desynch. Then I deleted a bridge and lost synch immediately:

Warning: void convoi_t::laden():    (3674) Shire horse (five-in-hand) with goods stage wagon trying to load at Maesffordd Cei Y Llyn when not at a halt; rerouting
Warning: sint64 convoi_t::calc_revenue:    Average speed (28) for (10036) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:    Average speed (28) for (10036) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=668,1694,5 tool_id=4110 defpar=cobblestone_road init=0 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=3 plnr=8 pos=668,1694,5 tool_id=4110 defpar=cobblestone_road init=0 flags=0
Warning: sint64 convoi_t::calc_revenue:    Average speed (23) for (10144) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:    Average speed (23) for (10144) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (4382) Friesian horses (pair) at Norburn MacCallum Street Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (3626) Cleveland bay horses (pair) at Pewton Gate Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (1472) Friesian horses (six-in-hand) with rigid stage coach at Wulerpool Stockerbourne Street Inn
Warning: sint64 convoi_t::calc_revenue:    Average speed (15) for (6407) Shire horses (pair) exceeded maximum speed (10); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:    Average speed (15) for (6407) Shire horses (pair) exceeded maximum speed (10); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:    Average speed (15) for (6407) Shire horses (pair) exceeded maximum speed (10); falling back to overall average
Warning: haltestelle_t::liefere_an():    3 Passengers delivered to Wallow Gate Railway Station were intended for a building that has been deleted.
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=668,1699,5 tool_id=4110 defpar=cobblestone_road init=0 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=3 plnr=8 pos=668,1699,5 tool_id=4110 defpar=cobblestone_road init=0 flags=0
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (9579) Yorkshire coach horses (pair) at Norburn Prince Dennis the Doubtful Dock
Warning: haltestelle_t::liefere_an():    6 Passengers delivered to Tannacaber Town Railway Station were intended for a building that has been deleted.
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (7356) Shire horses (pair) at Finerminster Princess Loreley Dock
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=668,1698,5 tool_id=4111 defpar=BrickViaductEarlyRoad init=0 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=3 plnr=8 pos=668,1698,5 tool_id=4111 defpar=BrickViaductEarlyRoad init=0 flags=0
Warning: void convoi_t::hat_gehalten(halthandle_t halt):    Arrival time in the future for (5279) Cleveland bay horses (six-in-hand) with sprung stage coach at Safle Dwycawl Trindod Sanctaidd
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=666,1695,5 tool_id=4097 defpar=(null) init=0 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=3 plnr=8 pos=666,1695,5 tool_id=4097 defpar=(null) init=0 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=666,1694,5 tool_id=4097 defpar=(null) init=0 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=665,1694,5 tool_id=4097 defpar=(null) init=0 flags=0
Warning: nwc_tool_t::rdwr:    rdwr id=8 client=0 plnr=8 pos=666,1699,5 tool_id=4097 defpar=(null) init=0 flags=0
Warning: network_receive_data:    error 10054 while receiving from [1864]
Warning: karte_t::process_network_commands:    lost connection to server
Warning: karte_t::network_disconnect():    Lost synchronisation with server. Random flags: 0
Warning: nwc_routesearch_t::reset:    all static variables are reset
Warning: zstd_file_rdwr_stream_t::zstd_file_rdwr_stream_t:    Cannot set workers: Unsupported parameter
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 22, 2021, 05:02:58 AM
Needless to say, it crashed the server.
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on September 22, 2021, 07:41:20 AM
I think I was just sending a "no Route/too complex" ship to another waypoint when I crashed:

Warning: sint64 convoi_t::calc_revenue:   Average speed (33) for (9411) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (616) Friesian horses  (four-in-hand) with short stage coach at Sherhill Town Hall Stop
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=0 plnr=8 pos=4231,1469,0 tool_id=8216 defpar=f,10547 init=1 flags=0
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=2 plnr=8 pos=4231,1469,0 tool_id=8216 defpar=f,10547 init=1 flags=0
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 14709.975 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 400000 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 5883.98999 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 400000 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
Warning: sint64 convoi_t::calc_revenue:   Average speed (19) for (4451) Friesian horses (pair) exceeded maximum speed (12); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (19) for (4451) Friesian horses (pair) exceeded maximum speed (12); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (13) for (4451) Friesian horses (pair) exceeded maximum speed (12); falling back to overall average
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 14709.975 / 0
<snip>

https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 14709.975 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 400000 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 5883.98999 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 400000 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 14709.975 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 400000 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 5883.98999 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 400000 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (3828) Friesian horses (four-in-hand) with strap stage coach at Zenlyn Lilac Road Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (9352) Shire horses (pair) at Wallow River Markets & DIY
Warning: void convoi_t::laden():   (6473) Yorkshire coach horses (six-in-hand) with braked mail coach trying to load at Gwesty'r Dwycawl Abbey when not at a halt; rerouting
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=0 plnr=8 pos=4226,1471,1 tool_id=8216 defpar=V,10547 init=1 flags=0
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=2 plnr=8 pos=4226,1471,1 tool_id=8216 defpar=V,10547 init=1 flags=0
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (7679) Shire horses (pair) at Fen Sixdale Hardware & DIY
Warning: sint64 convoi_t::calc_revenue:   Average speed (19) for (8461) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (3310) Hackney horses (pair) at Pewton Monument Stop
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 98304, 34880, 16777216, 256) apply_limits=0
Warning: karte_t::interactive:   nwc_routesearch_t object created and sent to server: sync_step=59977 map_counter=8671108 limits=(1024, 98304, 34880, 16777216, 256)
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (3795) Friesian horses (four-in-hand) with strap stage coach at Zenlyn County Hall Stop
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 98304, 34880, 5558528, 256) apply_limits=0
Warning: karte_t::interactive:   nwc_routesearch_t object created and sent to server: sync_step=59990 map_counter=8671108 limits=(1024, 98304, 34880, 5558528, 256)
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (10052) Fly-boat horses at Kingserpool Bridge dock
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 98304, 34880, 5558528, 212672) apply_limits=0
Warning: karte_t::interactive:   nwc_routesearch_t object created and sent to server: sync_step=60000 map_counter=8671108 limits=(1024, 98304, 34880, 5558528, 212672)
Warning: void convoi_t::laden():   (6473) Yorkshire coach horses (six-in-hand) with braked mail coach trying to load at Gwesty'r Dwycawl Abbey when not at a halt; rerouting
Warning: void convoi_t::laden():   (6201) Irish draught horses (pair) trying to load at Moel-y-Groes Dairy & Pub when not at a halt; rerouting
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (3213) Friesian horses (four-in-hand) with strap stage coach at Zenlyn Broadway Inn
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (4133) Friesian horses (four-in-hand) with short stage coach at Safle Dwycawl Trindod Sanctaidd
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 26584, 22144, 5558528, 212672) apply_limits=1
Warning: nwc_routesearch_t::execute:   to be applied: limits=(1024, 26584, 22144, 5558528, 212672)
Warning: nwc_routesearch_t::execute:   add to world command queue (sync step: command=60057 world=60052)
Warning: nwc_routesearch_t::do_command:   apply limits=(1024, 26584, 22144, 5558528, 212672)
Warning: sint64 convoi_t::calc_revenue:   Average speed (26) for (8469) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (20) for (8469) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (20) for (8469) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (20) for (8469) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (26) for (8469) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (26) for (8469) Yorkshire coach horses (pair) exceeded maximum speed (18); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (8342) Yorkshire coach horses (pair) at Pewton Town Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (5416) Cleveland bay horses (six-in-hand) with mail coach at Safle Neuadd Plwyf Y Maesffordd | Maesffordd Parish Hall Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (8502) Friesian horses (four-in-hand) with short stage coach at Sherhill Town Hall Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (4763) Friesian horses (pair) at Neddbury Jones Gardens Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (8624) Yorkshire coach horses (pair) at Wallow Hill Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (3940) Friesian horses (four-in-hand) with short stage coach at Moel-y-Groes Parish Hall Stop
Warning: sint64 convoi_t::calc_revenue:   Average speed (34) for (9861) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (34) for (9861) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: sint64 convoi_t::calc_revenue:   Average speed (34) for (9861) Fly-boat horses exceeded maximum speed (18); falling back to overall average
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (939) Friesian horses (six-in-hand) with rigid stage coach at Pollveor East Bank Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (7249) Friesian horses (four-in-hand) with short stagecoach at Safle Dwycawl Trindod Sanctaidd
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (4393) Friesian horses (pair) at Norburn Balgownie Street Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (9644) Friesian horses (pair) at Norburn dock
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 98304, 18680, 5558528, 212672) apply_limits=0
Warning: karte_t::interactive:   nwc_routesearch_t object created and sent to server: sync_step=60194 map_counter=8671108 limits=(1024, 98304, 18680, 5558528, 212672)
Warning: sint64 convoi_t::calc_revenue:   Average speed (17) for (6563) Cleveland bay horses (six-in-hand) with braked stage coach exceeded maximum speed (14); falling back to overall average
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 98304, 18680, 1660672, 212672) apply_limits=0
Warning: karte_t::interactive:   nwc_routesearch_t object created and sent to server: sync_step=60205 map_counter=8671108 limits=(1024, 98304, 18680, 1660672, 212672)
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (10522) Tayleur express engine 2-2-2 at Finerminster Princess Loreley Dock
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (9454) Friesian horses (pair) at Norburn Balgownie Street Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (5520) Friesian horses (four-in-hand) with short stage coach at Philron Dukesgate Stop
Warning: sint64 convoi_t::calc_revenue:   Average speed (18) for (4418) Short stage coach exceeded maximum speed (12); falling back to overall average
Warning: haltestelle_t::liefere_an():   6 Passengers delivered to Tannacaber Fields dock were intended for a building that has been deleted.
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 35445, 18680, 1660672, 212672) apply_limits=0
Warning: karte_t::interactive:   nwc_routesearch_t object created and sent to server: sync_step=60252 map_counter=8671108 limits=(1024, 35445, 18680, 1660672, 212672)
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (3838) Friesian horses (four-in-hand) with short stage coach at Zenlyn Canal Street Quay
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 35445, 34278, 1660672, 212672) apply_limits=0
Warning: karte_t::interactive:   nwc_routesearch_t object created and sent to server: sync_step=60265 map_counter=8671108 limits=(1024, 35445, 34278, 1660672, 212672)
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (4263) Short stage coach at Pewton Town Stop
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (6396) Shire horses (pair) at Hayford Princess Victoria (Vicky) Railway Station
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (10469) Fly-boat horses at Finerminster Town dock
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (7376) Shire horses (pair) at Zenlyn Royal Railway Station of the Century
Warning: sint64 convoi_t::calc_revenue:   Average speed (12) for (1246) Norfolk wherry (passengers) exceeded maximum speed (10); falling back to overall average
Warning: nwc_routesearch_t::rdwr:   rdwr limits=(1024, 30381, 34278, 1660672, 212672) apply_limits=1
Warning: nwc_routesearch_t::execute:   to be applied: limits=(1024, 30381, 34278, 1660672, 212672)
Warning: nwc_routesearch_t::execute:   add to world command queue (sync step: command=60322 world=60316)
Warning: nwc_routesearch_t::do_command:   apply limits=(1024, 30381, 34278, 1660672, 212672)
Warning: void convoi_t::laden():   (5404) Yorkshire coach horses (six-in-hand) with braked mail coach trying to load at Moel-y-Groes Cambrian Dock when not at a halt; rerouting
Warning: void convoi_t::hat_gehalten(halthandle_t halt):   Arrival time in the future for (7151) Shire horses (pair) at Norburn Prince Dennis the Doubtful Dock
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=0 plnr=8 pos=4239,1471,0 tool_id=8218 defpar=b,4231,1469,0,10550,0 init=1 flags=0
Warning: nwc_tool_t::rdwr:   rdwr id=8 client=2 plnr=8 pos=4239,1471,0 tool_id=8218 defpar=b,4231,1469,0,10550,0 init=1 flags=0
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 14709.975 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
ERROR: float32e8_t::operator / (const float32e8_t & x) const:   Division by zero in: 400000 / 0
For help with this error or to file a bug report please see the Simutrans forum:
https://forum.simutrans.com
Warning: route_t::intern_calc_route():   Too many steps (1500000>=max 1500000) in route (too long/complex)
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on December 31, 2021, 12:02:21 AM
If we can get a reproduction case for the float3288_t divisions by zero, that would be helpful. I have no idea whether or not this relates to the losses of synchronisation, but it would certainly be helpful to try to fix this and see whether that assists.
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on February 20, 2022, 07:49:00 AM
I have tried to join B-B several times since today's (2022-02-20) Nightly and reset. I desync as soon as the game unpauses.

I am using the latest B-B Nightly client (#36c9cd5) on Ubuntu 20.04.

Each time the checklist differences are debug_sums[5] ("Passengers/mail generated this step") and [7] ("Transferring cargoes after passenger generation"). For example:

   sums=761526,690114314,89800,111679,6,969,50834,50958,28,112
   sums=761526,690114314,89800,111679,6,971,50834,50961,28,112

BTW I noticed that some of the code for producing the checklists also changed yesterday. I don't understand all those changes, but I guess that makes it possible that the bug is in the checklist itself? I don't how plausible that is.

P.S. My client number incremented every time I tried to join. Is that expected? As far as I could see from the in-game interface and list.extended.simutrans.org, no other clients were connected. Probably a total red herring (https://www.oxfordlearnersdictionaries.com/definition/english/red-herring?q=red+herring).

P.P.S. I could reproduce the desyncs on a Windows 10 VPS.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on February 20, 2022, 11:27:53 AM
Confirmed reproducible with my Linux client. I think that this may be related to the "heavy mode" changes from yesterday, but I will have to undertake further testing to narrow down when this occurred.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on February 20, 2022, 12:08:46 PM
Testing has produced some very odd results: I will consistently lose synchronisation with the server seconds after unpausing on both Bridgewater-Brunel and Stephenson-Siemens servers. However, running a client/server pair locally, no such issue arises, whether the server be a command line server or a graphical server. I have been able to remain connected for >20 minutes with a local client/server pair.

Edit: Further testing shows that downloading the binary compiled on the Bridgewater-Brunel server and running that locally, connecting a client to it locally, still does not reproduce the loss of synchronisation - this only seems to occur when client and server are on different computers.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on February 20, 2022, 05:33:27 PM
I have now attempted testing running a server/client pair on two different physical computers on the same home network. Using demo.sve, I cannot reproduce the loss of synchronisation in this environment. Note that the other computer's Simutrans was built from source from the latest commits on the master branch of the Github repository.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on February 20, 2022, 06:09:54 PM
I think that I have managed to narrow this down and solve the immediate problem, albeit I have not yet found where exactly in the code that this problem was manifested. Updating en.tab on the server (the base version, not the pakset version) to the latest version has allowed me to connect stably without losing synchronisation for >10 minutes. I encourage others to connect and to test this.
Title: Re: "Lost synchronisation with server" report thread
Post by: Mariculous on February 20, 2022, 09:13:44 PM
updated to latest nightly, doesn't seem to work.
Title: Re: "Lost synchronisation with server" report thread
Post by: Ranran(retired) on February 20, 2022, 09:23:36 PM
Is it possible to check the difference in the existence of all files such as en.tab?
In that case, the difference in font files and city namelist may be taken into consideration. The missing Chinese font has recently been revived in extended. So some people may not have it.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on February 20, 2022, 09:29:00 PM
Quote from: Sirius on February 20, 2022, 09:13:44 PM
updated to latest nightly, doesn't seem to work.

Can I clarify - are you losing synchronisation the moment that you connect?

Quote from: Ranran on February 20, 2022, 09:23:36 PM
Is it possible to check the difference in the existence of all files such as en.tab?
In that case, the difference in font files and city namelist may be taken into consideration. The missing Chinese font has recently been revived in extended. So some people may not have it.

This is possible in theory, but very difficult in practice, as there are many files (e.g. config.default) which need to differ, and there is no straightforward interface for checking this automatically.
Title: Re: "Lost synchronisation with server" report thread
Post by: Mariculous on February 20, 2022, 10:24:20 PM
Quote from: jamespetts on February 20, 2022, 09:29:00 PMCan I clarify - are you losing synchronisation the moment that you connect?
Exactly.

Seems to be working now.
Title: Re: "Lost synchronisation with server" report thread
Post by: prissi on February 21, 2022, 07:14:18 AM
At least in standard, the city and stop names are provided by the servers, so different citylists should not matter. It it possible to play in Japanese and German together, while all ingame automatic names are in English. Local settings should not matter for servergames, unless there is a setting that was forgotten to be seved with the servergame and was instead added to the enviromnet.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on February 21, 2022, 11:38:37 AM
Further testing shows that it is not any divergence in en.tab that causes losses of synchronisation: adding "Test 1" and "Test 2" strings to the bottom of my local en.tab and then connecting results in no loss of synchronisation.

Edit: Further testing shows that adding a single town name syllable locally does not lead to losses of synchronisation.

Edit 2: Further testing shows that adding a number of additional town name syllables locally does not lead to losses of synchronisation. This suggests that there is some specific part of the en.tab file difference in which causes loss of synchronisation.

Edit 3: In further testing, I have not been able to find any modification to my local en.tab that will cause losses of synchronisation with the server. The problem appears to be reproducible only in very particular circumstances. As such, I am discontinuing further investigations and noting this issue as dormant for the present. However, if anyone does manage to find the cause of this, that would be helpful.
Title: Re: "Lost synchronisation with server" report thread
Post by: prissi on February 24, 2022, 11:46:57 AM
The town name and everything else is generated in the game on the server and sent as command to the clients. As such the local langugae tab is irrelevant, since I can even join an English server with German or Japanese langugage selected. (and have all error messages etc. in my language.)
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on February 25, 2022, 03:13:35 AM
Quote from: prissi on February 24, 2022, 11:46:57 AM
The town name and everything else is generated in the game on the server and sent as command to the clients. As such the local langugae tab is irrelevant, since I can even join an English server with German or Japanese langugage selected. (and have all error messages etc. in my language.)

That is not how it works in Extended network games. Both client and server generate town names, so there is an inconsistency until the client fully disconnects and a savegame is sent from the server.

But as far as I know that doesn't cause desyncs.
Title: Re: "Lost synchronisation with server" report thread
Post by: zook2 on June 26, 2022, 01:01:17 AM
An hour ago I had a desynch when deleting three tiles of road in Alnington, single clicks (not the road removal tool). Freakh was online, too; maybe he did something else that could have caused it. I rejoined a few minutes later and the server had reverted to an earlier save.
Title: Re: "Lost synchronisation with server" report thread
Post by: Mariculous on June 26, 2022, 09:23:48 AM
I suspect, I was sleeping at that time  ;D
Title: Re: "Lost synchronisation with server" report thread
Post by: Matthew on September 11, 2022, 11:12:03 AM
Hi James. I have a couple of comments relating to the multiplayer mystery bug. I'm not sure if this the best thread but it was the closest one I could find.

Firstly, TransShipmentEnvoy has said on Discord that when his(?) server goes down, Extended has usually filled the memory, so he suspects a memory leak. If you have not already ruled this out as a symptom of the B-B server freezes, then you might want to check the memory situation next time you have to reset the server.

Secondly, does anyone know whether an update is sent to the server list when a player desyncs?
Title: Re: "Lost synchronisation with server" report thread
Post by: neroden on October 15, 2023, 03:23:46 AM
Bridgewater-brunel is consistently desyncing (probably crashing?) and resetting to previous save at 1 PM in December 2012.  No idea why, it doesn't seem to be related do doing anything.  Memory leak?

Now doing the crash at Feb 2013.  Not sure what's going wrong, but it's impossible to play right now.
Title: Re: "Lost synchronisation with server" report thread
Post by: jamespetts on October 21, 2023, 09:43:20 AM
Apologies for not having had a chance to look at this sooner. This does not seem to be fully consistent or reproducible, since the list server records one client connected and the date at May 2015.

If we can get a reproduction case for this, that would be helpful.