The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: DrSuperGood on June 05, 2019, 04:18:47 PM

Title: [BUG] Can Make Signal Box Partly Overlap Rails.
Post by: DrSuperGood on June 05, 2019, 04:18:47 PM
Multi tile signal box placement does not correctly test tile occupancy for tiles other than the main one.

Attached is a save which can be used to demonstrate this. Find the sign on the map and follow the instructions. The instructions are to delete the sign (for some reason one cannot place a signal box over a sign... another bug?) and then place the specified signal box where the sign was. The signal box is 2 tiles large and the second tile will be placed on top of a tile containing rails.

The setup recreated in the save mirrors where I encountered this issue on the Bridgewater Brunel server, so it can be consistently recreated. Deleting the signal box in this state will only delete 1 of the two tiles that make it up. It is not possible to repair the track after removing the signal box and tile of rails without performing a save/load cycle.
Title: Re: [BUG] Can Make Signal Box Partly Overlap Rails.
Post by: jamespetts on June 05, 2019, 06:00:15 PM
Thank you for your report. I believe that I have now fixed this; I should be very grateful if you could re-test with to-morrow's nightly build.
Title: Re: [BUG] Can Make Signal Box Partly Overlap Rails.
Post by: Matthew on July 06, 2022, 11:44:35 PM
Tonight I rediscovered the hard way that this bug (originally reported in 2016 (https://forum.simutrans.com/index.php/topic,15293.new.html#new)) is still present.

The reproduction case provided above by DrSuperGood is still not fixed.

Steps to reproduce

1. Start a new game in 2010 (in-game time).
2. Build a railway line on a NW-SE diagonal.
3. Build a two-tile signalbox (e.g. TVM Signalling Tower or ERTMS Control Centre (large)) one tile to the north of the railway line.

Expected results

Either:
(a) the signalbox is built in an E-W layout, avoiding the railway
or
(b) the signalbox is not built (and ideally an error message appears explaining why)

Actual results

(a) The signalbox is built with a N-S layout on top of the line, blocking it:

(https://i.imgur.com/Zx8cftN.png)

(b) If the signalbox is deleted, nothing else can be built on the affected tile until the game is closed and reloaded, so that line cannot be repaired.
(c) Deleting the signalbox may possibly also cause a desync if the client has reloaded and the server has not, but I haven't looked into this closely since it has the the same diagnosis and fix as (a) and (b) above.

Comments

I can't reproduce this with roads or canals in the same layout; the signalbox correctly switches to an east-west layout. It only occurs with the Railway and Narrow-Gauge waytypes.

It appears that there was an attempt to fix the general problem of signalboxes overlapping onto other objects in commit #f33fd94 (https://github.com/jamespetts/simutrans-extended/commit/f33fd94a51c1ea62a5b1ee3c429c9be9240c223c) but this is not working in this case. I speculate that this is something to do with the fact that track is diagonal.

There is another open bug report concerning the placement of signalboxes:
Multitle [sic] signalbox refuses to be built on artificial flat slopes (https://forum.simutrans.com/index.php/topic,21429.msg199114.html#msg199114)

As well as as a thread that is inbetween a bug report and a feature request:
Why must signalboxes only be placed on flat ground? (https://forum.simutrans.com/index.php/topic,20170.msg189664.html#msg189664)

I concur with freddyhayward in that post and Ves here (https://forum.simutrans.com/index.php?msg=150719): it would be ideal if signalboxes could be built using the same approach to rotation as extension buildings, so that players can choose any of four rotations using the Ctrl button. It would make corner cases like this less likely to occur. At the moment I often end up trying to build signalboxes in random locations because there does not seem to be any rhyme or reason to where they can be built using the automated rotation.