News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

[BUG] game will crash when dragging a tunnel that has a way assigned

Started by Mariculous, October 28, 2020, 03:59:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

The game will crash when dragging a tunnel in the underground, which has the way=ways_obj_name attribute set.

How to reproduce?
1. a Download https://www.simutrans.ovh/server/41/pakset or, if the pakset has already been updated at that time,
    b add the way=ways_obj_name attribute to any tunnel inany pakset and compile the pakset
2. Launch the game and load the pakset
3. Build a tunnel portal of that tunnel type using ctrl+click, in pak192.comic the only tunnel that still has the attribute defined (Because I missed to remove that line) is the fast road tunnel.
4. Switch to underground mode and try to expand the tunnel
5. Happy crashing, simutrans will close without any information.


In standard, the way to define the underground tunnel image was by creating a related way and sticking it to the tunnel using the way=ways_object_name attribute.
In extended, this feature was obsoleted by the UndergroundImage.
One claim of extended is to be standard compatible, when the dats are compiled with extended makeobject.
Thus I think the proper behavior is to always build the tunnel with the assigned way, if there is one assigned, and to refuse any changes of the way in such tunnels.
In any case, it should not crash when this attribute is defined!