News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

bridgewater-brunel.me.uk - Simutrans-Experimental - Pak128.Britain-Ex 0.9.1

Started by jamespetts, January 26, 2014, 01:35:08 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

jamespetts

The saved game that I downloaded from the server at the end of September appears to be corrupted. The error occurs in loading the tiles. Loading of tiles comes shortly after loading towns, as is seen in this segment of code:


DBG_DEBUG("karte_t::laden", "init %i cities", settings.get_anzahl_staedte());
   stadt.clear();
   stadt.resize(settings.get_anzahl_staedte());
   for (int i = 0; i < settings.get_anzahl_staedte(); ++i) {
      stadt_t *s = new stadt_t(this, file);
      stadt.append( s, s->get_einwohner());
   }

   DBG_MESSAGE("karte_t::laden()","loading blocks");
   old_blockmanager_t::rdwr(this, file);

   DBG_MESSAGE("karte_t::laden()","loading tiles");
   for (int y = 0; y < get_size().y; y++) {
      for (int x = 0; x < get_size().x; x++) {
         plan[x+y*cached_grid_size.x].rdwr(this, file, koord(x,y) );
      }
      if(file->is_eof()) {
         dbg->fatal("karte_t::laden()","Savegame file mangled (too short)!");
      }
      ls.set_progress( y/2 );
   }


Edit: The same result obtains in the 32-bit version.

Edit 2: It seems that it is a month thing rather than a season thing after all, as it crashed on the October/November boundary, which does not involve a season change.

Edit 3: It seems that this issue is not confined to the command line server: a normal client with graphics running as a server will also fail in the same way, and will, interestingly, give dialogue box warnings about heap corruption just before crashing, too.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sarlock

QuoteEdit: It seems that it is a month thing rather than a season thing after all, as it crashed on the October/November boundary, which does not involve a season change.

So it seems.  At least we know we can advance it a month by jumping off the server just a moment before the month ends.

EDIT: I  jumped off at 6:23:50 in October and then rejoined.  The server didn't crash but when I rejoined it was now October 0:00... but everything that was done before the end of October was still there: new construction, new ships, ship positions and on the finances it still had all of October's revenue and profits listed as current month.  But new we get to enjoy the month of October all over again...
The fact that it won't crash when the clients drop off is an interesting point.  Quitting just before the month-end will not make the server recognize that I've lost connection yet, I assume, so it will still advance the clock and not pause until it detects that I am gone.
Current projects: Pak128 Trees, blender graphics

jamespetts

I think what happens is that it crashes shortly after the season change. If you manage to get it to run a load/save cycle after the season change but before it crashes, it does not crash.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

Can anyone explain why I have 7 passengers at 6724,1182 wanting to travel the entire width of the map, and yet if I link (in offline testing) the two islands' stagecoach networks with a ferry, nobody uses it??

jamespetts

That will be the distance ranges: some passengers wanting to travel long distances are willing to travel a very long time, whereas all passengers wanting to travel a shorter distance always have a lower journey time tolerance. This system will be abolished entirely in the next major release.

Edit: Returning to the bug issue: I have managed to set it up reliably to reproduce the bug without running a server/client arrangement: running the x64 debug build on the current 11.x branch with the saved game from just on the May/June border, loading the game and running it produces no crash; but loading it once again causes it reliably to crash at about 0:27 in June in line 317 of grund.h.

Interestingly, running this game with the 112.5-merge branch, I get a different crash in the same place, one relating to citycars, which seems to be similar to the occasional citycar crash that I had had before and had seemed random. It is not immediately clear whether the two are connected, but I do get rather a lot of heap corruption warnings running it on the 112.5-merge branch after a month boundary on any recent saved game from the server.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

Who is controlling the blue player "Siren/Atlach-Nacha". They seem to be raking in the profit, and I'm not entirely clear how...

Looking at the lines, they all have a "wait for 20% load" order on the supplier, which is lower than I'd expect. Is this somehow advantageous??
The lines are also in several instances quite short.
Many of the docks are also mostly one-tile in spite of the lines using ships that ask for 3-tile docks, so the infrastructure maintenance is low.

I would have thought short lines with mostly empty ships would lead to low profits... would be interested to understand what the trick is here!

Also, the lines use no waypoints at sea, which is odd given the trouble I've had without them.

asaphxiix

It's the long-haul milk lines which generate excessive profit, I'm not sure if this is realistic, or requires urgent balancing...

AP

But I have a couple of those too, and I'm not seeing "excessive profits". That's what puzzles me.

If anything, I'm having the opposite problems; long-haul lines mean you only intermittently receive income, you have many 'dry' months.

asaphxiix

yes, but if notice his milk line 43 had 960 units hauled last month, which made a spike of a profit of 143000.

There is also an anomaly with revnue, I've seen it in the previous game too, and now if you look at my line 47 you'll see a great spike of 8000 for a stage coach line some months ago, that shouldn't be... If it happens again I'll report it in a bug thread. So could be the case here with the milk, the profit does seem excessive even for a long haul milk line. Maybe it has to do with the detrimental stop near the coal mine on that line.

Sarlock

It's AEO... I run some of my lines down near 20% as well, depending on what I am hauling.  Milk is very profitable but so are other commodities as well.  The key is to have enough routes/lines so that you can even out the intermittent revenue you get from any single line.  My profits are becoming rather significant now too.  I should be over 100k per month within a year.
Current projects: Pak128 Trees, blender graphics

asaphxiix

still, it's strange that he would get 143000 from transporting 960 units in one month on any distance.

Sarlock

Not really, those long distance routes are very profitable, it just takes a long time to complete the journey.  I have several routes that will pay 50-100k per delivery of 450 units per arrival (milk, clothes), I'm just still 6+ months away from realizing those profits on a regular rotation (most long distance routes arrive every 2-3 months).  Some of these routes take an entire game year to complete their first journey, plus another 1-2 months to fill the first ship up to capacity.
Current projects: Pak128 Trees, blender graphics

ӔO

My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

asaphxiix

some new towns were built with a bridleway connecting them. However the latter cannot be upgraded by players - might I request they be upgraded?

AP

Quote from: asaphxiix on February 01, 2014, 01:08:03 AMyes, but if notice his milk line 43 had 960 units hauled last month, which made a spike of a profit of 143000.
I know you could stockpile the milk so move a lot all at once (on a big ship).

However, some of the cattle farms seem to be producing vastly more units than others, and more than they say they would. Mine are producing up to 2-300 units per month, the one on Blue's line 43 has been producing up to 580 units/month (according to the farm's graph, and contrary to what the farm's info page says). I know from the industry list there should be slight variety but nothing as high as 580 (highest is 426).

ӔO

I am not sure, but I think factories with frequent service receive upgrades more easily.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

asaphxiix

at any rate, I do think those cargo shipping revenues need balancing, don't you agree? or is it quite realistic?

ӔO

oh, yeah, definitely.

Even with one cargo hold, they are super profitable.
It's mainly because the sea is free to traverse.

---

The dogger seems to be a good ship to balance against for all early ships.

$0.62/km for 8 live fish ($0.37)
It's not super profitable, but does rake in $1000 or so for a round trip that costs roughly $450
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Quote from: ӔO on February 01, 2014, 12:24:00 PMI am not sure, but I think factories with frequent service receive upgrades more easily.

Can anyone confirm this - that productivity of an industry relates to number of convoys per month somehow? I would have thought that having a single ship waiting for 100% load, or a large warehouse at the adjacent cargo stop, would have been just as good.

jamespetts

I am not ignoring your balancing comments, incidentally, which are very useful, but I am concentrating on trying to fix the crash bug for the time being. I have now been able to reproduce this issue on a 32-bit local build using the May/June 1751 month boundary (when loaded twice). This enables me to run Dr. Memory, which produces the following output:


Dr. Memory version 1.6.1 build 2 built on Dec 14 2013 12:27:10
Dr. Memory results for pid 9832: "Simutrans-Experimental-debug.exe"
Application cmdline: "C:\Users\James\Documents\Development\Simutrans\simutrans-experimental-sources\simutrans\Simutrans-Experimental-debug.exe"
Recorded 99 suppression(s) from default C:\Program Files (x86)\Dr. Memory\bin\suppress-default.txt

Error #1: UNADDRESSABLE ACCESS: writing 0x098d0684-0x098d0688 4 byte(s)
# 0 stadtauto_t::set_list               [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\vehicle\simverkehr.h:178]
# 1 karte_t::new_month                  [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:3833]
# 2 karte_t::step                       [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:4144]
# 3 karte_t::interactive                [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:7327]
# 4 simu_main                           [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simmain.cc:1259]
# 5 sysmain                             [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simsys.cc:703]
# 6 WinMain                             [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simsys_w.cc:731]
Note: @0:02:18.237 in thread 11796
Note: refers to 8 bytes(s) beyond last valid byte in prior malloc
Note: prev lower malloc: 0x098d0638-0x098d067c here:
Note: # 0 replace_operator_new                               [d:\drmemory_package\common\alloc_replace.c:2421]
Note: # 1 grund_t::rdwr                                      [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\boden\grund.cc:264]
Note: # 2 boden_t::boden_t                                   [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\boden\boden.cc:23]
Note: # 3 planquadrat_t::rdwr                                [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simplan.cc:259]
Note: # 4 karte_t::load                                      [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:5715]
Note: # 5 karte_t::load                                      [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:5290]
Note: # 6 loadsave_frame_t::action                           [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\loadsave_frame.cc:77]
Note: # 7 savegame_frame_t::action_triggered                 [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\savegame_frame.cc:375]
Note: # 8 gui_action_creator_t::call_listeners               [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\components\gui_action_creator.h:36]
Note: # 9 gui_table_t::infowin_event                         [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\components\gui_table.cc:147]
Note: #10 gui_scrollpane_t::infowin_event                    [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\components\gui_scrollpane.cc:112]
Note: #11 gui_container_t::infowin_event                     [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\gui_container.cc:183]
Note: instruction: mov    %ecx -> 0x5c(%eax)


Edit: Running the game again without loading twice, the only useful Dr. Memory output is the below, which is also a crash. Other outputs suggest minor leaks present in code unchanged from Standard that have been present for a long time. There does not seem to be any output actually trapping a double free despite me having commented out the code for using freelist with citycars.


Error #1: UNADDRESSABLE ACCESS: writing 0x0ab96db4-0x0ab96db8 4 byte(s)
# 0 stadtauto_t::set_list               [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\vehicle\simverkehr.h:178]
# 1 karte_t::new_month                  [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:3833]
# 2 karte_t::step                       [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:4144]
# 3 karte_t::interactive                [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:7327]
# 4 simu_main                           [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simmain.cc:1259]
# 5 sysmain                             [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simsys.cc:703]
# 6 WinMain                             [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simsys_w.cc:731]
Note: @0:02:23.361 in thread 1876
Note: refers to 4 bytes(s) beyond last valid byte in prior malloc
Note: prev lower malloc: 0x0ab96da0-0x0ab96db0 here:
Note: # 0 replace_operator_new_array                             [d:\drmemory_package\common\alloc_replace.c:2450]
Note: # 1 minivec_tpl<gebaeude_t *>::resize                      [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\tpl\minivec_tpl.h:43]
Note: # 2 minivec_tpl<gebaeude_t *>::append                      [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\tpl\minivec_tpl.h:70]
Note: # 3 minivec_tpl<gebaeude_t *>::append_unique               [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\tpl\minivec_tpl.h:79]
Note: # 4 gebaeude_t::check_road_tiles                           [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\dings\gebaeude.cc:249]
Note: # 5 karte_t::load                                          [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:6132]
Note: # 6 karte_t::load                                          [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\simworld.cc:5290]
Note: # 7 loadsave_frame_t::action                               [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\loadsave_frame.cc:77]
Note: # 8 savegame_frame_t::action_triggered                     [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\savegame_frame.cc:375]
Note: # 9 gui_action_creator_t::call_listeners                   [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\components\gui_action_creator.h:36]
Note: #10 gui_table_t::infowin_event                             [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\components\gui_table.cc:147]
Note: #11 gui_scrollpane_t::infowin_event                        [c:\users\james\documents\development\simutrans\simutrans-experimental-sources\gui\components\gui_scrollpane.cc:112]
Note: instruction: mov    %ecx -> 0x5c(%eax)
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ӔO

My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Quote from: jamespetts on February 01, 2014, 01:04:42 PM
I am not ignoring your balancing comments, incidentally, which are very useful, but I am concentrating on trying to fix the crash bug for the time being.

Entirely reasonable, was assuming as much :) . Unfortunately it's well outside my expertise to help with.

jamespetts

Quote from: ӔO on February 01, 2014, 02:53:27 PM
could it possibly be linked to the larger map sizes?

It is conceivable, but that is very hard to test.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

Server is down?

Edit: back now. Might have been my internet...

Sarlock

Over 1,000 convoys and counting... many of which are long haul shipping routes.

Really enjoying this, even with the added maintenance of manually skipping the months ahead.  I'm done with major expansions now, I'll leave the rest for other players (as much as I am fighting the urge to continue to expand).  I should be generating more than enough profits for future projects.  I want to build a canal on the eastern island soon.

I am keeping a running list of bugs/issues that I will share after I research a few of them.


Current projects: Pak128 Trees, blender graphics

ӔO

I would save up.
Terra-forming, cutting through cities and laying down rail in 1827 costs an amazing amount of money.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Quote from: Sarlock on February 02, 2014, 02:27:16 AMI'm done with major expansions now, I'll leave the rest for other players.  I should be generating more than enough profits for future projects.

Same here. :) I may pick up a few short routes because the income peaks/troughs are still troubling me (it's because I'm not actually operating very many ships/lines: compare the companies' asset values).

I can't get my monthly income up to match Pacific Transport / Siren/Atlach-Nacha, in spite of trying (not enough lucrative industries left to connect), so I suspect those two will be ahead come 1840* by a substantial margin (compound interest etc).

Will be interested to see how the newer players build up their capital.

(*I'm assuming rail in 1827 is as unprofitable as before... until the faster locos arrive)

Sarlock

Current projects: Pak128 Trees, blender graphics

AP

Maybe... all those crates were sitting there undelivered, and I was running a piece goods ship over to the other island anyway, from the furniture factory next door ;)

Although it might have happened anyway as I had connected at least one other textile mill/ clothes shop into my 'piece-goods' route already. Most of my routes have many stops so industry cross-linking can sort itself out...

ӔO

Actually, AP, you definitely grow faster than I do.
My S/AN is 3rd place in growth.

Probably has something to do with infrastructure maintenance and your two-way milk routes.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Quote from: ӔO on February 02, 2014, 10:41:57 AM
Actually, AP, you definitely grow faster than I do.
My S/AN is 3rd place in growth.

Probably has something to do with infrastructure maintenance and your two-way milk routes.
That's changed since I fast-forwarded a local save last night then  ??? . Make sure you compare year on year not month on month - as I say, my income is very uneven due to having fewer ships, some months are very lean  :-[ .

Most of my routes were two way (esp. the bulk routes) from the beginning, it definitely helps, I was pleased with that, at least.

Sarlock

I've been supplying the wool to the textile mill and shipping out the clothing.  There are some weird bugs happening with freight, the textiles sat seized up for many months after a bunch of successful deliveries - I couldn't figure out what was going on and am trying different experiments to figure it out.  It's related to the in transit and storage limits, it creates really odd pulses of activity and long pauses which drives down your overall production to around 50%.

Now my boats are sitting idle as for some reason the game has decided that you should get 100% of the cargo and not my ships... which is weird and not overly sporting of you  ;)
Current projects: Pak128 Trees, blender graphics

asaphxiix


ӔO

My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

AP

Quote from: Sarlock on February 02, 2014, 10:47:46 AM
Now my boats are sitting idle as for some reason the game has decided that you should get 100% of the cargo and not my ships... which is weird and not overly sporting of you  ;)

That is odd. I expected it to pick up any surplus, not steal everything.  ??? Wonder why its done that?

Am running around today pretty busy, but will see if I can look at fixing it later tonight/tomorrow. Now I've built roads to the clothes shop I suppose I'll have to find another textile mill to pay for them instead.


Quote from: asaphxiix on February 02, 2014, 11:47:02 AM
you wait, my pax endeavor will outgrow you all! evil grin.

I tried in offline testing, but couldn't get passengers to make much of a profit.  :-[ I think it was because everything is so slow, so nobody travels far.  I hope you have more luck (am watching with interest!)