Page 5 of 12

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 27 Jan 2010 09:54
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):

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 27 Jan 2010 10:04
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 27 Jan 2010 12:08
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 27 Jan 2010 14:09
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 28 Jan 2010 13:57
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 28 Jan 2010 19:33
by peebee
Has anybody else problems with loading savegames? In 95% of all tests the game crashes during loading.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 28 Jan 2010 20:26
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 28 Jan 2010 20:50
by bokkie
Same here, will post them when I've got time :)

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 28 Jan 2010 21:37
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 28 Jan 2010 21:44
by petert
Do you have a crash.dmp, or crash.png? I'm not sure if those are generated during a save game crash.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 28 Jan 2010 23:35
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 :(

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 29 Jan 2010 01:52
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

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 29 Jan 2010 15:22
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 29 Jan 2010 17:33
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

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 02 Feb 2010 09:57
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 02 Feb 2010 10:10
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 02 Feb 2010 10:20
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!

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 02 Feb 2010 22:32
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 02 Feb 2010 22:48
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.

Re: [Patch] Daylength, Cargodist with sprinkles

Posted: 03 Feb 2010 00:23
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?