I know desyncs related to user scripts won't be investigated unless proven that the dsync is not caused by the script. But I beg you to hear me out. I have several clues that make me believe the bug is in the commands API.
- 1. I have two commands (/mods and /regulars), which are implemented identically. The only difference is the variable that will be accessed. Code was actually copied, pasted and search & replaced. But /regulars caused desyncs, while /mods worked fine.
2. After a server restart the commands desync behavior will change. Meaning certain other commands will cause a set of certain other placers to desync. But the scripts that would have caused the desync earlier (like /regulars) will no longer cause desyncs and work fine.
3. I have found cpp exceptions in the logs. I don't know if that's relevant or not.
(4. This is probably caused by one of my drivers and not factorio, but I thought mentioning won't hurt. 5 seconds after using a desyncing command I got a bluescreen. But if I have a driver issue personally, that couldn't have caused the desyncs, because the desync behavior is identical for all players on the server.)
I have attacked 3 logs: The log of the client using the command causing the desync (in this case /regulars). The log of on the "victims" of the desync. And the server log.
One example of desyncs is at the following moment: (11759.674 in the client.log, 219.820 in the victim log, 718.910 in the server log)
I have also attached the files involved.
If you have any questions, need more files or want me to try/test something, i will gladly help you.