Page 1 of 1
[0.16.36] Desync report on dedicated server with 3 players
Posted: Mon Jun 11, 2018 9:10 pm
by mokujin
We played a map on a server with 3 players and (possibly) after placing a blueprint over items marked for deletion desync occured for all players. After reverting save file to most recent autosave, desync was not happen for a while, but after some period of time started to happen again periodicaly only for one of the players. Attaching a couple of desync reports, mods folder and probably bugged save file.
Attachments:
desync report 1
desync report 2
desync report 3
save file
mods folder
Re: [0.16.36] Desync report on dedicated server with 3 players
Posted: Tue Jun 12, 2018 7:41 pm
by mokujin
Looks like desyncs was caused by
turrent shields mod. Desyncs are happening right after marking turrents with shields for automatic deconstruction by bots. We removed this mod and issue resolved.
Re: [0.16.36] Desync report on dedicated server with 3 players
Posted: Tue Jul 17, 2018 12:13 am
by ownlyme
i really have no idea what causes the desyncs.
Now i have another guy telling me his game desyncs when the shields loose power.
I tested it and can verify it. it only happens when the shields have been fully charged though. (no shield bar displayed)
This is what the mod does at that point:
The on_tick event is registered on every 23th tick.
It loops through the shields table and compares the stored variable with the current energy stored in the electric-energy-interface to check if it lost energy.
It then reduces the stored energy by an amount (tested this with a fixed amount equal to 1/3 of the buffer size -> didn't help)
I think this is causing the desync:
It then creates one of 9 dummy entities that shows the current shield value and updates the table.
Maybe something on the game side is not working perfectly...
my mod is now marked as multiplayer incompatible...
Re: [0.16.36] Desync report on dedicated server with 3 players
Posted: Wed Jul 18, 2018 2:07 pm
by ownlyme
does any developer read this forum?
Re: [0.16.36] Desync report on dedicated server with 3 players
Posted: Wed Jul 18, 2018 2:21 pm
by nuhll
Yes, they are, but you must understand that mods are 3rd party, so its not a must to support it, ig uess its better if you post a new thread in the correct forum and ask for help from other devs.
Re: [0.16.36] Desync report on dedicated server with 3 players
Posted: Wed Jul 18, 2018 10:27 pm
by ownlyme
i rather write a 3 line desync mod to demonstrate to the devs how awful their mod support is.
otherwise i dont give a fk, im not playing the game in multiplayer myself anyway.
Re: [0.16.36] Desync report on dedicated server with 3 players
Posted: Wed Jul 18, 2018 10:35 pm
by Rseding91
ownlyme wrote:i rather write a 3 line desync mod to demonstrate to the devs how awful their mod support is.
otherwise i dont give a fk, im not playing the game in multiplayer myself anyway.
The problem is your mod is storing variables outside of the "global" table between ticks which isn't save-load stable. Specifically the global variables at the top of your mod.
Re: [0.16.36] Desync report on dedicated server with 3 players
Posted: Wed Jul 18, 2018 10:44 pm
by ownlyme
wow, it really works! (Oo)
i thought it was because the energy network wasn't synced and by removing the power pole players would have different states of the internal electric buffer and caused the checksum error due to the entity creation.
Thank you very much and sorry for what i said about modding support
If anybody in the future finds this thread and wonders what i changed to make it work: take a look at turret shields version 29->30
I think it was a non-global variable i used to go through the shields table, which is pretty big and for performance reasons i wanted to only parse a limited amount of entries per tick