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

User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

NekoMaster wrote:
Hamilton2007 wrote:I got a couple of crashes today playing the latest build that Petert posted yesterday. I upload one of the crash reports.
You should also upload the crash save or if possible a save before it crashed
Ok, done
Attachments
crash.sav
(358.72 KiB) Downloaded 105 times
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Hamilton2007 wrote:I got a couple of crashes today playing the latest build that Petert posted yesterday. I upload one of the crash reports.
Quoting the last thing that happened before the crash:

Code: Select all

Tick 8020: game loaded\par
     New game mode: 1 landscape: 0\par
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Cargo Distribution

Post by NekoMaster »

Ok I have a crash :( peterts most recet build :(
Attachments
crash.sav
(31.83 KiB) Downloaded 113 times
crash.txt
(9.84 KiB) Downloaded 116 times
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Debian binary, for r18152. Don't worry NekoMaster, I'll make you your win32 build.
Attachments
cargodist-linux_r18151_debian_lenny_i386.deb
(3.89 MiB) Downloaded 103 times
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Cargo Distribution

Post by NekoMaster »

petert wrote:Debian binary, for r18152. Don't worry NekoMaster, I'll make you your win32 build.
yeah, sorry that you have to keep building binaries :\
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Thanks for all the feedback.

The crash, at least for Auge (and probably for the report on page 42), is happening when that vehicle preview window pops up where you can select if you want to try a vehicle before it gets released. There is some arcane magic with StringIDs in that code and I don't quite see through that, yet. My current guess is that I have added some string in english.txt at the "wrong" place and now it's selecting a different string than originally planned for something in that preview window. Then it's using an uninitialized DParam for a cargo entry which may or may not be within the bounds of CargoSpec::array. If it's not, you get the assertion. An interesting fact is that in FormatString it sometimes checks the cargo ID for validity and sometimes it doesn't. For example in strings.cpp:619

Code: Select all

StringID cargo_str = CargoSpec::Get(GetInt32(&argv))->units_volume;
but in strings.cpp:754

Code: Select all

StringID cargo_str = (cargo == CT_INVALID) ? STR_QUANTITY_N_A : CargoSpec::Get(cargo)->quantifier;
So, I still don't fully understand what's up there, but I know more than yesterday ...
The guy on the picture is not me, it's Alonso.
Auge
Chief Executive
Chief Executive
Posts: 661
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Cargo Distribution

Post by Auge »

Hello
fonso wrote: The crash, at least for Auge (and probably for the report on page 42), is happening when that vehicle preview window pops up where you can select if you want to try a vehicle before it gets released. ...
That said, I've noticed in this window, that the operating costs (only in this window) are shown as 0.

Tschö, Auge
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

I guess Rubidium read about your problem and he has fixed it in r18176. Here is the diff for it. Also, for NekoMaster, here is a win32 binary. This binary will still have the crash, we have to wait until fonso syncs with at least r18176.
Attachments
string_fix.diff
(31.47 KiB) Downloaded 99 times
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

Today i got a crash with the r18053 Win32 build.
Attachments
crash.txt
(13.44 KiB) Downloaded 122 times
crash.sav
(430.66 KiB) Downloaded 105 times
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

petert wrote:I guess Rubidium read about your problem and he has fixed it in r18176. Here is the diff for it. Also, for NekoMaster, here is a win32 binary. This binary will still have the crash, we have to wait until fonso syncs with at least r18176.
Well, yes, he read about it from my comments on IRC ... when I found the crash's cause ;)

Now I'm just merging all the commits from trunk. There are some conflicts in the GUI code. It may take an hour.
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 »

Then I will wait to make the build, thanks fonso.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Cargo Distribution

Post by NekoMaster »

I hope to see a new build soon, for now im going to play a unpatched nightly on a network game with a friend
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Cargo Distribution

Post by bigos »

I see that Rubidium is changing all GUI so better to wait when he finish...
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

I get an error during make:

Code: Select all

make[1]: Leaving directory `/home/Peter/CargoDist/objs/lang'
make[1]: Entering directory `/home/Peter/CargoDist/objs/release'
[SRC] Compiling and Linking endian_check.exe
[SRC] Testing endianness for target
make[1]: *** No rule to make target `C:/msys/1.0/home/Peter/CargoDist/src/linkgraph/demands.cpp', needed by `Makefile.dep'.  Stop.
make[1]: Leaving directory `/home/Peter/CargoDist/objs/release'
make: *** [all] Error 2
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

I have merged the changes from trunk now. The bug Auge and Creat reported should be resolved now. I suspect at least some of the other crashed have been caused by the same bug, so please recheck with a newer version or apply the hotfix petert has posted. I have also commited a fix for the time reset problem Beday has posted. Components are merged now not only when they are due, but also when their join date is very far in the future. Like this the number of components shouldn't grow too much, even if you reset the time. I include a hotfix for that, too - in case you have a problem with link graph components from the future eating your RAM and you don't want to give up the game ...

Now, as the assertion has been found to not stem from corruption of game state, the question about Creat's desync arises again. So, how many of you have been playing network games lately and did you see any desyncs? With which versions?

petert: The demands.cpp file is in the patch as well as in git. Maybe you need reapply the patch on a clean trunk or check "git status" and "git log" as well as maybe "git diff origin/cargodist" to see what's wrong there.
Attachments
join_future.diff
(568 Bytes) Downloaded 143 times
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 »

Ok, here is the r18177 bundle for cargodist win32, happy gaming Neko, and other win32 users.
Attachments
cargodist_r18177_win32.rar
(3.62 MiB) Downloaded 146 times
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

I think there is a bug with the depots in the latest build Petert?
Attachments
depotbug.jpg
(259.42 KiB) Downloaded 1 time
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

Ok, when i make the depot window a little bit larger then the vieuw is normal..
Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Cargo Distribution

Post by Creat »

Hamilton2007: Even though I haven't checked I'm pretty sure this is due to Rubidiums GUI overhaul and not a Cargodist problem. Can you confirm that this happens only in Cargodist and not the corresponding nightly build?
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

I haven't seen any revisions that would cause this, but what do I know. Wait for Rubidium to give you a precise answer.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 27 guests