News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

PR#568 - Several minor fixes

Started by ceeac, September 03, 2022, 08:13:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ceeac

PR#568 fixes several several easy-to-fix bugs - mostly uninitialized reads, use-after-frees and missing return values. This should eliminate several potential sources of desyncs, although I have not encountered any relevant ones during testing.

I have also removed the "using namespace std" from float32e8_t.h, which might break some calls to min/max, but I have not encountered any differences between the old code and the new code (tested with the "heavy mode" desync checker).

jamespetts

Excellent, thank you for this: now incorporated. I notice that one of the checks was a data race in the calls to await_path_explorer(); I am interested in whether this might have been the cause of the thread deadlocks that occasionally take down the online games.

I have just restarted the Bridgewater-Brunel server from such an outage, and it will be interesting to see whether this problem recurs in the near future. It will be useful to retain the current late stage game for a while to test this thoroughly.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ceeac

Quote from: jamespetts on September 03, 2022, 12:24:31 PMI am interested in whether this might have been the cause of the thread deadlocks that occasionally take down the online games.
No idea - I personally have not encountered a thread deadlock so far, so I do not know what the cause might be.

Matthew

Quote from: ceeac on September 03, 2022, 08:13:36 AMPR#568 fixes several several easy-to-fix bugs - mostly uninitialized reads, use-after-frees and missing return values. This should eliminate several potential sources of desyncs, although I have not encountered any relevant ones during testing.

I have also removed the "using namespace std" from float32e8_t.h, which might break some calls to min/max, but I have not encountered any differences between the old code and the new code (tested with the "heavy mode" desync checker).

Thank you for fixing these bugs, ceeac! I appreciate your kindness in using your advanced coding skills to benefit the Simutrans community.

Quote from: jamespetts on September 03, 2022, 12:24:31 PMExcellent, thank you for this: now incorporated. I notice that one of the checks was a data race in the calls to await_path_explorer(); I am interested in whether this might have been the cause of the thread deadlocks that occasionally take down the online games.

I have just restarted the Bridgewater-Brunel server from such an outage, and it will be interesting to see whether this problem recurs in the near future. It will be useful to retain the current late stage game for a while to test this thoroughly.

Both B-B and TSE have had freezes in the last week, so unfortunately I think this fix has not solved the bug. I will continue the discussion in this thread.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

Thank you for your feedback - this is helpful (albeit the substance of it unfortunate).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.