Trainworks & Couplers


Extend your train network by using couplers and other train-related enhancements!

Content
2 days ago
2.0
143
Transportation Trains Circuit network

b Multiplayer Desynchronization (CRC Heuristic Failed)

a month ago
(updated a month ago)

I would like to report a multiplayer desynchronization issue that seems to be caused by this mod.
My friend and I were experiencing immediate desyncs upon joining the server. The log showed multiple Multiplayer desynchronisation: crc test (heuristic) failed errors.
We performed isolation testing:
We ensured that both the host and the client had the exact same mod version and startup settings.
The desync persisted when Trainworks & Couplers was enabled.
The connection became stable immediately after we disabled this mod (while keeping other mods active).
It seems there might be some non-deterministic logic (e.g., iterating over tables using pairs without sorting) affecting the game state simulation.
Here is a snippet of the error log:
code
Code
Error GameActionHandler.cpp:2808: Multiplayer desynchronisation: crc test (heuristic) failed for crcTick(...) serverCRC(...) localCRC(...)
I hope this information helps you investigate the issue. Thanks for your work on this mod!

serverCRC(2047297853) localCRC(4053748416)
333.879 Error GameActionHandler.cpp:2808: Multiplayer desynchronisation: crc test (heuristic) failed for crcTick(135642048) serverCRC(512756418) localCRC(2694346990)
333.889 Error GameActionHandler.cpp:2808: Multiplayer desynchronisation: crc test (heuristic) failed for crcTick(135642049) serverCRC(2757027734) localCRC(2531806212)
333.901 Error GameActionHandler.cpp:2808: Multiplayer desynchronisation: crc test (heuristic) failed for crcTick(135642050) serverCRC(1733560713) localCRC(3167995417)
333.911 Error GameActionHandler.cpp:2808: Multiplayer desynchronisation: crc test (heuristic) failed for crcTick(135642051) serverCRC(1210243736) localCRC(3106753096)

Arrg, I've been trying hard to resolve this issue but continue to struggle with the multiplayer synchronization. There's a lot of moving parts to make the circuit-side of things working and I must be doing something wrong. My apologies, this is my first mod so getting the hang of things haha.

As stated in my reply to your other comment, life's gotten busy again, so PRs are always welcome, otherwise I'll look into this as soon as I can. I appreciate the detailed information!

https://github.com/FireController1847/ftrainworks

New response