[posila] [0.17.64] Multiplayer desync / too much mods?

Desyncs in modded game will be ignored most of the time, until it is clearly proven that the desync is not caused by scripting.
Post Reply
CynAtom
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Aug 14, 2019 1:38 pm
Contact:

[posila] [0.17.64] Multiplayer desync / too much mods?

Post by CynAtom »

Tried to run 5-10 mods at a time. Everything worked. When we run around more than half of the mods, we catch desync.
Mod pack and desync report: https://drive.google.com/open?id=1NE90_ ... TJ6dMMxmDo
The desync-report was made at all enabled mods.

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

Re: [0.17.64] Multiplayer desync / too much mods?

Post by posila »

Thanks for the report.
Internal IDs are different, which should not happen. The person who desynced was running on Windows 7, what operating system does server (or person who hosted the game) use, can you post any Factorio log from the server computer?

CynAtom
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Aug 14, 2019 1:38 pm
Contact:

Re: [0.17.64] Multiplayer desync / too much mods?

Post by CynAtom »

Of course i can, because i was host :)
Attachments
factorio-previous.log
(5.84 KiB) Downloaded 92 times

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

Re: [0.17.64] Multiplayer desync / too much mods?

Post by posila »

You were trying this with two instances of the game on the same computer?

CynAtom
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Aug 14, 2019 1:38 pm
Contact:

Re: [0.17.64] Multiplayer desync / too much mods?

Post by CynAtom »

Run two versions of the game on different computers with absolutely same modpack, not LAN, on version 0.17.64 was launched.

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

Re: [0.17.64] Multiplayer desync / too much mods?

Post by posila »

Ok, I was able to reproduce it - if on host I sync mods and mod settings with the save, then on client sync mods with host the desync happens after connecting, and mod settings file on client doesn't match the one on server.

CynAtom
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Aug 14, 2019 1:38 pm
Contact:

Re: [posila] [0.17.64] Multiplayer desync / too much mods?

Post by CynAtom »

This mean what i should give mod settings file with all changes to my friends and start new game?

Adamo
Filter Inserter
Filter Inserter
Posts: 479
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: [posila] [0.17.64] Multiplayer desync / too much mods?

Post by Adamo »

CynAtom wrote:
Wed Aug 21, 2019 12:06 pm
This mean what i should give mod settings file with all changes to my friends and start new game?
What I do is zip up the entire mods folder into a mods.zip file and distribute that to the players who want to connect, just to be sure everything matches perfectly.

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

Re: [posila] [0.17.64] Multiplayer desync / too much mods?

Post by posila »

CynAtom wrote:
Wed Aug 21, 2019 12:06 pm
This mean what i should give mod settings file with all changes to my friends and start new game?
After further investigation it turned out not to be problem with mod settings. ZAdventure end up with non-deterministic data stage, somehow. I am trying to figure out how.

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

Re: [posila] [0.17.64] Multiplayer desync / too much mods?

Post by posila »

I am giving up on trying to fix this. Instead I've added prototype checksum, so that difference in prototypes is detected even before connecting. The problem is serializing table that contains functions (even though the only function that causes the nondeterministic behavior seems to be no-op: function() end) in ZAdventure ... the issue seems to be deep rooted inside the Lua interpreter.

Adamo
Filter Inserter
Filter Inserter
Posts: 479
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: [posila] [0.17.64] Multiplayer desync / too much mods?

Post by Adamo »

posila wrote:
Thu Aug 22, 2019 2:54 pm
I looked for this a bit in the ZAdventure code, because I had experienced a problem that sounded similar when reading functions from a metatable. But the code was too big for me to just figure out in an hour, and since you were on it, I figured you'd do a better job than I could, and since it was data phase, not control phase, I figured it was probably unrelated. But now you mention it's related to serializing functions, which makes it a bit more similar. When I had my problem, I ultimately found that the issue was in a print that was being sent out that referred to different locations of the same function, and was also printing a message that depended on the reference value, so the print was coming out differently for different clients. This probably isn't helpful, but, on the off chance, and since I saw that ZAdventure is doing a bunch of logging even, IIRC, during the data phase, I mention it.

Post Reply

Return to “Desyncs with mods”