News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[Bug] crash when creating a narrow gauge/road with tramways level crossing

Started by Mariculous, September 18, 2019, 07:42:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

Hey there,
freddyhayward mentioned a crash in the "(useful) way construction glitches" thread, when creating a level crossing in between (pretty glitchy) dual gauge rails and roads, which would cause three waytypes on a single ground.
Simutrans is not designed to handle more than two ways on the same grund, so undefined behavior is expected in that case. As building dual gauge tracks is a bug on it's own and it is not something that accidently happens, the crash is not pretty critical.

However, when building a tramway, this crash came in mind again, so I tried to level cross this section of road/tram with a narrow gauge track.
The game immediately crashed.
QuoteFATAL ERROR: grund_t::neuen_weg_bauen() - cannot built more than two ways on 16,18,0! ...

This does not happen when crossing these with high voltage powerlines, in both, extended and standard.
Not quite sure if this is specific to extended as I didn't have any standard pakset with narrow gauge tracks.
However, I could not place tramways on a canal/road level crossing in pak128. It simply didn't allow to build a that tile.

We should hotfix this by not allowing three waytype level crossings.
In the long term it would be great to support for any number of waytypes crossing, as this would allow road/tramway level crossings with narrow gauge and would improve road/tramway/railway level crossings.

Mariculous

It is also possible to cause undefined level crossings this way, at least in some cases.
1. Build a road adjacent to a (small) river
2. drag the road tool from one of these road tiles onto the adjacent river tile
3. relese the mouse button
=> FATAL ERROR: crossing_t::crossing_t() - requested for waytypes 1 and 3 but not defined!

Not quite sure if this is the same bug but it is at least related.

Matthew

Quote from: Freahk on September 26, 2019, 03:28:35 PM
It is also possible to cause undefined level crossings this way, at least in some cases.
1. Build a road adjacent to a (small) river
2. drag the road tool from one of these road tiles onto the adjacent river tile
3. relese the mouse button
=> FATAL ERROR: crossing_t::crossing_t() - requested for waytypes 1 and 3 but not defined!

Not quite sure if this is the same bug but it is at least related.

This recent thread on creating fords for rivers may be of interest to anyone seeking to fix this bug.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Mariculous

Well yeah I know it is possible if there is a "level crossing" defined for These. Before I started with Pak128.Britain-Ex, I have played pak128 at simutrans standard for a long tim, which has these implemented as a lift bridge.
Wouldn't it be great to have london tower bridge as a "level crossing" for larger rivers?  :-X

That said, we should not remove the possibility for river level crossings, but we should deny placement in case there is no such bridge defined, even if placement is "forced" by an adjacent way.

jamespetts

Thank you for the reports - I believe that I have now fixed this. I should be grateful if you could re-test with the next nightly build.
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.