[Patch] Daylength, Cargodist with sprinkles

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

Post Reply
_Robbie_
Engineer
Engineer
Posts: 49
Joined: 23 Feb 2008 09:52
Location: Norway

Re: [Patch] Daylength, Cargodist with sprinkles

Post by _Robbie_ »

Yes, I got exactly the same assert about capacity of an edge being <= 0 or edge distance being => uint_max, but it was not in the title screen, just a normal game. I haven't any savegames to provide and I didn't try too much to reproduce it, that's why I didn't say anything about it. It happened when I had a small rail network and I built a "leg" to few another towns. One of the stations was placed right between two cities. It didn't even accept passengers AFAIR, so I had to feed it with busses (or rather horses, since it was still 19th century). About right after the first of my "busses" finished his first or second trip around, I got the assert. Oh, the rail station wasn't used yet, there was no trains going to it.

I don't know if it helps at all, but here is the situation (Wrundton Woods is the first station in the list of orders):
Attachments
crash!
crash!
Robbie
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: [Patch] Daylength, Cargodist with sprinkles

Post by fonso »

So, I'm fairly sure there is a desync in this patch pack. Otherwise the assertion should be happening for everyone at roughly the same time.
The guy on the picture is not me, it's Alonso.
User avatar
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Re: [Patch] Daylength, Cargodist with sprinkles

Post by SpComb »

Psistorm wrote:I found two errors, which may be unrelated to this build however:
- the sound seems to stop after a while, ive yet to determine the circumstances that cause this
- upon closing the game, it locks up, forcing me to shut it via the task manager
I assume this is the win32 build? Running on what version of windows, or perhaps wine?
fonso wrote:What bothers me a little is that it doesn't happen to me. That sounds like desync. Do you have a special title game there? Is there anyone who also gets the same problem? Or rather, is there anyone besides me who doesn't get it?
In the title savegame, it's the one of the mail links dropping down to zero. Since this only happens on the linkgraph calculation interval, and only when the moving average is short enough that the vehicle breaks down (?) and can't complete a trip within that time, it's depenent on the length of those settings. And the length of those settings is dependent on the daylength setting...

Hence, by default, it won't show up on the title screen unless you wait around long enough, and that "long enough" depends on your setting for linkgraph, moving average and daylength.

In any case, I can reproduce this with a vanilla cargodist build as well.
fonso wrote:So, I'm fairly sure there is a desync in this patch pack. Otherwise the assertion should be happening for everyone at roughly the same time.
Well, difficult to say... it would require more testing. It does seem a little indeterminate in that it can happen at different times, but at least with a quick localhost-server-client test, the assertion happens at exactly at the same time (within degree of measuring accuracy).

---

Here's an updated build against r18922 including the fixes for this assertion.

*** EDIT: *** Loading of savegames is broken, updated build: r18948.

Automated timetables and separation:
I've finally forced myself to use timetables, so this also includes the Jan 22 version of Automated timetables and separation.

Download: openttd-cargodist-minipack-r18922M-win32.zip (.pdb, .patch, .svn.patch).

The win32 .zip and git .patch are also attached.

Patches included:
  • cargodist
  • automated-timetables-and-separation
  • variable-daylength-01
  • variable-daylength-02-towngrowthfreq
  • variable-daylength-03-autofill-roundoff
  • town-cargo-factor-01
  • daily-autosave-00
  • vehicle-name-length
Crash reports / feedback:
As always, please report crashes from the build in this thread, and post the crash.* files that OpenTTD produces, along with any relevant information relating to the crash.

Comments or suggestions on the behaviour of the auto-separation patch should go into the Automated timetables and separation topic.


*** EDIT: *** Loading of savegames is broken, updated build: r18948.
Attachments
openttd-cargodist-minipack-r18922.patch
(343.12 KiB) Downloaded 170 times
Last edited by SpComb on 29 Jan 2010 17:38, edited 3 times in total.
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: [Patch] Daylength, Cargodist with sprinkles

Post by fonso »

SpComb wrote:In the title savegame, it's the one of the mail links dropping down to zero. Since this only happens on the linkgraph calculation interval, and only when the moving average is short enough that the vehicle breaks down (?) and can't complete a trip within that time, it's depenent on the length of those settings. And the length of those settings is dependent on the daylength setting...

Hence, by default, it won't show up on the title screen unless you wait around long enough, and that "long enough" depends on your setting for linkgraph, moving average and daylength.

In any case, I can reproduce this with a vanilla cargodist build as well.
Yes, you're probably right. I was too fast with my conclusion.
The guy on the picture is not me, it's Alonso.
User avatar
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Re: [Patch] Daylength, Cargodist with sprinkles

Post by SpComb »

Psistorm wrote:it runs fine, though I found two errors, which may be unrelated to this build however:
- the sound seems to stop after a while, ive yet to determine the circumstances that cause this
- upon closing the game, it locks up, forcing me to shut it via the task manager
Test this again with a post-r18934 build once it comes.
peebee
Engineer
Engineer
Posts: 31
Joined: 08 Feb 2008 13:02

Re: [Patch] Daylength, Cargodist with sprinkles

Post by peebee »

Has anybody else problems with loading savegames? In 95% of all tests the game crashes during loading.
User avatar
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Re: [Patch] Daylength, Cargodist with sprinkles

Post by SpComb »

peebee wrote:Has anybody else problems with loading savegames? In 95% of all tests the game crashes during loading.
Please provide the crash files, even when reporting something as trivial as this.
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: [Patch] Daylength, Cargodist with sprinkles

Post by bokkie »

Same here, will post them when I've got time :)
peebee
Engineer
Engineer
Posts: 31
Joined: 08 Feb 2008 13:02

Re: [Patch] Daylength, Cargodist with sprinkles

Post by peebee »

SpComb wrote:
peebee wrote:Has anybody else problems with loading savegames? In 95% of all tests the game crashes during loading.
Please provide the crash files, even when reporting something as trivial as this.
Here it ist.
Attachments
crash.txt
(9.63 KiB) Downloaded 177 times
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: [Patch] Daylength, Cargodist with sprinkles

Post by petert »

Do you have a crash.dmp, or crash.png? I'm not sure if those are generated during a save game crash.
User avatar
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Re: [Patch] Daylength, Cargodist with sprinkles

Post by SpComb »

peebee wrote:Here it ist.
Unfortunately with that kind of crash, the .log doesn't tell you very much (although apparently, this was a savegame from OpenTTD 0.6? And NewGRFs were added in?). I'll need the crash.dmp, and preferrably the .sav that you're loading as well.

If the forum doesn't let you attach those due to file extension restrictions, rename them to something else.

I haven't been able to reproduce any errors-loading-savegame myself... but unfortunately, I don't have very much material to test with either :(
Ampoliros
Engineer
Engineer
Posts: 1
Joined: 29 Jan 2010 00:38

Re: [Patch] Daylength, Cargodist with sprinkles

Post by Ampoliros »

I've been having the same crashes with loading saves. I've disabled my newgrfs and i'm just using an empty random generated map allowed to play for a couple days; I've attached the log, the dump log, and the save in question.

Let me know if you need anything else, and thanks for the patches
Attachments
crash.txt
(8.74 KiB) Downloaded 157 times
crash.dmp.txt
(1.56 MiB) Downloaded 183 times
Unnamed, 9th Jan 2040.sav
(291.03 KiB) Downloaded 163 times
User avatar
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Re: [Patch] Daylength, Cargodist with sprinkles

Post by SpComb »

Thanks for the .sav, I was able to reproduce it.

I've traced this down to a bug in the cargodist saveload code, it seems to corrupt GlobalCargoAcceptance by loading an UINT[32] array into a *pointer* to an UINT[32] array (32-64 bits...), which doesn't quite fit.

http://paste.openttd.org/221095

I'll wait for fonso to fix this.
User avatar
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Re: [Patch] Daylength, Cargodist with sprinkles

Post by SpComb »

Here's an updated build against r18948 including the fixes for the crash during savegame loading.

---

Outdated: See openttd-cargodist-minipack-r19152M


Download: openttd-cargodist-minipack-r18948M-win32.zip (.pdb, .patch, .svn.patch).

The win32 .zip and git .patch are also attached.

Patches included:
  • cargodist
  • automated-timetables-and-separation
  • variable-daylength-01
  • variable-daylength-02-towngrowthfreq
  • variable-daylength-03-autofill-roundoff
  • town-cargo-factor-01
  • daily-autosave-00
  • vehicle-name-length
Crash reports / feedback:
As always, please report crashes from the build in this thread, and please post the crash.* files that OpenTTD produces, along with any relevant information relating to the crash.

Comments or suggestions on the behaviour of the auto-separation patch should go into the Automated timetables and separation topic.


Outdated: See openttd-cargodist-minipack-r19152M
Attachments
openttd-cargodist-minipack-r18948.patch
(343.24 KiB) Downloaded 152 times
openttd-cargodist-minipack-r18948M-win32.zip
Outdated: See openttd-cargodist-minipack-r19152M
(3.94 MiB) Downloaded 218 times
Last edited by SpComb on 18 Feb 2010 03:19, edited 1 time in total.
User avatar
bluebottle
Engineer
Engineer
Posts: 29
Joined: 21 Sep 2009 03:23

Re: [Patch] Daylength, Cargodist with sprinkles

Post by bluebottle »

Obsolete: New build here.

First, thanks to SpComb, fonso and all the others who contributed to this patch. It's finally the TTD I always wanted (from 1995 onwards)! :D

This is a binary Linux build for Ubuntu 9.10 (Karmic Koala), based on the patch above (r18948).
  • GCC version: 4.4.1 (Ubuntu 4.4.1-4ubuntu9)
  • --enable-debug and --enable-profiling not used since they reduced performance to a slideshow even at the title screen.
  • Debug symbols are still in the binary, i.e. not stripped.
Download:openttd_cargodist_minipack_1_0_svn-r18948-no-debug-unstripped_i386_deb (16MB)
Note: This build hangs for me on a futex lock if I try to quit through the menu (either in-game or from the title screen), but quitting by using the window-manager decoration does work. If it hangs for you, kill it with

Code: Select all

killall -9 openttd
in a terminal.
Edit: Ignore that. Either run the game with "SDL_AUDIODRIVER=pulse" prepended on the command line, or install the libsdl1.2debian-pulseaudio package.

I built this by following the guide on the wiki for Debian-based systems. If I have done anything wrong like having to use --enable-profiling so that the bug reports are useful, please let me know.

And the obligatory:
Crash reports / feedback:
As always, please report crashes from the build in this thread, and please post the crash.* files that OpenTTD produces, along with any relevant information relating to the crash.

Comments or suggestions on the behaviour of the auto-separation patch should go into the Automated timetables and separation topic.
Last edited by bluebottle on 18 Mar 2010 09:10, edited 2 times in total.
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: [Patch] Daylength, Cargodist with sprinkles

Post by Rubidium »

bluebottle wrote:This build hangs for me on a futex lock if I try to quit through the menu (either in-game or from the title screen), but quitting by using the window-manager decoration does work.
Likely has something to do with SDL & PulseAudio, see known-bugs.txt for a solution.
User avatar
bluebottle
Engineer
Engineer
Posts: 29
Joined: 21 Sep 2009 03:23

Re: [Patch] Daylength, Cargodist with sprinkles

Post by bluebottle »

Rubidium wrote:Likely has something to do with SDL & PulseAudio, see known-bugs.txt for a solution.
Yes, that was it. :oops: Running it with

Code: Select all

SDL_AUDIODRIVER=pulse openttd
fixes the problem. Thanks!
nuNce
Engineer
Engineer
Posts: 1
Joined: 02 Feb 2010 22:30

Re: [Patch] Daylength, Cargodist with sprinkles

Post by nuNce »

Hello, after installing the patch I have a small issue with local authorities. Seems like building a road is enough for them to change their mind about my company. Also it takes forever to make the rating go up. Any clue? I'm playing on medium level, without AI and without breakdowns. I use the patch with daylegnth 4 and town growth -2.
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: [Patch] Daylength, Cargodist with sprinkles

Post by Eddi »

this patch should not touch the behaviour of town rating

town rating generally goes down if you destroy a field with a tree or any town-owned buildings/roads. it increases when you plant a tree to a tile that does not already have one, or when a vehicle arrives at a station.

there are basically two ways to handle this: i tend to build a tram or bus network in the city before planning my train station, other people destroy all trees around the town [if your rating is already low, it can't decrease anymore] and rebuild them afterwards.
User avatar
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Re: [Patch] Daylength, Cargodist with sprinkles

Post by SpComb »

nuNce wrote:Hello, after installing the patch I have a small issue with local authorities. Seems like building a road is enough for them to change their mind about my company.
There shouldn't be any direct effect on how clearing a tile affects the LA rating, at least not that I can see.
nuNce wrote:Also it takes forever to make the rating go up. Any clue? I'm playing on medium level, without AI and without breakdowns.
This, however, is presumably true, since the gradual ratings-growth over time is done per-month - so this happens less often.
nuNce wrote:I use the patch with daylegnth 4 and town growth -2.
Town growth or town cargo, I assume you meant the later?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Semrush [Bot] and 18 guests