The International Simutrans Forum

 

Author Topic: [Crash] The game crashes when public player manipulates access permissions  (Read 142 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1511
  • Languages: ja
Reproducibility: 100% in demo.sve, 0% in new map (immediately after the start)

Reproduction procedure:
(1) Load demo.sve
(2) Open the player list
(3) Switch to public player
(4) Click the access check button in the row of other players


Strictly speaking, the game is stopped by the index out of bounds message of vector_tpl rather than the game crashing.
If you exclude that code, the game won't crash, but it will produce unexpected results.
For example, when a public player withdraws access, the route disappears and many convoys teleport to depots.
I'm guessing that the new map won't crash because this doesn't happen.


And one contradiction is that the new map defaults to allowing normal players access to public players. However, public players are viewed as hostile in demo.sve and no one allows access to public player, but he still remains public. (´;ω;`)
This may not be related to the crash.


I don't know which part of the code is causing the out of index error.

Anyway, I think the necessary measure is to lock the buttons related to it so that it cannot be operated on public player's access.
« Last Edit: May 26, 2021, 12:23:09 PM by Ranran »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20776
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Thank you for your report. I believe that I have now fixed this; I should be grateful if you could re-test with the next nightly build.