The International Simutrans Forum


Author Topic: Desync with Visual Studio builds and GCC builds  (Read 417 times)

0 Members and 1 Guest are viewing this topic.

Offline ACarlotti

  • *
  • Posts: 483
Desync with Visual Studio builds and GCC builds
« on: May 04, 2018, 09:20:27 AM »
If you are self-building, you might find debug builds more useful than release builds because Visual Studio builds will not stay in sync with a server running a GCC build, whereas cross-compiled GCC builds will stay in sync. (In principle, this is a bug, but it would be so fantastically difficult to track down that it is not worthwhile to do so given that there is such an easy workaround, viz. using the cross-compiled builds which are produced nightly).

This sounds like an interesting but probably frustrating bug. I'm wondering what has been done to test/investigate this in the past.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20266
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Desync with Visual Studio builds and GCC builds
« Reply #1 on: May 04, 2018, 12:04:10 PM »
I have split this into a new thread so as to keep the other thread focussed on instructions for compiling Simutrans-Extended with Visual Studio.

There has not been much work done to try to find the cause of this aside from testing sufficient to confirm that this is a specific issue. The trouble is that there is no way to spot where two code paths diverge in a debugger: it is a matter of exhaustive trial and error, which can often involve many iterations of disabling whole sections of the code/simulation and narrowing down which specific parts cause difficulty. This is made more complex by multi-threading. Desync bugs have taken up to 4 months of intensive work to find and fix in the past (that particular example was caused by the use of floating point arithmetic, which is not deterministic accross different platforms).