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

Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Cargo Distribution

Post by Creat »

The problem is that VisualStudio doesn't work from the Git Bash even if you do :)
So it calls the script mentioned by jub above, but the script can't execute git (since it's a normal command prompt and not the git bash).
In order to tell it where to look for git there is an environment variable called PATH, which contains a list of paths (hence the name ;) ) in which to look for executable files. You need to add [git-install-dir]\bin to that list (usually the path is C:\Program Files\Git\bin). To do that you need to open system properties dialog. How to do that depends on your windows version, usually you just need to right-click "My Computer" and select properties, on vista/win7 you need to click on 'Advanced system settings' (or similar) in the window that opens. There find the Tab called 'Advanced' which has a button called 'Environment Variables' at the bottom. Clicking it opens the dialog you need, find the PATH entry in the lower list (under 'Systems Variables'), click Edit and append the path mentioned above (or whatever it is called on your system), separating from previous entries with a semi-colon (also don't use quotes even if the path contains spaces). Click OK on all dialogs, if VS is open close it and restart it (otherwise it won't be informed of the changed variables) and recompile, now your version number should come out correctly. After the g it should now display the same sequence that you also see in the double-brackets when you're in a git bash in the Cargodist folder.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

I'm not using MSVC, I'm using MSYS. Could you tell me how to add the PATH variable to MSYS?
jub
Engineer
Engineer
Posts: 67
Joined: 17 Jul 2003 13:46
Location: Sudice, Czech Republic
Contact:

Re: Cargo Distribution

Post by jub »

MSYS shell takes variables from system. If you want add a variable only to MSYS, add 'export VARIABLE=VALUE' to '../etc/profile'.
Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Cargo Distribution

Post by Creat »

or to put it simpler, the way I've described above still works just as well :)
nuffsed
Engineer
Engineer
Posts: 6
Joined: 13 Dec 2009 15:05

Re: Cargo Distribution

Post by nuffsed »

I always get a crash in this game so here is the attached crash files.
I'm using the last version from git as of writing.
Attachments
crash.zip
(480.06 KiB) Downloaded 59 times
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Cargo Distribution

Post by Rubidium »

nuffsed wrote:I'm using the last version from git as of writing.
It's an already fixed trunk bug.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

tsjook wrote:My 18412M just crashed.

And Windows pre-catched the error. No crash dump, save or log. :x Since that was apparent right from the start I have made my own screenshots and I have included the latest autosave. (No recent normal save available, played few hours without saving :roll:)
The problem occurs when it tries do draw a string with a vehicle name in it. Unfortunately the vehicle has already been deleted at this point, thus the crash. The screenshot indicates you were doing something interesting with that train 45. Can you remember what that was? Can you reproduce the crash by reloading the autosave? What OS are you running?
The guy on the picture is not me, it's Alonso.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

tsjook wrote: And Windows pre-catched the error
Looks like he's running Windows.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Cargo Distribution

Post by Terkhen »

New MSVC release cargodist build, using the patch against r18495. If you experience a crash, upload your crash.log and crash.dmp to this thread. These files can be found whenever openttd.cfg is; in Windows Vista / 7 the standard folder is (User folder)\Documents\OpenTTD. Explaining what you were doing before the crash and uploading your latest savegame will also help fonso but these two files are vital. Remember that the PDB file is only for debugging purposes: you don't need it to test cargodist.
Attachments
cargodist_PDB_win32_r18495.rar
(3.03 MiB) Downloaded 55 times
User avatar
tsjook
Traffic Manager
Traffic Manager
Posts: 197
Joined: 22 Apr 2009 18:33

Re: Cargo Distribution

Post by tsjook »

fonso wrote:
tsjook wrote:My 18412M just crashed.

And Windows pre-catched the error. No crash dump, save or log. :x Since that was apparent right from the start I have made my own screenshots and I have included the latest autosave. (No recent normal save available, played few hours without saving :roll:)
The problem occurs when it tries do draw a string with a vehicle name in it. Unfortunately the vehicle has already been deleted at this point, thus the crash. The screenshot indicates you were doing something interesting with that train 45. Can you remember what that was? Can you reproduce the crash by reloading the autosave? What OS are you running?
I use Windows XP, with all the latest security patches etc.

What I was doing to that train is probably the following: I changed the destination for a waiting (loading) train from one station to another (because of acceptance reasons). When I tried to close the orders window OpenTTD crashed. Unfortunately I haven't been able to reproduce the bug.


And I just found another bug, and this time it IS reproducable. Just load the game and it happens in a few moments. It seems to be due to a truck, which has been waiting very long, starting to move through other vehicles in the waiting line. You can see it starting to move and at that moment, OpenTTD crashes.

From now on I'll use the new build posted above so never mind if this bug is a fixed trunk bug.

EDIT: Indeed: Never Mind! Will keep the files attached, maybe it is of any use to the devs. :?:
Attachments
error 18412M-14-12-2009.rar
(475.19 KiB) Downloaded 63 times
User avatar
bulb
Engineer
Engineer
Posts: 68
Joined: 21 Jan 2007 13:15
Location: Europe/Prague

Re: Cargo Distribution

Post by bulb »

To the number of passengers issue, there is a, somewhat outdated and based on different branch, patch in [Patch] Improved Timetable Management [V2.31tr SVN15778] thread. It would be nice to pick it up and integrate in cargodist (it does not do anything until enabled, after all).

I'll try to port it over (as one can expect, nothing applies out of the box) and post it if I get somewhere.
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: Cargo Distribution

Post by bokkie »

You might take a look at http://www.tt-forums.net/viewtopic.php?p=824715#p824715 . I haven't tested it though. If something is possible in NewGRF, please do it that way because NewGRF's will keep working in a few years where patches often don't because they're not updated or included in trunk.
If you have spare time and know how to code, please try to update the auto-seperate part of ITIM (headway stuff) to latest cargodist. Many people, including me, will enjoy that I believe. The other things in ITIM are nice as well but IMO less needed. Maybe Magicbuzz's original patch is easier to update because of it's narrower focus.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

bulb wrote:To the number of passengers issue, there is a, somewhat outdated and based on different branch, patch in [Patch] Improved Timetable Management [V2.31tr SVN15778] thread.
What does Imporved Timetable Management have to do with lowering the number of passengers?


----------------------------------------------------------------------------------------------------------------

Edit: This is my 100th post on the CargoDist topic, and my 400th post in the OpenTTD Development section!
Last edited by petert on 14 Dec 2009 22:46, edited 2 times in total.
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: Cargo Distribution

Post by bokkie »

Look at the bottom of the first post of that thread :)
User avatar
bulb
Engineer
Engineer
Posts: 68
Joined: 21 Jan 2007 13:15
Location: Europe/Prague

Re: Cargo Distribution

Post by bulb »

bokkie wrote:You might take a look at http://www.tt-forums.net/viewtopic.php?p=824715#p824715 . I haven't tested it though. If something is possible in NewGRF, please do it that way because NewGRF's will keep working in a few years where patches often don't because they're not updated or included in trunk.
If you have spare time and know how to code, please try to update the auto-seperate part of ITIM (headway stuff) to latest cargodist. Many people, including me, will enjoy that I believe. The other things in ITIM are nice as well but IMO less needed. Maybe Magicbuzz's original patch is easier to update because of it's narrower focus.
ITIM is a beast. But there is another patch for timetable separation, that does just that and applies to cargodist just fine. Here is the thread: Timetable based separation patch and attached is the patch against recent cargodist. I applied it some time ago and than just kept rebasing it on top of newer cargodist, so there may happen to be newer version in the thread with some bugs fixed.

I should add, that I downloaded a version based on trunk revision r17097 from somewhere in the middle of that thread and the first post does not even have that, so I don't consider the existence of newer bugfixes that much likely.
Attachments
0001-Applied-timetable-separation-patch-by-id10terror-fro.patch
Timetable separation patch posted on forums by id10terror, rebased on recent cargodist, in git format.
(14.03 KiB) Downloaded 71 times
User avatar
tsjook
Traffic Manager
Traffic Manager
Posts: 197
Joined: 22 Apr 2009 18:33

Re: Cargo Distribution

Post by tsjook »

Bulb, you're quite a hero! :bow:

But it would be better if it was applied against a somewhat newer trunk version.
Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Cargo Distribution

Post by Creat »

Thank you so much for that, will test as soon as I have a minute :)
Psistorm
Traffic Manager
Traffic Manager
Posts: 173
Joined: 05 Jun 2004 12:22

Re: Cargo Distribution

Post by Psistorm »

ooo wonderful :D - maybe this patch sees a little further development, I think this really is a small contribution which would have a BIG impact on gameplay, especially with cargodist :)
User avatar
tsjook
Traffic Manager
Traffic Manager
Posts: 197
Joined: 22 Apr 2009 18:33

Re: Cargo Distribution

Post by tsjook »

--- edit: this bug report has moved to flyspray as it's also in latest trunk --
Attachments
Crash-18495-Terkhen build-Scenario editor assertion.PNG
Crash-18495-Terkhen build-Scenario editor assertion.PNG (9.29 KiB) Viewed 2009 times
Crash-18495-Terkhen build-Scenario editor.rar
(658.61 KiB) Downloaded 65 times
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests