[Posila] [0.15.34] Desync when changing the force of one side of an underground belt

This subforum contains all the issues which we already resolved.
Post Reply
zackman0010
Inserter
Inserter
Posts: 36
Joined: Wed May 18, 2016 8:34 pm
Contact:

[Posila] [0.15.34] Desync when changing the force of one side of an underground belt

Post by zackman0010 »

3Ra is currently hosting its new Labyrinth scenario. After an hour or two of playing, it started to desync whenever a new player would join. The desync report is uploaded here: http://www.mediafire.com/file/5lg3u85yn ... report.rar. We don't know exactly what caused it. When I looked at it myself with Beyond Compare, I didn't even know where to begin looking. It told me there were a lot of differences.

Known non-desyncing errors:

Code: Select all

Error in event on_gui_click: "/var/www/factorio/server3/temp/currently-playing/gui.lua:173: attempt to concatenate field '?' (a nil value)".
Error in event 77: "/var/www/factorio/server3/temp/currently-playing/gui.lua:439: attempt to index field '?' (a nil value)".
The second error is caused by the first error.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.15.34] Desync in Custom Scenario

Post by Klonan »

zackman0010 wrote:3Ra is currently hosting its new Labyrinth scenario. After an hour or two of playing, it started to desync whenever a new player would join. The desync report is uploaded here: http://www.mediafire.com/file/5lg3u85yn ... report.rar. We don't know exactly what caused it. When I looked at it myself with Beyond Compare, I didn't even know where to begin looking. It told me there were a lot of differences.

Known non-desyncing errors:

Code: Select all

Error in event on_gui_click: "/var/www/factorio/server3/temp/currently-playing/gui.lua:173: attempt to concatenate field '?' (a nil value)".
Error in event 77: "/var/www/factorio/server3/temp/currently-playing/gui.lua:439: attempt to index field '?' (a nil value)".
The second error is caused by the first error.
Unfortunately this is most likely a script error,
If you can isolate some specific Lua API call that can reliably cause the desync, we can invenstigate further

It would also be good to attach the full script/scenario that is being run

zackman0010
Inserter
Inserter
Posts: 36
Joined: Wed May 18, 2016 8:34 pm
Contact:

Re: [0.15.34] Desync in Custom Scenario

Post by zackman0010 »

I can't even begin to think which call might be desyncing, unfortunately. We don't even know what happened to cause them. They only affected players attempting to join, but we have no on_join events. The scenario we were using at the time is here: http://www.mediafire.com/file/r976au9ax ... ee4a23.zip
EDIT: Link updated with correct file

zackman0010
Inserter
Inserter
Posts: 36
Joined: Wed May 18, 2016 8:34 pm
Contact:

Re: [0.15.34] Desync in Custom Scenario

Post by zackman0010 »

I realized that I sent the desync report from the wrong location earlier. That desync report came out of the 'temp' folder rather than the 'archive' folder. I've reuploaded the correct desync report from two days ago, as well as the desync report from yesterday's game. I also included the new version of the scenario we were working with last night.
Two Day Ago Desync
Yesterday Desync
Yesterday Scenario
I unfortunately don't have any save files from before the desync, as we played for long enough that the autosaves got overwritten.

zackman0010
Inserter
Inserter
Posts: 36
Joined: Wed May 18, 2016 8:34 pm
Contact:

Re: [0.15.34] Desync in Custom Scenario

Post by zackman0010 »

After discussing the issue in Discord with Klonan, we discovered the cause of the desyncs. If one end of an underground belt changes forces, the server does not break the connection between the two ends. When a player tries to load into the game, their client sees belts on two different forces and does not connect them. The connection existing on the server but not the client is the cause of the desync. Thank you to Klonan for helping us debug this. I've fixed it in our scenario by changing the force of the other end of the underground belt as well.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [Posila] [0.15.34] Desync when changing the force of one side of an underground belt

Post by posila »

Thanks for the report.
It is fixed for next release.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: [Posila] [0.15.34] Desync when changing the force of one side of an underground belt

Post by quyxkh »

posila wrote:Thanks for the report.
It is fixed for next release.
I'm curious: did you fix this by having the server break the connection, or by having the client make it? I think there might be some value in allowing explicit gifts like this, to set up "trade routes".

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Posila] [0.15.34] Desync when changing the force of one side of an underground belt

Post by Klonan »

quyxkh wrote:
posila wrote:Thanks for the report.
It is fixed for next release.
I'm curious: did you fix this by having the server break the connection, or by having the client make it? I think there might be some value in allowing explicit gifts like this, to set up "trade routes".
The game will correctly disconnect the two underground belts when the force is changed

zackman0010
Inserter
Inserter
Posts: 36
Joined: Wed May 18, 2016 8:34 pm
Contact:

Re: [Posila] [0.15.34] Desync when changing the force of one side of an underground belt

Post by zackman0010 »

Just preemptively asking this question, but will the game connect the two sides if the reverse happens? If the two sides of an underground belt were initially on separate forces, but then are put on the same force.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [Posila] [0.15.34] Desync when changing the force of one side of an underground belt

Post by posila »

zackman0010 wrote:Just preemptively asking this question, but will the game connect the two sides if the reverse happens? If the two sides of an underground belt were initially on separate forces, but then are put on the same force.
Yes, it will ;)

Post Reply

Return to “Resolved Problems and Bugs”