The International Simutrans Forum

 

Author Topic: Bug: Game crashes when clicks the initial placed road  (Read 423 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran jp

  • *
  • Posts: 353
  • Languages: ja
Bug: Game crashes when clicks the initial placed road
« 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.
« Last Edit: June 02, 2018, 03:05:54 AM by Ranran »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bug: Game crashes when clicks the initial placed road
« Reply #1 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.

Offline Matthew

  • *
  • Posts: 99
  • Languages: EN, some ZH, DE & SQ
Re: Bug: Game crashes when clicks the initial placed road
« Reply #2 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.

Offline Ves

  • Devotee
  • *
  • Posts: 1611
  • Languages: EN, SV, DK
Re: Bug: Game crashes when clicks the initial placed road
« Reply #3 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?

Offline ACarlotti

  • *
  • Posts: 355
Re: Bug: Game crashes when clicks the initial placed road
« Reply #4 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18425
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bug: Game crashes when clicks the initial placed road
« Reply #5 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.

Offline Ranran jp

  • *
  • Posts: 353
  • Languages: ja
Re: Bug: Game crashes when clicks the initial placed road
« Reply #6 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.
« Last Edit: June 03, 2018, 12:59:06 PM by Ranran »