Cargo Distribution

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

takas
Engineer
Engineer
Posts: 11
Joined: 02 Jul 2006 11:42

Re: Cargo Distribution

Post by takas »

Now there is another problem:

It's about metro network again. There are thousands of pax wanting to go to the very own station via itself. They simply stay stuck in the station.
takas
Engineer
Engineer
Posts: 11
Joined: 02 Jul 2006 11:42

Re: Cargo Distribution

Post by takas »

The screenshot:

Image
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Cargo Distribution

Post by ChillCore »

Are those savegames from before cargodist or ones you created with a previous version of cargodist? Can you post the openttd.cfg where it doesn't happen?
Save games are the ones without cargodist.

Attached is my config file.
Mind it is a one fits_all_MY_builds config file.
I know there are some TTDP values.
They seem to work if you set graphics to original so i left them in.
(OpenTTD ignores values it does not recognises so ...)

ps:
I have some visitors at the moment so i will not be back for a few hours ...
Attachments
openttd.cfg
(41.42 KiB) Downloaded 99 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Hmm, changing the direction of all link stats had some interesting side effects, it seems ... in particular self-referencing links which are the reason for ChillCore's and takas' problems. I'm examining that.
The guy on the picture is not me, it's Alonso.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

New version:

- default values for moving average set to more sensible numbers
- problem with linkstats to self resolved

Please delete all savegames created with the last version (r16249). They will load but may still contain poisonous linkstats which may freeze the game (or do other funny things).
The guy on the picture is not me, it's Alonso.
Luckz
Engineer
Engineer
Posts: 20
Joined: 02 Aug 2006 03:48
Location: CGN / VLN

Re: Cargo Distribution

Post by Luckz »

fonso wrote:
Luckz wrote: (looking at stations which just got new destinations to send goods to is also a good way to cause crashes - especially if you click things that say "unknown station")
Can I get a savegame (plus version information) of that please?
A KGAT save game would not do you much good, mh?

takas wrote:I am not sure if it is a bug.
My metro network has originally stations A and B. Now a station C is added in between. All my trains stops at C now, but my pax at A refused to get on the train, and instead waiting for the train that goes directly to B, causing big jam at A.
So... they are 'forced' to stop at C due to the A/B goto commands not being non-stop, but C is not in the order list, yes? (And thus the game thinks the train won't stop at C and thus does not load A->C passengers)



Chillcore/somebody, can we have a 16284 exe?
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Cargo Distribution

Post by ChillCore »

Luckz wrote: Chillcore/somebody, can we have a 16284 exe?
Here it is.
Maybe you can figure out why the games exits from time to time without warning.

@fonso:
The smallmap gui needs some fixing too if you find some time.
On resizing there is this little panel that appears above the buttons where you select if you want to see vehicles or cargoflow or whatever.
This little panel does not fit very well ...
Clicking inside the void spaces does not crash the game.

I do not know if this is related to the exits witout warning.
They happen when i have some station gui open. sometimes i click something sometimes i don't.

EDIT:
Almost forgot.
My first testdrive with r16284 lasted 2 years+ without slowdowns.(clean config)
I still used the same savegame as before.
I will try some others ...

Attached win32 build and the patch for svn.
Attachments
cargodist_r16284_svn.patch
(173.82 KiB) Downloaded 97 times
cargodist_r16284.7z
(2.93 MiB) Downloaded 183 times
Last edited by ChillCore on 13 May 2009 18:15, edited 1 time in total.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
takas
Engineer
Engineer
Posts: 11
Joined: 02 Jul 2006 11:42

Re: Cargo Distribution

Post by takas »

Luckz wrote:
takas wrote:I am not sure if it is a bug.
My metro network has originally stations A and B. Now a station C is added in between. All my trains stops at C now, but my pax at A refused to get on the train, and instead waiting for the train that goes directly to B, causing big jam at A.
So... they are 'forced' to stop at C due to the A/B goto commands not being non-stop, but C is not in the order list, yes? (And thus the game thinks the train won't stop at C and thus does not load A->C passengers)
I have explicitly inserted the order to stop at C for all the trains, so all trains are forced to stop at C
Teeg
Engineer
Engineer
Posts: 55
Joined: 31 Jul 2007 23:57

Re: Cargo Distribution

Post by Teeg »

I feel like an idiot, but all my cargo is going to "unknown destination", and I think I'm doing something wrong. Is there a setting somewhere to enable the patch? (The map overlay and cargo destination window are working, but rather than directing cargo to destinations, all cargo is directed to "unknown destination".)
User avatar
tsjook
Traffic Manager
Traffic Manager
Posts: 197
Joined: 22 Apr 2009 18:33

Re: Cargo Distribution

Post by tsjook »

Teeg wrote:I feel like an idiot, but all my cargo is going to "unknown destination", and I think I'm doing something wrong.
Just be a little more patient. Cargo destinations need time to be calculated.
Teeg
Engineer
Engineer
Posts: 55
Joined: 31 Jul 2007 23:57

Re: Cargo Distribution

Post by Teeg »

tsjook wrote:
Teeg wrote:I feel like an idiot, but all my cargo is going to "unknown destination", and I think I'm doing something wrong.
Just be a little more patient. Cargo destinations need time to be calculated.
Setting up a standard four-stop city-centre bus loop and letting it run for several years still gives me "unknown destination" for all cargo.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Teeg wrote:I feel like an idiot, but all my cargo is going to "unknown destination", and I think I'm doing something wrong. Is there a setting somewhere to enable the patch? (The map overlay and cargo destination window are working, but rather than directing cargo to destinations, all cargo is directed to "unknown destination".)
Go to the advanced settings and set a demand algorithm for the cargos you want transported. For passengers this will likely be "symmetric". If that doesn't help, post a savegame.
ChillCore wrote: Maybe you can figure out why the games exits from time to time without warning.
...
I do not know if this is related to the exits witout warning.
They happen when i have some station gui open. sometimes i click something sometimes i don't.
I would still very much like to see some more detailed instructions on how to reproduce that.
ChillCore wrote: The smallmap gui needs some fixing too if you find some time.
Yes, I know. But it's not unusable and there are crash bugs to be found before fixing the eye candy.
Luckz wrote: A KGAT save game would not do you much good, mh?
If there is no other possibility I will even debug with that. But try to describe the steps to get the crash as precisely as possible, post the KGAT patch you are using (no newer version please) and tell me which version of trunk you applied the KGAT patch to.
takas wrote:My metro network has originally stations A and B. Now a station C is added in between. All my trains stops at C now, but my pax at A refused to get on the train, and instead waiting for the train that goes directly to B, causing big jam at A.
I still think your moving average length and unit are too high. I have set the default to 64 and 1 respectively now. This is a reasonable setting for normal games. It used to be 256 and 4. This means links time out about 16 times faster now than before (on new games, for old games you have to explicitly set the values). Please tell me your settings or post a savegame if I should examine that further.
The guy on the picture is not me, it's Alonso.
takas
Engineer
Engineer
Posts: 11
Joined: 02 Jul 2006 11:42

Re: Cargo Distribution

Post by takas »

fonso wrote:
Teeg wrote:I feel like an idiot, but all my cargo is going to "unknown destination", and I think I'm doing something wrong. Is there a setting somewhere to enable the patch? (The map overlay and cargo destination window are working, but rather than directing cargo to destinations, all cargo is directed to "unknown destination".)
Go to the advanced settings and set a demand algorithm for the cargos you want transported. For passengers this will likely be "symmetric". If that doesn't help, post a savegame.
I have the same problem now. And no, setting pax to "symmetric" didn't help.
Attachments
Campbell & Co., 1952-10-07.sav
(341.75 KiB) Downloaded 75 times
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Cargo Distribution

Post by ChillCore »

ChillCore wrote: Maybe you can figure out why the games exits from time to time without warning.
...
I do not know if this is related to the exits witout warning.
They happen when i have some station gui open. sometimes i click something sometimes i don't.
fonso wrote: I would still very much like to see some more detailed instructions on how to reproduce that.
Me too ...
There is no exact thing to do to make this happen it seems.
Untill now it seems i must have the smallmap open and one or more station gui.
Then mess about with the waiting/planned/sent button.
But the last time I tested and made the game exit I clicked a + to expand the source/destination/via dropdown. (inside the station gui.)
Sorry, but i still do not know what exactly triggers the behaviour.
It could very well be one nees to do nothing but wait for the right conditions to occur?
ChillCore wrote: The smallmap gui needs some fixing too if you find some time.
fonso wrote: Yes, I know. But it's not unusable and there are crash bugs to be found before fixing the eye candy.
I agree this is eycandy and the gui functions.
Thats why i mentioned "if you find some time".

@ Somebody:
Please, could someone compile with an updated compiler, or a compiler other than MinGW-MSYS? So I/we can test if it is related to my system or if the problem is in the code.
On the same note is anybody else experiencing these ¿ random ? exits to desktop ?
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

takas wrote: I have the same problem now. And no, setting pax to "symmetric" didn't help.
Another unforseen consequence of changing the direction of link stats. Update in first post or git. Thanks for reporting.
The guy on the picture is not me, it's Alonso.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2858
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Cargo Distribution

Post by ChillCore »

Hmm, i updated my MinGW install.
I know it worked because i had a few warnings on compiling before that I now no longer have. (aircraft_cmd.cpp <- not related to cargodist.)
However there are a few warnings that remain in linkgraph.cpp.
See attachment.

I still have those random exits from time to time when I mess with the station gui.
And i still do not know what triggers them.
Attachments
cargodist_compiler_warnings_r16305.txt
(5.23 KiB) Downloaded 90 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Luckz
Engineer
Engineer
Posts: 20
Joined: 02 Aug 2006 03:48
Location: CGN / VLN

Re: Cargo Distribution

Post by Luckz »

fonso wrote:
Luckz wrote: A KGAT save game would not do you much good, mh?
If there is no other possibility I will even debug with that. But try to describe the steps to get the crash as precisely as possible, post the KGAT patch you are using (no newer version please) and tell me which version of trunk you applied the KGAT patch to.
Well, http://www.tt-forums.net/download/file.php?id=110501 is the patch; I just used the Win32 build. Claims to be 16183.
Just frantically clicking around in the Station window (opening/closing the drop-down menu of passengers/destinations) seems to work well. I'm attaching a savegame of this. It requires the OpenTTDCoop NewGRF pack and the newest updates that can be downloaded for those GRFs ingame, though.

I had the same crashbug here using the build posted near the end of that thread. I just loaded it and the general Bremen area is very crash-prone. I just crashed it by building a new passenger station in Bremen and having its window open and waiting for a few moments - I presume as the first passengers appeared, it had no idea what to display them as and thus exploded.

I however think those might be the things you fixed in recent builds. I have not had the time to test those though.
Attachments
Lüki Transport, 1908-05-17.sav
KGAT save
(1.5 MiB) Downloaded 82 times
autosave7.sav
other build savegame
(1.82 MiB) Downloaded 90 times
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Luckz wrote: Well, http://www.tt-forums.net/download/file.php?id=110501 is the patch; I just used the Win32 build. Claims to be 16183.
Just frantically clicking around in the Station window (opening/closing the drop-down menu of passengers/destinations) seems to work well. I'm attaching a savegame of this. It requires the OpenTTDCoop NewGRF pack and the newest updates that can be downloaded for those GRFs ingame, though.
Well, we've had so many crash reports for the station GUI on Windows by now ... I think I'll have to dig out that Windows VM once more.
Luckz wrote: I had the same crashbug here using the build posted near the end of that thread. I just loaded it and the general Bremen area is very crash-prone. I just crashed it by building a new passenger station in Bremen and having its window open and waiting for a few moments - I presume as the first passengers appeared, it had no idea what to display them as and thus exploded.

I however think those might be the things you fixed in recent builds. I have not had the time to test those though.
This one is definitely fixed by now. It used to happen if you changed the next order of a loading vehicle. When the vehicle left it would try to unfreeze a link it hadn't frozen when when arriving at the station.
The guy on the picture is not me, it's Alonso.
Gathers
Engineer
Engineer
Posts: 44
Joined: 25 Nov 2007 13:26

Re: Cargo Distribution

Post by Gathers »

Hi, I think I've just found an easy to reproduce bug.

Just build a bus, a bus station and send the bus there with a order to load fully.
Then, while the bus is loading, select the last row of it's order list and his 'delete'.
For me, on your latest git, it generates something like this:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fe493dc1700 (LWP 18003)]
0x00000000005cd079 in OrderList::GetOrderAt (this=0x0, index=0)
    at /home/gathers/Games/openttd-cargodist/openttd/src/order_cmd.cpp:218
218		Order *order = this->first;
(gdb) bt
#0  0x00000000005cd079 in OrderList::GetOrderAt (this=0x0, index=0)
    at /home/gathers/Games/openttd-cargodist/openttd/src/order_cmd.cpp:218
#1  0x00000000005cf53f in OrderList::GetNextStoppingStation (this=0x0, 
    curr_id=0 '\0')
    at /home/gathers/Games/openttd-cargodist/openttd/src/order_cmd.cpp:234
#2  0x00000000004fab58 in LoadUnloadVehicle (v=0x7fe4840ef1d0, 
    reserved=@0x7fff9bdf4ac0)
    at /home/gathers/Games/openttd-cargodist/openttd/src/economy.cpp:1599
#3  0x00000000004fb79f in LoadUnloadStation (st=0x7fe4841234a0)
    at /home/gathers/Games/openttd-cargodist/openttd/src/economy.cpp:1829
#4  0x00000000006c56ed in CallVehicleTicks ()
    at /home/gathers/Games/openttd-cargodist/openttd/src/vehicle.cpp:603
#5  0x00000000005ca770 in StateGameLoop ()
    at /home/gathers/Games/openttd-cargodist/openttd/src/openttd.cpp:1117
#6  0x00000000005cbb93 in GameLoop ()
    at /home/gathers/Games/openttd-cargodist/openttd/src/openttd.cpp:1201
#7  0x00000000006d153d in VideoDriver_SDL::MainLoop (this=0x2720de0)
    at /home/gathers/Games/openttd-cargodist/openttd/src/video/sdl_v.cpp:498
#8  0x00000000005cc94d in ttd_main (argc=2, argv=0x7fff9bdf51d8)
    at /home/gathers/Games/openttd-cargodist/openttd/src/openttd.cpp:697
#9  0x00000000006b2102 in main (argc=2, argv=0x7fff9bdf51d8)
    at /home/gathers/Games/openttd-cargodist/openttd/src/unix.cpp:251
(gdb) 
I also saw something similar at order_base.h:319 GetFirstOrder()

Hope this is of some help.
Cheers and thanks for your great work!
pshemko
Engineer
Engineer
Posts: 104
Joined: 24 Sep 2004 02:43
Location: Aotearoa (New Zealand)

Re: Cargo Distribution

Post by pshemko »

I've noticed something weird going on with my passenger numbers. In the attched savegame there are some 66 passengers waiting in Port Pronnley. It's a terminus, so the train that's pulling in should take all of them. Yet, it empties the station, but shows only 45 passengers on board. What happened to the rest of them?


Grfs: eGRVTS v1.0, Canadian stations set 0.3d and Canadian trainset 0.3d.
Attachments
before-load-1.sav
Savegame
(818.49 KiB) Downloaded 89 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests