The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: RESTRICTED ACCOUNT on June 02, 2018, 02:38:08 AM

Title: Bug: Game crashes when clicks the initial placed road
Post by: RESTRICTED ACCOUNT on June 02, 2018, 02:38:08 AM
When you check any roads with inspection tool, Simutrans crashes every time.
I have confirmed this occurs only in pak128.Sweden-Ex, and it has not occurred in pak128.Britain-Ex.
(´・ω・`)

EDIT: This only occurs on maps created automatically on initial launch and may not occur on maps you made.
Old saved games are OK, newly started games are NG.
The road newly built by player is OK. Initially placed road is NG.
Title: Re: Bug: Game crashes when clicks the initial placed road
Post by: jamespetts on June 02, 2018, 10:37:08 AM
Thank you for your report. I have moved this out of the Swedish pakset forum to the main development forum as this sort of bug will be a general Simutrans-Extended bug rather than a pakset specific bug even if it affects only one pakset.

I will look into this when I get home and am able to access the computer on which I can run a graphical debugger.
Title: Re: Bug: Game crashes when clicks the initial placed road
Post by: Matthew on June 02, 2018, 08:36:44 PM
Possibly related: when I click on buildings in Pakset 128 Sweden, I get the window relating to the underlying land (the one that displays the forge costs), not the one that displays buildings. I thought this was because I was using a Pakset version that's a few weeks old with the latest Nightly Simutrans, but maybe not.
Title: Re: Bug: Game crashes when clicks the initial placed road
Post by: Ves on June 02, 2018, 08:50:41 PM
There are a bunch of parameters that are "missing" in pak Sweden, for instance all class related stuff and whatnot. Could it be that the game assumes some values that are not given a default value?
Title: Re: Bug: Game crashes when clicks the initial placed road
Post by: ACarlotti on June 02, 2018, 10:06:26 PM
The issue appears to be that there is no valid replacement road time. get_timeline_road_type (in settings.cc) is therefore returning null. But line 799 in boden/wege/weg.cc assumes that latest_city_road is not null. So either get_timeline_road_type should avoid returning null, or weg.cc needs to check. The former strategy appears to be already in use for choosing the types of new construction, so it would seem best to try to use that logic.

James: I think this should be enough information to allow to choose the behaviour and sort it without a debugger.
Title: Re: Bug: Game crashes when clicks the initial placed road
Post by: jamespetts on June 02, 2018, 11:26:36 PM
Thank you - that is very helpful. I have pushed what I hope is a fix to this - I should be grateful if anyone could confirm with the next nightly build.
Title: Re: Bug: Game crashes when clicks the initial placed road
Post by: RESTRICTED ACCOUNT on June 03, 2018, 12:14:57 PM
I confirmed that it has been fixed in today's nightly build. (´・ω・`)b
Thank you for working on this.