The International Simutrans Forum

 

Author Topic: Oneway Twoway Road Patch for the Extended  (Read 15207 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

  • Devotee
  • *
  • Posts: 3370
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Oneway Twoway Road Patch for the Extended
« Reply #140 on: July 30, 2020, 01:55:05 PM »
The new display of overtaking modes is excellent. I found quite some places with unexpected overtaking restrictions. Thank you very much.

EDIT: but it seems that after changing a city (public) road to two-way (from one-way) causes desync. Not immediate though. After reconnect the one-way mode is as it was before change.
It seems to be related to public player and public right of way roads. Modifying players own roads does not desync.

EDIT2: PROW does not affect it. But public player modifying private road causes desync too. If the owner does it, no desync happens.
« Last Edit: July 30, 2020, 02:33:44 PM by Vladki »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19955
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Oneway Twoway Road Patch for the Extended
« Reply #141 on: July 30, 2020, 03:15:15 PM »
I believe that I have now fixed the loss of network synchronisation - thanks to Freddy for identifying the cause of this.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 281
  • Languages: EN
Re: Oneway Twoway Road Patch for the Extended
« Reply #142 on: July 30, 2020, 10:14:00 PM »
I believe that I have now fixed the loss of network synchronisation - thanks to Freddy for identifying the cause of this.
Looking at the code, your fix should work, but I am worried that the spread of player logic into classes and files where it had not previously existed will make future synchronisation issues harder to identify. It would be much better to handle this in wegbauer.cc, which was designed for such logic.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 281
  • Languages: EN
Re: Oneway Twoway Road Patch for the Extended
« Reply #143 on: July 31, 2020, 02:13:31 PM »
This causes a segfault when the player parameter is passed as NULL by cities. An interim fix would be to add more if(player) checks. I still think it would be better to move the logic elsewhere.

Online Phystam

  • Devotee
  • *
  • Posts: 443
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Oneway Twoway Road Patch for the Extended
« Reply #144 on: August 01, 2020, 10:03:58 AM »
the segfault happens very often on my server... Overwriting overtaking mode by cityroad (by NULL player) is one of the causes, as freddy reported.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 281
  • Languages: EN
Re: Oneway Twoway Road Patch for the Extended
« Reply #145 on: August 01, 2020, 10:19:07 AM »
the segfault happens very often on my server... Overwriting overtaking mode by cityroad (by NULL player) is one of the causes, as freddy reported.
In your case I would certainly recommend reverting the server and clients back to 26a357. It will still cause desync issues when modifying overtaking modes, but that is better than crashing.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19955
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Oneway Twoway Road Patch for the Extended
« Reply #146 on: August 01, 2020, 11:15:39 AM »
Thank you for the report - I believe that I have now fixed the crashes. I should be grateful if people could re-test with the next nightly build.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 281
  • Languages: EN
Re: Oneway Twoway Road Patch for the Extended
« Reply #147 on: August 01, 2020, 12:32:40 PM »
Thank you for the report - I believe that I have now fixed the crashes. I should be grateful if people could re-test with the next nightly build.
Your fix seems to have worked - running the bridgewater-brunel save offline has gone without crashes for a long time. edit, nearly forgot: thank you!

Online Phystam

  • Devotee
  • *
  • Posts: 443
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Oneway Twoway Road Patch for the Extended
« Reply #148 on: August 01, 2020, 05:15:05 PM »
Splendid!!!

Offline Ranran

  • Devotee
  • *
  • Posts: 1071
  • Languages: ja
Re: Oneway Twoway Road Patch for the Extended
« Reply #149 on: August 02, 2020, 05:32:32 PM »
As I've already explained, there is a case where the arrow is not displayed in the usual one way now, so I changed it to blue for this measure.

Please check pull request #229.

Offline Freahk

  • Devotee
  • *
  • Posts: 1163
  • Languages: DE, EN
Re: Oneway Twoway Road Patch for the Extended
« Reply #150 on: August 02, 2020, 06:40:19 PM »
Soes that mean the arrows are not displayed at all anymore?