[1.1.60] Desync bug

This subforum contains all the issues which we already resolved.
Post Reply
ILLISIS
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Feb 09, 2022 10:49 am
Contact:

[1.1.60] Desync bug

Post by ILLISIS »

As per instruction by Bilka

I have a desync issue that is caused from the beginning of the game but is rather hidden for some time until a crc check is done by game internals.

Steps to reproduce:
1) Enable Constructron-Continued (any version)
2) Load a fresh multiplayer game
3) /c game.force_crc()

--
Desync report:
https://transfer.sh/VIQrfC/desync-repor ... -26-00.zip

---
Links:
https://mods.factorio.com/mod/Constructron-Continued
https://github.com/ILLISIS/Constructron-continued

---
Discord conversation 12/6/22 in Mod-making..

Bilka: The Constructron desync doesnt happen in 1.1.50
[7:04 PM] Bilka: Just make a bug report
Bilka: The difference is that the desynced save says the mod was removed and readded once, while the reference save does not say that
[6:41 PM] Bilka: my guess was that the mod does reload_mods() or something, but I couldn't find anything like that in the code
] Illisis: Desyncs with mods category Bilka?
[7:11 PM] Bilka: no, normal bug report
[7:11 PM] Bilka: if you put it in desyncs with mods, nobody will look at it
[7:12 PM] Bilka: + you make it look like the mod is the cause, which is rather unlikely given that the desync is that one of the saves thinks the mod was removed and then added again
[7:12 PM] Illisis: fair enough
[7:12 PM] Bilka: that's not exactly something a mod can cause, especially not without calling reload mods or reload script

---
Hornwitser's desync tool output:

Code: Select all

python3 -m hornwitser.factorio_tools desync desync-report-2022-06-12_17-26-00.zip
Unzipping desync-report-2022-06-12_17-26-00.zip

level_with_tags.dat differs
---------------------------

replace   ref[1:2] -> des[1:2]
<scenario-history> pos=8608972
ref: b'\x06'
<scenario-history> pos=8608972
des: b'\x07'

insert    ref[99:99] -> des[99:116]

ref: b''
<scenario-history> pos=8608972
des: b'<scenario-history-step>\x02<scenario-history-change-item type=2>\x02\x16Constructron-Continued<version>\x01\x00\x05</version>\xc5\xf5{\x98</scenario-history-change-item><scenario-history-change-item type=1>\x01\x16Constructron-Continued<version>\x01\x00\x05</version>\xc5\xf5{\x98</scenario-history-change-item></scenario-history-step>'

Rseding91
Factorio Staff
Factorio Staff
Posts: 12277
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.60] Desync bug

Post by Rseding91 »

Thanks for the report. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

ILLISIS
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Feb 09, 2022 10:49 am
Contact:

Re: [1.1.60] Desync bug

Post by ILLISIS »

Thank you!

Any idea why this seemed to effect only my mod?

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 1816
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.60] Desync bug

Post by boskid »

Its not specific to your mod. This is basically a continuation of 102253 which was fixed by using vector of ModID's that is sorted not by a mod name but by a dependency order. This later caused other issues like 102526 and now this one. There are vectors of ModIDs which are sorted either by a mod name lexicographically, or ModIDs sorted by dependency order. All mods with names which compare lower than string "base" (which includes all mods starting with capital letter as yours, or mods with lower case letter "a" at the beginning and "ba" + letter before "s") and have a dependency on the "base" mod are affected because in the dependencies order they compare second but using names order they compare first. During load the ScenarioHistory was given 2 vectors which were sorted differently and the logic started adding new history step for the observed difference. Fix for this bug report should fix this throroughly because usage of names-order was reduced a lot and the ScenarioHistory no longer cares about order of ModIDs inside of a vector.

Thiske
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Nov 21, 2020 11:53 am
Contact:

Re: [1.1.60] Desync bug

Post by Thiske »

Not that it really matter but it also happend to me using 1.1.59 with aai-signal-transmission

Post Reply

Return to “Resolved Problems and Bugs”