The International Simutrans Forum

 

Author Topic: [Bug] crash when creating a narrow gauge/road with tramways level crossing  (Read 241 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • *
  • Posts: 228
  • Languages: DE, EN
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.
Quote
FATAL 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.

Offline Freahk

  • *
  • Posts: 228
  • Languages: DE, EN
Re: [Bug] crash when creating a narrow gauge/road with tramways level crossing
« Reply #1 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.

Offline Matthew gb

  • *
  • Posts: 227
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: [Bug] crash when creating a narrow gauge/road with tramways level crossing
« Reply #2 on: September 26, 2019, 08:59:52 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.

Offline Freahk

  • *
  • Posts: 228
  • Languages: DE, EN
Re: [Bug] crash when creating a narrow gauge/road with tramways level crossing
« Reply #3 on: September 26, 2019, 09:51:34 PM »
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.