News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[PR#646] Direction of cargo waiting for the line at station

Started by Ranran, March 24, 2024, 10:04:09 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Ranran

I have made further updates to the line operation status monitor.

The current waiting number at the station shows the number of all cargo waiting for the line.
But in the update, it will be changed to distinguish between waiting directions.



Please check the following image to see what it means.

Current version:


Apply update:



Line schedules may pass through several of the same stations.
In the example above, 2 and 6, and 3 and 5 are the same station.
This means that there are routes going in different directions from that station, and cargo will only be loaded if it goes in the appropriate direction.
Previous representations have been incomplete in this respect.
This patch makes it clear that the proceeding convoy will pick up cargo at the next station.

The image above is of a non-mirrored schedule.
Note that a convoy traveling the reverse route on a non-mirrored schedule will pick up cargo that differs from this rule.
This is a complex problem and unfortunately I haven't come up with the best way to deal with it.



Next, in the case of a mirrored schedule, cargo has a direction in which it waits at stations other than the stations at both ends.
Therefore, the display will be changed like this.



For example, at stop 6, you can see that there are 4 Low passengers heading upwards, 9 Medium passengers, and 3 High passengers heading downwards.
At station number 9, you can only go up, so there is no such distinction.

It would be helpful if you could give us feedback on how this display works and whether the filters are working correctly in complex schedules.
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっており、都市機能および道路機能というゲーム土台部分を壊し、開発作業&コードメンテナンスの足かせになっている。それは最終的にプレイヤーの損失に他ならない。その原因は全て1人の日本人=ひめし@himeshi_hob(THleaderH)によるもの。周囲のアドバイスをガン無視して結局実装されてしまった。彼は問題を認識しつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき(´・ω・`)

jamespetts

Thank you very much for this, and apologies for not having had the chance to look into this sooner. I have found what appears to be an error with this, which is that we appear to get an infinite loop originating in GUI code in this saved game when selecting the line, "!# Strawerdale Crude" belonging to the company "BR Summerisle Region" in the lines dialogue with the "stops" tab open. I had previously clicked on a number of the same company's other lines with the "stops" tab open when this occurred. 

For reference, when I paused the process, I got the following stack trace: void display_fillbox_wh_clip_rgb() < void gui_colored_route_bar_t::draw() < void gui_container_t::draw() (line 262) < void gui_aligned_container_t::draw() (line 587) < void gui_container_t::draw() (line 262) and so on, repeating a number of times moving between lines 587 and 262.

I should be grateful if you could look into this before I merge this. Thank you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

Quote from: jamespetts on April 07, 2024, 07:46:38 PMFor reference, when I paused the process, I got the following stack trace: void display_fillbox_wh_clip_rgb() < void gui_colored_route_bar_t::draw() < void gui_container_t::draw() (line 262) < void gui_aligned_container_t::draw() (line 587) < void gui_container_t::draw() (line 262) and so on, repeating a number of times moving between lines 587 and 262.
Thank you for the testing.
The bb server saves could not be opened in the debug build, but I think I fixed the cause of the problem based on the information given.
It would be helpful if you could test it again.
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっており、都市機能および道路機能というゲーム土台部分を壊し、開発作業&コードメンテナンスの足かせになっている。それは最終的にプレイヤーの損失に他ならない。その原因は全て1人の日本人=ひめし@himeshi_hob(THleaderH)によるもの。周囲のアドバイスをガン無視して結局実装されてしまった。彼は問題を認識しつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき(´・ω・`)

jamespetts

Quote from: Ranran(retired) on April 08, 2024, 11:34:21 AMThank you for the testing.
The bb server saves could not be opened in the debug build, but I think I fixed the cause of the problem based on the information given.
It would be helpful if you could test it again.

Thank you for this. Apologies for not having had a chance to look at this sooner: I have been very busy with house refurbishments over the past few weeks.

Unfortunately, the problem still seems to occur - but it is extremely difficult to reproduce predictably. I cannot reproduce it in the Pak128.Britain-Ex demo save, and can only reproduce it in the Bridgewater-Brunel save. I have tried many, many times and cannot find a single set of things that will cause this to occur. Rather, it will seemingly occur at random after clicking on several different lines (sometimes as few as 3, sometimes after tens or hundreds) with the stops tab open.

If you want to load the Bridgewater-Brunel saved game in debug mode, the best thing to do is use the optimised debug build mode in the Visual Studio project that should be in the Github repository.

Thank you again for your work on this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

I think you may have been testing the wrong branch. But it's possible that I caused confusion. Thread title PR#646 does not contain a fix.
Could you please test PR#651, which contains a commit of the fix?
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっており、都市機能および道路機能というゲーム土台部分を壊し、開発作業&コードメンテナンスの足かせになっている。それは最終的にプレイヤーの損失に他ならない。その原因は全て1人の日本人=ひめし@himeshi_hob(THleaderH)によるもの。周囲のアドバイスをガン無視して結局実装されてしまった。彼は問題を認識しつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき(´・ω・`)

jamespetts

Ahh, my apologies: I had not realised that the fix for this was on a different branch. I have now tested the new branch, but I now see an infinite loop arise in a different situation, and this can be reproduced with the Pak128.Britain-Ex demo.sve: an infinite loop now occurs when enlarging the line management window by dragging from the lower right hand corner.

Thank you again for your work on this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

Quote from: jamespetts on May 05, 2024, 12:55:58 PMI now see an infinite loop arise in a different situation, and this can be reproduced with the Pak128.Britain-Ex demo.sve: an infinite loop now occurs when enlarging the line management window by dragging from the lower right hand corner.
I can't reproduce this in my environment.
Could you please tell me the detailed steps?

Should I enlarge the dialog with the stops tab open? I haven't been able to reproduce the infinite loop that way.
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっており、都市機能および道路機能というゲーム土台部分を壊し、開発作業&コードメンテナンスの足かせになっている。それは最終的にプレイヤーの損失に他ならない。その原因は全て1人の日本人=ひめし@himeshi_hob(THleaderH)によるもの。周囲のアドバイスをガン無視して結局実装されてしまった。彼は問題を認識しつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき(´・ω・`)

jamespetts

Quote from: Ranran(retired) on May 05, 2024, 02:40:51 PMI can't reproduce this in my environment.
Could you please tell me the detailed steps?

Should I enlarge the dialog with the stops tab open? I haven't been able to reproduce the infinite loop that way.
Exact steps to reproduce are as follows.
  • Compile in Visual Studio with the "optimised debug" build
  • Start a new game in Pak128.Britain-Ex 0.9.4 with demo.sve
  • Close all dialogues (if any) that are open
  • Press the line management button on the main menu bar
  • Select "Air Line" from the list of lines
  • Select the "stops" tab on the right
  • Drag the window in the bottom right-hand corner to enlarge it, and keep dragging as far as you can
  • At this point, the game will freeze.

Alternative steps to reproduce (which might help to narrow this down)
  • Open demo.sve from Pak128.Britain-Ex in the latest nightly build from the Bridgewater-Brunel server
  • Open the line management dialogue
  • Select "Air Line" from the list of lines.
  • Drag the window in the bottom right-hand corner to enlarge it, and keep dragging as far as you can. You will see that the game does not freeze.
  • Close the game, which will automatically save it.
  • Compile in Visual Studio with the "optimised debug" build 
  • Load Pak128.Britain-Ex. The version of demo.sve with the line management dialogue enlarged will now be visible.
  • Select the "stops" tab. The game will now freeze as before.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

Thank you for the details. I think I fixed the infinite loop issue.
pak.256やpak.nipponのような複数タイル市内建築物があるpakセットはextendedではちゃんと遊べません。それどころかextendedの追い越し機能はバグまみれで修正が難しくなっており、都市機能および道路機能というゲーム土台部分を壊し、開発作業&コードメンテナンスの足かせになっている。それは最終的にプレイヤーの損失に他ならない。その原因は全て1人の日本人=ひめし@himeshi_hob(THleaderH)によるもの。周囲のアドバイスをガン無視して結局実装されてしまった。彼は問題を認識しつつ5年以上放置して今なおOTRPの開発を続けている。あまりにも身勝手で無責任。日本の人達はそういう事実にちゃんと目を向けるべき(´・ω・`)

jamespetts

Quote from: Ranran(retired) on May 05, 2024, 03:10:53 PMThank you for the details. I think I fixed the infinite loop issue.
Excellent, thank you for that. I have now tested and the fix works. I have now incorporated this into the master branch. Thank you very much for your work on this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.