The International Simutrans Forum

 

Author Topic: Cannot purchase trams or aircraft  (Read 1466 times)

0 Members and 1 Guest are viewing this topic.

Offline 1993matias

  • *
  • Posts: 95
  • :)
    • Airline Mogul
  • Languages: DK, EN, ES
Cannot purchase trams or aircraft
« on: April 15, 2019, 11:27:48 AM »
Latest nightly build (364b448), when I open the electrified tram depot (new or existing) I can't buy a tram. All available trams appear, but nothing happens when I click on them. Happens both in my savegame but also the demo game. The track is tram track and electrification is tram DC catenary.

EDIT: It seems only to be the trams that have this issue. Bus and train depots are working completely normal
« Last Edit: April 15, 2019, 12:18:23 PM by 1993matias »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20715
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Can't buy trams
« Reply #1 on: April 15, 2019, 03:25:14 PM »
Thank you for the report. I am afraid that I am away this week and do not have access to the computer where I can do significant debugging works. I will look into this when I get back home next week. My apologies for the difficulties in the meantime.

Offline Ranran

  • Devotee
  • *
  • Posts: 1467
  • Languages: ja
Re: Can't buy trams
« Reply #2 on: April 15, 2019, 03:59:35 PM »
I confirmed that I can not buy tram with the latest build.
But with the April 12th build I can buy the tram correctly.

EDIT:
It seems to be triggered by this commit because it works correctly when revert this commit.
« Last Edit: April 15, 2019, 04:11:58 PM by Ranran »

Offline 1993matias

  • *
  • Posts: 95
  • :)
    • Airline Mogul
  • Languages: DK, EN, ES
Re: Can't buy trams
« Reply #3 on: April 15, 2019, 04:01:22 PM »
Thank you for the report. I am afraid that I am away this week and do not have access to the computer where I can do significant debugging works. I will look into this when I get back home next week. My apologies for the difficulties in the meantime.
Thanks for your hard work - don't worry about it

Ranran: Would you be able to share (or point me at) the April 12th build? In case James takes some days off :)

Offline Ranran

  • Devotee
  • *
  • Posts: 1467
  • Languages: ja
Re: Can't buy trams
« Reply #4 on: April 15, 2019, 04:15:56 PM »
Ranran: Would you be able to share (or point me at) the April 12th build? In case James takes some days off
Yes, here it is.  ;)
https://drive.google.com/open?id=17l02V91ToIvZpDz1MgW4CHazZEnS5ZFI

Note: It is a 64-bit version for windows

Offline passengerpigeon

  • *
  • Posts: 84
  • Languages: EN, ES, FR
Re: Can't buy trams
« Reply #5 on: April 18, 2019, 10:39:08 PM »
I have noticed this problem with both trams and aircraft since a few days ago. Buses work fine, as do trains; not sure about ships or narrow gauge.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2836
  • Languages: EN
[BUG] Cannot buy planes from air depot.
« Reply #6 on: April 19, 2019, 05:39:40 AM »
Logged into the server game. Wanted to buy some planes at an air depot to increase service frequency of a busy line. Cannot.

Literally I cannot buy the planes. Clicking the buttons does absolutely nothing. The depot way type does have sufficient axel load and so does the runway it is connected to. Does not matter which airplane one clicks, none of them get brought. All aircraft show green bars under which usually indicates that purchase is possible.

This only effects air depots. I can buy cars, trains and boats at the appropriate depots no problem, just not aircraft.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2836
  • Languages: EN
Re: Can't buy trams
« Reply #7 on: April 19, 2019, 05:42:03 AM »
Also run into the cannot buy aircraft problem. I am guessing it is related to this.

Offline Jando

  • *
  • Posts: 506
Re: Can't buy trams
« Reply #8 on: April 19, 2019, 12:18:16 PM »
I'm seeing the same with narrow gauge trains.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20715
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot purchase trams or aircraft
« Reply #9 on: April 19, 2019, 12:50:23 PM »
I have merged the topic with that relating to aircraft. As noted above, I am currently away from home and without access to the computer on which I have my debugger set up, so I am afraid that I will not be able to look into this until next week; my apologies. If anyone would like to look into a fix for this in the meantime, that would be most helpful.

Offline Ranran

  • Devotee
  • *
  • Posts: 1467
  • Languages: ja
Re: Cannot purchase trams or aircraft
« Reply #10 on: April 19, 2019, 09:46:55 PM »
I suppose the problem is here as I mentioned before.
https://github.com/jamespetts/simutrans-extended/commit/364b44895c6afd2371f3e93ef63739f725ea96dc

There are the following 8 types of depot in simutrans (corresponded to waytype):
Code: [Select]
obj_t::strassendepot;
obj_t::bahndepot;
obj_t::schiffdepot;
obj_t::monoraildepot;
obj_t::maglevdepot;
obj_t::tramdepot;
obj_t::narrowgaugedepot;
obj_t::airdepot;
German to Eng: strassen = road, bahn = train, schiff = ship.

However, it was rewritten to specify only 3 types - strassendepot, bahndepot and schiffdepot in that commit. So it seems that an error has occurred in other depots. That is, monorail, maglev, tram, narrow gauge, and air.
I do not know if this is done to avoid something. Any reason?

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20715
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot purchase trams or aircraft
« Reply #11 on: April 19, 2019, 10:02:35 PM »
Thank you for this. I think that I have been able to fix this without using the debugger - I should be grateful if anyone could test with to-morrow's nightly build.

This code change was implemented to make this function deterministic: the equivalent function for signalboxes had caused the serious loss of synchronisation problem that took 6 months to solve recently and which was solved by implementing an equivalent change. I had not remembered that each specific waytype had its own depot type (I seem to remember copying this from some code that also specified only these types of depots, although I cannot now recall where), and must have assumed that these depot types were sufficient to cover others (which I must have assumed were implemented as subtypes).

I am not sure why the code for building vehicles from a depot has to search for the depot on a particular piece of ground in order to complete the building, but I have now modified the function to specify each depot type separately, so hopefully this should work (testing with trams seems to confirm this).

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2836
  • Languages: EN
Re: Cannot purchase trams or aircraft
« Reply #12 on: April 20, 2019, 05:10:41 PM »
Seems fixed now.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20715
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot purchase trams or aircraft
« Reply #13 on: April 20, 2019, 05:33:26 PM »
Splendid, thank you for confirming.