The International Simutrans Forum

Community => Game Servers => Topic started by: jamespetts on December 05, 2017, 09:03:46 PM

Title: [ENDED GAME] Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 05, 2017, 09:03:46 PM
[Archived post - this server has been re-started with a new saved game]


Please do not post bug reports in this thread - please post bug reports in their own thread (i.e., one thread per reported bug) in the Simutrans-Extended development forum. Thank you.
The Bridgewater-Brunel no. 1 server (port 13353 on the Bridgewater-Brunel (http://www.bridgewater-brunel.me.uk/) server) is now live and waiting for players. It is running the latest version of Simutrans-Extended (at the time of writing, 13.0) and Pak128.Britain-Ex (at the time of writing, 0.9.3). This game has been reset from the original (https://forum.simutrans.com/index.php?topic=17580.0) game to correct the bug relating to the distance between industries and consumers.

To join the game in case of a problem with the listing server, either type bridgewater-brunel.me.uk into the network game dialogue, or type net:bridgewater-brunel.me.uk into the load game dialogue.

Here is a screenshot of the map, which is 7736 x 3496 tiles (equating to 967 x 437km, or the size of Great Britain turned sideways):

(https://forum.simutrans.com/proxy.php?request=http%3A%2F%2Fbridgewater-brunel.me.uk%2Fscreenshots%2Fbb2-2017.png&hash=6402adb74058d766380baa89b30a0b1f)

Some other statistics follow.

Starting year: 1750
Towns: 757
Starting population: 1,433,237
Starting industries: 4,497

There is some interesting terrain, and plenty of scope for both land and sea based transportation. There are islands, mountain ranges, forests, rivers, valleys, lakes and large swathes of sea. This is a very large map - I believe the largest that has ever been played online on a public server, so I should be interested in whether players find the performance to be acceptable, or whether players would prefer to try a smaller map, perhaps one the size of England.

Some useful notes follow.
Enjoy the game - I shall very much look forward to seeing what sort of transport networks emerge.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 05, 2017, 09:11:58 PM
Great, will chime right in!
One question though: Would it be possible to set the "spacing shift devisor" to a value so the "shift" value resembles minutes or some other nice round number? for 6 hours and 24 minutes, the value would have to be 384 (6 x 60 minutes + 24 minutes) for the shift value to represent minutes.
It is much easier with spacing in this way...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on December 05, 2017, 09:29:37 PM
For some reason I cant join the server
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 05, 2017, 09:36:28 PM
Quote from: fam621 on December 05, 2017, 09:29:37 PM
For some reason I cant join the server

As explained before, if somebody else is in the process of joining, you will not be able to join until that person has finished joining. I expect that many people are in the process of joining at present.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 05, 2017, 10:14:52 PM
Now I got disconnected..
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 05, 2017, 10:17:38 PM
Quote from: Ves on December 05, 2017, 10:14:52 PM
Now I got disconnected..

The server crashed, which might be connected with me testing whether I can run two games simultaneously on the server at present.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 05, 2017, 10:20:51 PM
aha ok! have been trying to connect since but without success. Is it up and running again?
Incidentally, could you change the shifting value as described above? perhaps even make it the default for the pakset  ;D
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 05, 2017, 10:24:45 PM
Quote from: Ves on December 05, 2017, 10:20:51 PM
aha ok! have been trying to connect since but without success. Is it up and running again?
Incidentally, could you change the shifting value as described above? perhaps even make it the default for the pakset  ;D

I am not aware of any way of changing the simuconf.tab settings of an existing game when using the command line server (without loading the game in a graphical client, changing it there using the advanced settings dialogue, saving it and then transferring the file back to the server).

I am currently investigating why starting one instance seems to crash the other, so there may be some intermittency for a few minutes.

Edit: The issue seems to be that having one instance running causes the other instance to be sent a kill signal. I am not sure why this is at present.

Edit 2: I am not able to find a way of reliably running two servers at once, so I am aborting the attempt to do so for testing for the time being. I was hoping to be able to use the no. 2 game to profile the performance to find why loading is taking so long. I will post a separate thread about that presently. In the meantime, the no. 1 game should be resuming shortly. Sorry about the disruption.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: asaphxiix on December 06, 2017, 07:49:58 PM
At the moment I am unable to connect. The transfer proceeds very slowly, until it quits, saying 'too few bytes transferred'. This has happened several times now.

From seeing 0 connected players at this hour, I suspect that nobody else is able to connect, either.

I should note that I have seen this phenomenon occur on the Canterbury server as well, last night, but it resolved somehow.

Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 06, 2017, 10:11:15 PM
That is odd - trying now to connect, I was able to join without difficulty (other than the usual delay after loading), so I am not able to reproduce this. Given your experience on your own server, this appears to be an intermittent issue. If anyone can describe a means (preferably with accompanying saved game) by which this can be reproduced reliably, I should be grateful if that person could post a separate bug report thread containing those details.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 06, 2017, 11:02:54 PM
Check if you can ping the server reliably. Sounds as if the connection between you are the server is not 100% reliable.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 06, 2017, 11:05:33 PM
Quote from: DrSuperGood on December 06, 2017, 11:02:54 PM
Check if you can ping the server reliably. Sounds as if the connection between you are the server is not 100% reliable.

For reference, I get 0% packet loss pinging the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 06, 2017, 11:35:18 PM
QuoteFor reference, I get 0% packet loss pinging the server.
Any reliable connection should have as good as 0 packet loss. Hard to play games without it.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 06, 2017, 11:39:45 PM
Quote from: DrSuperGood on December 06, 2017, 11:35:18 PM
Any reliable connection should have as good as 0 packet loss. Hard to play games without it.

Indeed - any client with any packet loss to the server is likely to lose synchronisation and disconnect.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: asaphxiix on December 06, 2017, 11:55:01 PM
So no-one else had any problems connecting to either server this evening? Perhaps it is on my side indeed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 07, 2017, 12:20:00 AM
Quote from: asaphxiix on December 06, 2017, 11:55:01 PM
So no-one else had any problems connecting to either server this evening? Perhaps it is on my side indeed.

With so little data, it is difficult to draw any conclusions at present. I suggest that we all monitor any issues to see whether any pattern can be discerned and consider what to do in the light of that.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 07, 2017, 01:24:04 AM
Server just crashed with vector index out of bounds. Expected in range 0...5 but got 6. Possibly related to convoy replacement, as the change price button there seems buggy and recently I ordered some ships to be replaced however this is entirely speculation and not an actual bug report.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 07, 2017, 01:46:46 AM
I cannot reproduce this locally - if anyone is able to find a means of reliably reproducing this, I should be grateful for a bug report. Without that, it is not feasible for me to find and fix the issue. Thank you for bringing this to my attention, however.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 07, 2017, 02:04:10 AM
I will try to get the server into a self destructive state so you can test this. Unless save cycling fixes it.

EDIT:
Server will now crash showing this problem ~30 seconds after it resumes. Fully repeatable and even produces same index out of bounds error.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 07, 2017, 02:20:42 PM
Dr. Supergood - thank you for that report. I have now fixed this problem and am in the process of restarting the server with the latest update containing that fix. The server should be running reliably again in a minute or two. Players will need the new version (both code and pakset, since the pakset has changed since yesterday) to play.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 09, 2017, 06:51:16 PM
I think the game is much more stable now, until a certain point:

I have been online now for a while together with one other player. Suddently the game saves and what appears to be another player connecting to the game. After the very long time of pause, I get a disconnect. I dont know who connected or if the other guy stayed connected.

This same pattern happened yesterday. I was all alone on the server (I think I was), then someone connected and i dissynced. Then I tried to connect again, but only kept connection for a while until another desync. My theory is that whoever connected that made my disconnect, got disconnected when I connected again. And so on and so on....

For information, I run the nightly builds on a windows 10 machine.

edit:
Now same thing happened again. I got disconnected while another joined (or so I believe that another joined).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 09, 2017, 07:29:40 PM
You will need to use the logs to determine the cause of the disconnect. If it is due to command execution in past then that means something is wrong with my sync fix. If it is due to checksum mismatch after a save/load cycle then either it is saving on the wrong sync step (unlikely?) or it is a problem with Extended not being deterministic between machines.

I also got a similar disconnect from autosave but I wrote it off due to out of sync from trying to modify a convoy schedule while it was route searching, something that often (or used to) cause out of sync in Simutrans standard.

I remained connected with another player for over and hour earlier today, and survived multiple save/load cycles without being disconnected.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on December 09, 2017, 07:38:18 PM
Idk if its my internet of something to do with the server but, I cant connect to it for some reason.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: asaphxiix on December 09, 2017, 07:40:02 PM
Me neither. Are you getting 'not enough bytes transferred'?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on December 09, 2017, 07:41:13 PM
I am really not sure ATM. I am testing to see if it will show that you said.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 09, 2017, 07:45:47 PM
Desynced again in the same way as earlier.

Thos logs you talk about, where to find those?

edit:

Im back in, but now something happened which I havent seen before: The time stopped, but without it going into pause.

edit2:
Hmm.. closing the game and starting it again, the game became unresponsive when it had loaded the autosave, so maybe it has to be restarted manually now?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on December 09, 2017, 09:06:42 PM
Hi Ves It could be me who was online with you for a momment.
kaurna on the server.

I also got save games and app crashed for me.

Quote from: Ves on December 09, 2017, 06:51:16 PM
I think the game is much more stable now, until a certain point:

I have been online now for a while together with one other player. Suddently the game saves and what appears to be another player connecting to the game. After the very long time of pause, I get a disconnect. I dont know who connected or if the other guy stayed connected.

This same pattern happened yesterday. I was all alone on the server (I think I was), then someone connected and i dissynced. Then I tried to connect again, but only kept connection for a while until another desync. My theory is that whoever connected that made my disconnect, got disconnected when I connected again. And so on and so on....

For information, I run the nightly builds on a windows 10 machine.

edit:
Now same thing happened again. I got disconnected while another joined (or so I believe that another joined).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 10, 2017, 12:20:23 AM
Thank you all for your feedback and apologies for not having had a chance to look into this to-day: I am afraid that my time has been taken up with having a tea party. There was much tea and cake, but not so much work on Simutrans.

I suspect that all of these symptoms are caused by a crash on the server, the cause of which I will have to investigate when I have a moment. Apologies that you have been having trouble.

Edit: I discovered that the server had frozen in what appeared to be an infinite loop. I have now restarted it, and I can no longer reproduce any of these crashes. It currently appears to be working correctly. Can anyone identify what he/she was doing immediately before a crash in any case? I will need to be able to reproduce the conditions in which this occurred in order to narrow down the issue.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 10, 2017, 10:27:34 AM
I'm getting a mismatch on the game version. Did the new (v2) map get started or updated with a different game or pakset version than the original (v1) ?  Or is it using the nightly version(s)?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 10, 2017, 10:44:35 AM
QuoteOr is it using the nightly version(s)?
It uses nightly versions, so one has to DL about 350 MB per day to play on it.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 10, 2017, 10:49:11 AM
Quote from: DrSuperGood on December 10, 2017, 10:44:35 AM
It uses nightly versions, so one has to DL about 350 MB per day to play on it.
Thanks. The original post at the top of the thread should probably be updated to reflect that. I'll get downloading...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 10, 2017, 01:22:31 PM
Note that there are two types of mismatch: a mismatch of the executable and a mismatch of the pakset. If you only get a mismatch of the executable, you need only download the executable afresh, and not the entire pakset.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 10, 2017, 03:37:27 PM
Quote from: jamespetts on December 10, 2017, 01:22:31 PM
Note that there are two types of mismatch: a mismatch of the executable and a mismatch of the pakset. If you only get a mismatch of the executable, you need only download the executable afresh, and not the entire pakset.
How do I tell which type of mismatch I'm dealing with?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 10, 2017, 03:42:15 PM
If you are dealing with an executable mismatch, the server will not show in the play online browser window unless  you tick the "show mismatched" button. When you select the server in question, the number after "revision" will be in red.

If you are dealing with a pakset mismatch, when you select the server in the play online browser window, the name of the pakset will appear in red.

If both appear in red, then both pakset and executable are mismatched.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 10, 2017, 04:24:29 PM
So my game is now up to date.

The server won't let me connect, however; I've been trying for half an hour.
Quote from: jamespetts on December 05, 2017, 09:36:28 PM
As explained before, if somebody else is in the process of joining, you will not be able to join until that person has finished joining.

Whilst I can understand that it seems possible that two clients will try and join simultaneously, that situation shouldn't last for more than a few minutes at worst, surely?

The Experimental Server Listing says "currently 0 clients are connected"
The Play Online window shows the game name in blue but "server does not respond" if I click on it.

What is the problem?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on December 10, 2017, 04:56:05 PM
I also have that same problem.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 10, 2017, 04:58:03 PM
Update: I have managed to connect once after a further quarter hour of trying, but the game is paused, and has been that way for 15 25 minutes or so now. So I can't do anything... but it is definitely still connected to the online game, I have the little icon in the RH corner. I presume it can't desynch if the game is static... :o
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 10, 2017, 06:01:51 PM
The server appears to be offline atm.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 10, 2017, 09:41:11 PM
Apologies for the difficulties: the server seems to have crashed. I have restarted it running in an instance of a debugger; I should be grateful if people could attempt to join so that I can catch the error causing the crash in the debugger and set about fixing it. Thank you in advance.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 10, 2017, 10:21:49 PM
It was me who made it stop in this infinite loop I think.
I was buying a bunch of boats I believe, but I can't remember exactly what I did to make it stale. I believe I made them go out on the map already, but I don't recall.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 10, 2017, 10:41:41 PM
Having run this with a debugger, I am getting a strange error indicating memory corruption, so I am running it again with Valgrind to see what the origin of the problem is. I should again be grateful if people could attempt to connect to try to trigger the error.

Note: Because I am running this in Valgrind, I am afraid that the loading process will be much slower than normal. I am joining at present, so it may be several minutes before anyone else can join.

For reference, the backtrace was:



(gdb) backtrace
#0  __GI___libc_free (mem=0x800030300) at malloc.c:2951
#1  0x00000000004628a9 in strasse_t::~strasse_t() ()
#2  0x000000000046bb26 in objlist_t::~objlist_t() ()
#3  0x00000000004517e0 in boden_t::~boden_t() ()
#4  0x00000000006dcf17 in planquadrat_t::~planquadrat_t() ()
#5  0x0000000000718cc9 in karte_t::destroy() ()
#6  0x000000000072ce15 in karte_t::load(loadsave_t*) ()
#7  0x000000000073067e in karte_t::load(char const*) ()
#8  0x00000000005a385e in nwc_sync_t::do_command(karte_t*) ()
#9  0x0000000000725ae2 in karte_t::do_network_world_command(network_world_command_t*) ()
#10 0x000000000072618b in karte_t::process_network_commands(int*) ()
#11 0x000000000073d06f in karte_t::interactive(unsigned int) ()
#12 0x00000000006cd6c2 in simu_main(int, char**) ()
#13 0x00000000006e1807 in sysmain(int, char**) ()
#14 0x00007ffff6b45830 in __libc_start_main (main=0x40efb0 <main>, argc=21, argv=0x7fffffffe458, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7fffffffe448) at ../csu/libc-start.c:291
#15 0x000000000040f019 in _start ()


Edit: I have had to restart Valgrind because there were so many errors (mostly in code from Standard, particularly the image node reader) that Valgrind refused to display any further errors before the occasion of the crash arose, so I had to disable the error number limit, which required restarting Valgrind. I anticipate that it will be 15-20 minutes before it will be possible for anyone to join.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 11, 2017, 11:18:21 AM
From the testing undertaken last night, the problem appears to be some sort of heap corruption, although I am having problems reproducing this reliably enough to test properly: see here (https://forum.simutrans.com/index.php?topic=17652.msg168145#msg168145) for a more detailed discussion of the heap corruption issue.

I have pushed a speculative fix, consisting of reverting an earlier optimisation that affects the same type of object as that in which the heap corruption appears be occurring. It is speculative because I have not been able to reproduce the crash locally reliably enough for a properly controlled test. This is now being deployed to the server, so I should be grateful if anyone could try to connect to the server with the version of the executable downloaded from the server from about 30 minutes after the posting of this message to test whether the problem recurs or not.

Thank you in advance to any testers, and apologies for the difficulties.

Edit: Server now confirmed as restarted with the updated version.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 11, 2017, 07:29:12 PM
Apologies to players getting annoyed by error messages from my companies. I started lots of Stage Coaches without realising the roads cannot yet support them, and I'm now unable to get back into the game to fix. Will do so as soon as I can. Have reported the pakset issue.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 11, 2017, 07:45:57 PM
I didnt see any notifications about that, so no worries  :)

However, I have seen this pattern twice now:
- Being online, someone starts to connect, the game prepares etcetc.
- Then the long eternal wait for the pausing to become complete.
- After a very long wait, the game appears to save again, initiating another join process
- But when the view returns to the game and one is just about to start the eternal wait, it disconnects

I was online together with AP, and I believe AP was online with me at the same time when it happened the first time. Second time I believe I was alone.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: asaphxiix on December 11, 2017, 09:29:43 PM
Am I still the only one who is having intermittent 'not enough bytes transferred' when trying to join? It's a very strange bug indeed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 11, 2017, 10:09:24 PM
Quote from: Ves on December 11, 2017, 07:45:57 PM
I didnt see any notifications about that, so no worries  :)

However, I have seen this pattern twice now:
- Being online, someone starts to connect, the game prepares etcetc.
- Then the long eternal wait for the pausing to become complete.
- After a very long wait, the game appears to save again, initiating another join process
- But when the view returns to the game and one is just about to start the eternal wait, it disconnects

I was online together with AP, and I believe AP was online with me at the same time when it happened the first time. Second time I believe I was alone.
Yes I've seen this behaviour, including tonight.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 11, 2017, 11:33:18 PM
Please post the sort of disconnect.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 11, 2017, 11:34:44 PM
I asked before, how do you see what kind of disconnect it is? you talked about a logfile, where is this file?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 11, 2017, 11:46:12 PM
It should be printed on the server log. One can also see it with the clients by starting in logging mode and running the client in a terminal/console window where it gets printed to.

My offer still stands for anyone who wants to share my company.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 13, 2017, 08:09:19 AM
Hi James. I managed to break a river tile, please can I ask you to fix it?  The co-ordinates are in a signpost as you enter the game. I managed to upgrade wide river with narrow canal and now have a permanent constriction on the river traffic that shouldn't be there. THanks.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: asaphxiix on December 13, 2017, 09:39:08 AM
incidentally, I would very much like to understand how canals can be built...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 13, 2017, 01:05:40 PM
Quote from: asaphxiix on December 13, 2017, 09:39:08 AM
incidentally, I would very much like to understand how canals can be built...
There is a YouTube tutorial video on "inland navigations" (https://www.youtube.com/watch?v=Ot05M89YgPk).

One notable 'quirk' is that there are hard coded altitude restrictions on each type of canal. Rivers of equivalent width do not have the same restriction.

Edit: link added.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 13, 2017, 09:44:20 PM
Server appears to be down?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 13, 2017, 10:04:12 PM
I agree, it is down.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 14, 2017, 09:59:12 AM
My apologies: I have been very busy in the last few days: I will look into this when I have a chance.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 15, 2017, 12:45:08 AM
The server seems to have become stuck in an infinite loop. I do not currently know the cause of the problem, but I have now restarted it. My apologies for the difficulties.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: asaphxiix on December 16, 2017, 12:13:34 AM
Hello,

May I ask that the Board of Trade or Bay Transports remove or change to bridge the road on <1350,2562>?

Thank you
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 16, 2017, 07:44:05 PM
The map appears to be offline?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 16, 2017, 08:38:26 PM
Confirmed offline, investigating.

Edit: Server back up. The problem appeared to have been a corrupted saved game, probably caused by the server crashing while the game was saving. This sort of problem is very difficult to track down, especially as I have not been able to get the logs to work recently. Any insight into the possible causes of crashes of this sort would be much appreciated, even information about what happened when a server crash occurred would be worthwhile.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 17, 2017, 02:45:22 AM
Most of last nights progress was lost. If not even the day before... And it saved like a dozen times during then. Like 15 lines I set up were removed.

Here (https://www.dropbox.com/s/s66jvif6f310xoi/client2-network.sve?dl=0) (link may be removed in the future) is a save from the server yesterday, which is significantly more progressed than the current one.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: asaphxiix on December 17, 2017, 03:39:47 AM
Indeed much progress was lost. However I have already put much effort after this.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 17, 2017, 09:51:45 AM
Has there been a recent pakset change on the Bridgewater server?
I'm using the latest nightly exe and it's showing a mismatch (pakset name "Pak128.Britain-Ex-0.9.3" is in red).

Yet that's exactly the pakset I'm using (it's the same as Canterbury server uses).

Running "Find Mismatch" compares the pakset and gives the following result:
Pak(s) different: Stage coach (rigid)

Obviously we can keep multiple pakset versions for playing different games, but I imagine it will get mightily confusing if they are numbered exactly the same yet differ.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 17, 2017, 12:32:40 PM
My apologies for the lost progress - I had hoped that a restore from server13353-restore.sve would have been the most recent save, as the timestamp on that save was more recent than the backups: it had a timestamp of 0605h, whereas the rotated backups had a timestamp of 0602h yesterday morning. I am not entirely sure what server13353-restore.sve is for, but I shall note not to use it in preference to my normal rotated backups again.

Given that progress has been made since the reversion, I will leave this for now, but I will note that server13353-restore.sve is not a useful restore point unless there are no other alternatives.

As to the pakset, this has indeed been updated: the rigid stage coach now has a slightly higher top speed, so you will need to update to the latest pakset to avoid losing syhcnronisation with the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 17, 2017, 12:48:46 PM
Quote from: jamespetts on December 17, 2017, 12:32:40 PM
As to the pakset, this has indeed been updated: the rigid stage coach now has a slightly higher top speed, so you will need to update to the latest pakset to avoid losing syhcnronisation with the server.
If the pakset is changed, why is it still reporting 0.9.3?  Should it not now be 0.9.4 or 0.9.31 or something?  I'm just pondering how I can have two different versions of 0.9.3 at the same time. Should not versions be uniquely numbered? Otherwise how can the game offer me the choice between them when it starts?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 17, 2017, 01:11:37 PM
Quote from: AP on December 17, 2017, 12:48:46 PM
If the pakset is changed, why is it still reporting 0.9.3?  Should it not now be 0.9.4 or 0.9.31 or something?  I'm just pondering how I can have two different versions of 0.9.3 at the same time. Should not versions be uniquely numbered? Otherwise how can the game offer me the choice between them when it starts?

Versioning the pakset is not a straightforward endeavour. The executable is versioned in three separate ways: (1) by the Standard version number from which it is derived (currently 120.2.1); (2) by the Extended version number (currently 13.0); and (3) by the revision number (currently #704ca0f). The first of these changes whenever the Standard version number changes in the underlying code merged into Simutrans-Extended; the second changes whenever there is a significant new feature; and the third changes whenever there is any change to the code at all committed to Github.

The pakset, by contrast, only has the one version number, 0.9.3 currently. Importantly, this is a manually set version number, not an automated revision. This is treated in the same way as the second type of version number for the executable: in other words, it is changed whenever there is a significant feature change. This means that minor alterations (e.g. bug fixes) will not trigger a version number change.

It is done this way because it is impractical, in the context of a nightly release system, manually to increment the version number with every minor adjustment made. Instead, players will know whether or not the pakset needs updating by seeing whether there is a pakset mismatch when they try to connect to the server, and, if there is, downloading the new pakset.

I hope that this clarifies matters.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 17, 2017, 05:01:04 PM
I believe the Bridgewater server has just crashed, whilst I was starting ships from a shipyard. This was after a respectable amount of construction of lines and prior use of shipyards without incident.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 17, 2017, 05:04:41 PM
May I ask you to let me know which ships, which shipyard and which lines that they served?

Edit: I think that I have now found and fixed this error. The fix should be available in to-morrow's nightly build. I should be interested to see whether this error recurs after that.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 17, 2017, 09:28:30 PM
QuoteGiven that progress has been made since the reversion, I will leave this for now, but I will note that server13353-restore.sve is not a useful restore point unless there are no other alternatives.
Seeing how most of the progress that was lost by the reversion was mine this makes me quite angry... multiples hours of work thrown away.

Sigh ill get back to work catching up.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 17, 2017, 10:19:03 PM
Quote from: DrSuperGood on December 17, 2017, 09:28:30 PM
Seeing how most of the progress that was lost by the reversion was mine this makes me quite angry... multiples hours of work thrown away.

Sigh ill get back to work catching up.

I am very sorry - it is very difficult to know what to do in such a situation when I first discover the issue after further work has been done.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 18, 2017, 07:44:46 AM
Due to a bug with the current nightly, do not play on the server.

Cities currently produce no passengers at all. Since all the companies depend heavilly on passengers for their income this means that all companies are making huge losses at the moment. Playing is pointless until this is fixed and will harm all companies by burning away their money and potentially bankrupting them.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 18, 2017, 11:54:27 AM
The server has now been restarted with a fixed version. I will compile downloadable executables for the fixed version soon. Apologies for the difficulties.

Edit: The fixed versions are now available for download.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on December 18, 2017, 04:54:51 PM
Is this server paused or something because when I joined it was paused.
Title: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 18, 2017, 05:21:55 PM
It is paused for a veeeeeeeeeeery long time when someone is joining the game, and that is a bug which James is looking into. When you join, you can go away for a coup of coffee or something else during the up to 5 minutes long pause ?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on December 18, 2017, 05:43:35 PM
Ok
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 18, 2017, 05:44:12 PM
My line around the south West most lake has been lost in the crash for the second time,  will rebuild it again tonight.Third time lucky, right?  :D

Quote from: Ves on December 18, 2017, 05:21:55 PM
It is paused for a veeeeeeeeeeery long time when someone is joining the game, and that is a bug which James is looking into. When you join, you can go away for a coup of coffee or something else during the up to 5 minutes long pause ?

Or just load up the Canterbury server alongside and play that in the downtime!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 18, 2017, 07:52:35 PM
Just had an interesting couple of instances of getting kicked from the game, when being bombarded with "unable to find route" error messages from unhappy convoys. Is this known behaviour?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 18, 2017, 07:58:40 PM
Quote from: AP on December 18, 2017, 07:52:35 PM
Just had an interesting couple of instances of getting kicked from the game, when being bombarded with "unable to find route" error messages from unhappy convoys. Is this known behaviour?

Not to me - it would be helpful to have more details of this in a separate thread.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 18, 2017, 08:10:46 PM
I got kicked as well now and gets kicked almost instantly when joining.

There is a too low bridge spanning above the "Grand Union Canal" at (852,3211) and the ships need high clearance below the bridges.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 19, 2017, 11:05:40 PM
Wow, a heck of alot of my stage coaches has been sent to depot due to out of range and cannot find route! Has the pakset been updated with lower range for the horses?

James, if you do alter any info that will increase restriction of something, perhaps a note in here, so we can go and prepare ourself  :)


edit:
I get a desync almost immediatedly when the game unpauses after attempt to join, twice now..

edit2:
I have tried now three times, and I desync directly. Can others join the game?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 20, 2017, 12:19:28 AM
Yes, the pakset has been updated: the hackney horses now have a 20km range rather than 30km; I did announce this in the in-game chat.

The server problems appears to be connected to the heap corruption bug that I am currently looking into.

Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 20, 2017, 12:55:18 AM
Aha, ok I didnt see it in the chat, firstly due to me getting kicked out instantly and second for all the 200+ messages about the horses!
I did, however, get to modify some of the schedules to get them back to service.
Did you take the game down to offline?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 20, 2017, 12:56:49 AM
I have pushed a possible fix for the heap corruption issue, which will be included in the next nightly build. This issue is difficult to reproduce reliably, so I am not sure whether or not this is a fix, but tests on my local computer have been promising so far.

Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 20, 2017, 01:36:17 AM
QuoteI have tried now three times, and I desync directly. Can others join the game?
I got in fine. Possibly UI related as I only play as a company which did not get spammed by horse messages.

Edit: Actually it desynced me on connect as well, but only the first time.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on December 20, 2017, 01:41:05 AM
And I was in, getting thrown out  :P
I have been in there long enough for me to organize all my lines which where in trouble, so I can stay online. But not together with others apperently?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 20, 2017, 01:44:59 AM
The problem is the heap corruption error (https://forum.simutrans.com/index.php?topic=17652.msg168628#msg168628), which I have made some progress in diagnosing (I think that I have found the place in the code where this occurs, but not yet why or how it occurs), but it is very difficult at present to understand what is happening. Any help in that regard would be much appreciated.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 22, 2017, 06:52:07 PM
Can anyone tell me why my ships on the line "Inland Sea Ferry" are departing their stops mostly empty in spite of loads of passengers waiting?

I thought at first I had insufficient ships, so added more, but it is now evident that wasn't the problem.


I concur about announcements being better done in this thread, not just in the in-game chat, if that is possible please. I missed the thing about the horses as well.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 22, 2017, 07:12:18 PM
Quote from: AP on December 22, 2017, 06:52:07 PM
Can anyone tell me why my ships on the line "Inland Sea Ferry" are departing their stops mostly empty in spite of loads of passengers waiting?

Can the waiting passengers afford your ships, and are your ships the fastest way of them getting to their destination/next transfer?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 22, 2017, 07:35:04 PM
How would I tell if they couldn't afford the ships?

Would passengers be starting to travel,  be waiting at my stops, if they couldn't afford the journey? Or if my route wasn't the optimum for them?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 22, 2017, 09:36:44 PM
Quote from: AP on December 22, 2017, 07:35:04 PM
How would I tell if they couldn't afford the ships?

You can see the wealth of passengers by checking the "wealth" display from the drop down list of sort options on a stop. If that wealth is lower than the lowest class that you have set on your ships, they will not be able to board.

Quote
Would passengers be starting to travel,  be waiting at my stops, if they couldn't afford the journey? Or if my route wasn't the optimum for them?

Not if they could not afford any route to their destination from that point, but I do not know whether different ships have different prices set, or whether there are multiple different routes from that stop to the destination, some of which are more optimal than others.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 22, 2017, 09:40:56 PM
In my case,  no other routes are available from the stop. I'll have to check the wealth thing in game.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 22, 2017, 10:01:04 PM
Quote from: AP on December 22, 2017, 09:40:56 PM
In my case,  no other routes are available from the stop. I'll have to check the wealth thing in game.

If what you are seeing appears not to be correct, I should be grateful if you could post a full bug report in its own thread on the proper subform, uploading a copy of the game at the time when this occurs (as I will not be able to investigate logic bugs until January), as I only check the correct subforum when working on fixing bugs, and not other threads.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 25, 2017, 07:06:28 AM
Server seems to have crashed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 25, 2017, 02:16:56 PM
Quote from: DrSuperGood on December 25, 2017, 07:06:28 AM
Server seems to have crashed.

It is back now - I am not sure quite what went wrong other than it seems to have got stuck in a loop (circa 58% CPU usage).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on December 25, 2017, 02:25:13 PM
Good to hear because I am actually in the server now and also can you (James) come on so I can make a company please?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 25, 2017, 02:26:16 PM
Quote from: fam621 on December 25, 2017, 02:25:13 PM
Good to hear because I am actually in the server now and also can you (James) come on so I can make a company please?

I do not understand - why do I need to be onlne in order for you to play? Also, do you not already have a company?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on December 25, 2017, 03:44:38 PM
Merry Christmas everyone.  Hope to be back online in a few days' time.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on December 25, 2017, 03:44:56 PM
That company was orignally the observer also its fine now
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: asaphxiix on December 25, 2017, 10:51:37 PM
Hello,

Tonight, my password doesn't work for my company (Peninsular Transport). Any idea why? When I type in the password and press enter, the windowlet doesn't close and nothing happens. Is it possible for the password to be reset individually, somehow?

Thanks


EDIT: Since I also can't chat or start a new company, it is safe to assume that the server must be in some sort of read-only mode.


Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 02, 2018, 05:05:32 AM
Logging that the server is showing signs of extremely low performance, eg 1 frame every minute and 3 minutes to prepare game for transfer. This is ~5 AM UK time, the time this post was made.

Edit also server did not roll over to new nightly for some reason.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 02, 2018, 11:35:53 AM
Odd - the nightly build script seems not to have run, or at least run properly, as when I ran it manually now, it downloaded afresh some changes that I had made to the code yesterday evening. However, 5 AM is approximately the time of the nightly build being run, so I am not quite sure what happened.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on January 02, 2018, 03:47:54 PM
It looks like the server isn't up to date. I have started downloading the pakset sources for what I assume to be the previous nightly (5b3176b). Will the server be updated within the next hour?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 02, 2018, 04:05:10 PM
There was a problem last night (the cause or nature of which is not clear at present) that prevented the nightly scripts running. I ran them manually earlier, but there has been somebody playing on the server for a long time to-day, and I did not want to interrupt him to restart the server manually.

However, I do not think that you will desync if you force connect (go to the load game window, type net:bridgewater-brunel.me.uk and press return), as the changes made since yesterday should not affect the game running in the current era.

Edit: I have now restarted the server with the latest version.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on January 02, 2018, 04:31:28 PM
I get an instant desync. Should I try with clean configuration files?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 02, 2018, 04:50:30 PM
I am able to remain connected, and another player is also connected stably at present. Configuration files should not by themselves affect things, as the settings are stored with the saved game. However, do make sure that you are using the default pakset downloaded from the server, and not your own version.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on January 02, 2018, 04:57:27 PM
I have a full match.

EDIT: I managed to connect with clean config files.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 02, 2018, 10:42:24 PM
22:41 @ 02/01/2018 GMT and the server is only achieving 0.3 MB/sec upload.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 02, 2018, 11:00:56 PM
Quote from: DrSuperGood on January 02, 2018, 10:42:24 PM
22:41 @ 02/01/2018 GMT and the server is only achieving 0.3 MB/sec upload.

Thank you for the note. This is certainly not consistent with the issue relating to the upload speed specifically being the compiling of the nightly builds, although can you confirm that this is actually causing the precise same symptoms as you earlier reported (viz. the long lag between command and action)? I want to understand whether this is the same or a different issue.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 03, 2018, 01:15:50 AM
Quotealthough can you confirm that this is actually causing the precise same symptoms as you earlier reported (viz. the long lag between command and action)?
No I cannot as this was being observed from my automated update program downloading the latest nightly zip, which has achieved speeds up to 10 MB/sec doing the same operation in the past.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 03, 2018, 01:32:22 AM
Quote from: DrSuperGood on January 03, 2018, 01:15:50 AM
No I cannot as this was being observed from my automated update program downloading the latest nightly zip, which has achieved speeds up to 10 MB/sec doing the same operation in the past.

Ahh, I see, thank you for the clarification. This may or may not be a separate issue in that case. I do notice that my server statistics do record multiple occasions of the server using all of its bandwidth, so it may well be that your Java downloader might well help with this.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 11, 2018, 06:58:51 AM
QuoteAs the game develops, it will become more demanding on computational resources. Slower computers might not be able to keep up
My i7 920 cannot keep up with the server anymore unless zoomed in very close to the map, hence why I was reporting lag as I was falling further and further behind. It is basically reaching the stage I cannot play anymore. The game only uses ~20% of my processor but it must not be fast enough for the main thread.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 11, 2018, 11:14:40 AM
Is this something that has changed since the latest nightly build, or has this been accumulating for some time? Also, can you check your per core CPU usage?

Edit: Further, can I ask what your reported figure for frames per second is?

Edit 2: I have now committed some optimisations to the most CPU intensive part of the game, the passenger generation algorithm.

Edit 3: I have restarted the server with the optimisation; I had to revert one of the optimisations as it appeared to be causing thread deadlocks (there are some issues with "thread_local" - I may try to implement it without "thread_local").

The server is set to use a framerate of 30fps. With my i7 950 (overclocked), I can keep up when zoomed in, but not when zoomed out. When I zoom out, my framerate drops to ~28fps, and so the game drops behind. If I zoom all the way in, the game catches up by running at 40-50fps until it catches up to the server, and the lag disappears.

The graphics system is really very inefficient, but I do not have the expertise to optimise it; I know that an attempt to make it hardware accelerated failed a few years ago because doing it in a way that does not actually make the CPU use more effort would require a fundamental rewrite. I do not know how significant that features such as transparency and the animated sea are for these purposes.

A short-term solution might be simply to reduce the server's target framerate, but that does make everybody's game much less smooth and pleasant to play. I wonder whether increasing the server's setting for the number of sync steps per step might also assist?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 11, 2018, 07:44:36 PM
QuoteIs this something that has changed since the latest nightly build, or has this been accumulating for some time?
Made worse by recent nightly. Obviously because the server was running slow before as it was a debug build which you have now fixed. Before both it and I were slow so the difference was low. Now the difference builds up fast.
QuoteAlso, can you check your per core CPU usage?
Meaningless as modern OS load balancing means all cores are used equally. This is to evenly distribute heat across the surface of the chip so as to allow clock boost technology to operate efficiently. A bottlenecked/always running single thread will appear as using all 4 cores 25% each, and running on none of the hyperthreading cores.

QuoteEdit: Further, can I ask what your reported figure for frames per second is?
FPS varies from <20 when zoomed out to slightly >40 when zoomed really close in into the middle of nowhere on land. Sync step frames get as low as 1.8 zoomed out to reaching 4.2 when zoomed in very close to the middle of nowhere on land. Middle of nowhere on land is higher performance than middle of nowhere on water as water is animated and forces a full frame redraw. Performance is slower on land in cities than in middle of nowhere.

QuoteThe server is set to use a framerate of 30fps. With my i7 950 (overclocked), I can keep up when zoomed in, but not when zoomed out. When I zoom out, my framerate drops to ~28fps, and so the game drops behind. If I zoom all the way in, the game catches up by running at 40-50fps until it catches up to the server, and the lag disappears.
Equally well if I ran on a modern generation i7 at 4GHz I would always be able to catch up as I would be a lot faster. An i7 920 not overclocked is slower than an overclocked i7 950.

For the short term the only viable solution might be to add a dynamic frame rate system to the server, similar to what StarCraft II uses. In StarCraft II if a client cannot keep up with all other clients it drops the game speed (ticks per second) so they can. This would mean that when I play both the server and all clients slow down so my CPU can keep up.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 11, 2018, 07:51:54 PM
Quote from: DrSuperGood on January 11, 2018, 07:44:36 PM
For the short term the only viable solution might be to add a dynamic frame rate system to the server, similar to what StarCraft II uses. In StarCraft II if a client cannot keep up with all other clients it drops the game speed (ticks per second) so they can. This would mean that when I play both the server and all clients slow down so my CPU can keep up.

That is a very interesting idea. Would you have any idea how one might code this?

In the meantime, I am trying again with a different version of the optimisation abandoned earlier; but the solution in the interim might well be simply to reduce the target framerate for the server.

May I ask what framerate that you get at a moderate zoom setting?

Edit: I have now pushed the revised optimisation, which now works correctly. However, I still get only ~26fps zoomed all the way out. Would it be a good idea if I were to decrease the target FPS on the server to 15?

Edit 2: Testing has determined that the sea is a significant part of the issue here: when I am zoomed all the way out but have no water on my screen, I can keep up with the server at ~30fps; when there is water on my screen, however, I fall behind. I should note that this is using my 1440p monitor. With my 4k monitor, I get ~26fps even over land zoomed all the way out, and ~16fps over water. I suspect that the animation of the sea is part of the problem here - the graphics engine really is horribly inefficient.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 11, 2018, 09:20:39 PM
If the game is running at 30 sync steps per second then that is clearly the problem... Lowering it to 15 will probably solve it at least for now.

Water tiles have to be redrawn each frame so cause an entire screen redraw. Land tiles do not hence save on fillrate. Fillrate is tied to CPU time and memory bandwidth.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: TurfIt on January 13, 2018, 05:43:17 AM
Quote from: jamespetts on January 11, 2018, 07:51:54 PM
the graphicsSimEx simulation engine really is horribly inefficient.
FTFY.

Given the disparagement expressed above, I undertook some el quickie timing tests with the save as downloaded from the server.
Some weird stuff since last time I compared backends - not sure if SimEx specific, or standard afflicted too.... will need to look.

opengl backend just crashes on startup. not maintained - might as well just delete it...
GDI - used to be ~5% slower than SDL. Now 75-100% slower! wow. Time to get rid of this one too.
SDL - still the best. Unless you have a Mac, or run certain window managers in Linux, or want to display non latin character languages, then no go. But English on Windows, timings can't be beat.
SDL2 - used to also be ~5% slower than SDL, Now 12-44%. But, I can reduce that 44% which is when all zoomed out down to the same 12% slower at normal zoom by disabling dirty tile updates. But at a cost of 27% slower at normal zoom. hmmm.

Other performance enhancers:
  Disable water animation - 10% faster, and much less nausea.
  Set the correct #threads for my CPU, 12%. (WTF is the default at 6? Very few hexacore CPUs still. Engaging HT for the display threading just slows things down. And triple WTF does the client desync from the server when 'fixing' the thread count????)

And the FTFY:
In SimStandard, largeish games show timings of 20% spent sync_stepping objects, 80% on the display. The server SimEx game is showing 66% objects, 33% display (@1:1 zoom). Hence you're barking up the wrong tree blaming the display for the games performance woes.

Raw data:

GDI ss: 80010, 2388, eye: 0.00, way: 0.00, syn: 7.68, sst: 7.69   fr: 2388, dis: 7.28,  tot: 14.96
SDL ss: 80036, 2386, eye: 0.00, way: 0.00, syn: 7.74, sst: 7.75   fr: 2386, dis: 4.19,  tot: 11.94
SDL2 ss: 80019, 2383, eye: 0.00, way: 0.00, syn: 7.83, sst: 7.83   fr: 2383, dis: 4.72,  tot: 12.55
SDL2 6thread ss: 80026, 2389, eye: 0.00, way: 0.00, syn: 7.97, sst: 7.97   fr: 2389, dis: 5.31,  tot: 13.28
SDL2 8thread ss: 80025, 2385, eye: 0.00, way: 0.00, syn: 8.01, sst: 8.01   fr: 2385, dis: 5.33,  tot: 13.34
SDL2 use_hw ss: 80024, 2387, eye: 0.00, way: 0.00, syn: 7.44, sst: 7.45   fr: 2387, dis: 6.01,  tot: 13.45

GDI MaxZoomOut ss: 70002, 1862, eye: 0.00, way: 0.00, syn: 7.00, sst: 7.01   fr: 1862, dis: 21.36,  tot: 28.36
SDL MaxZoomOut ss: 70005, 2085, eye: 0.00, way: 0.00, syn: 6.96, sst: 6.97   fr: 2085, dis: 10.95,  tot: 17.91
SDL2 MaxZoomOut ss: 70027, 2072, eye: 0.00, way: 0.00, syn: 7.00, sst: 7.00   fr: 2072, dis: 15.85,  tot: 22.85
SDL2 MaxZoomOut 8thread ss: 70001, 2082, eye: 0.00, way: 0.00, syn: 6.65, sst: 6.65   fr: 2082, dis: 16.11,  tot: 22.76
SDL2 MaxZoomOut no water anim ss: 70017, 2087, eye: 0.00, way: 0.00, syn: 6.97, sst: 6.97   fr: 2087, dis: 14.35,  tot: 21.33
SDL2 MaxZoomOut use_hw ss: 70025, 2090, eye: 0.00, way: 0.00, syn: 7.01, sst: 7.01   fr: 2090, dis: 12.35,  tot: 19.36

sst: average ms spend sync_stepping objects, fr: number of frames in run, dis: avg. ms per frame. tot:(al).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 13, 2018, 07:04:21 AM
The entire problem is that the simulation of Simutrans Extended is a lot more resource intensive than Standard. Although one can optimize it here and there, there is no avoiding the facts that more time must be spent on the simulation because the simulation is more complex. The problem is that the simulation is now so complex that the 33% of time spent on display is a considerable bottleneck to game performance.

QuoteSet the correct #threads for my CPU, 12%. (WTF is the default at 6? Very few hexacore CPUs still. Engaging HT for the display threading just slows things down. And triple WTF does the client desync from the server when 'fixing' the thread count?)
I asked the same question... The threads are not just used for graphics, but rather for graphics and updating game state. Threading logic should be such that number of threads is client configurable and the result of an action is independent on the number of worker threads specified for it. However the way it is currently implemented appears that the number of threads does effect the outcome of actions and hence all clients have to use the same number of threads as the server.

HT for display threads should not matter much. Yes it will be slower due to additional synchronization, but it should be mostly trivial. A far larger performance impact would occur having more threads than available execution units due to context switching overhead.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 13, 2018, 10:51:55 PM
Thank you for that profiling - that is very interesting, especially the consequences of the number of threads. I have now fixed the problem of the number of threads having to be set in simuconf.tab to be identical to that on the server: the game will simply defer to the server's when joining a network game and retain that value until it starts or loads a new game. The reason that the number of threads has to be the same on the client and on the server is that the passenger generation is multi-threaded, and each thread has its own random number generation seed, so that number of threads will affect what actually happens in the game. I am in the process of modifying the threading system so that the passenger generation system (which does not run concurrently with anything substantial in the main thread because it would cause conflicts if it were to do so) uses the number of threads specified in num_threads, but other multi-threaded systems, such as the private car and convoy routing, use 1 fewer thread than the specified num_threads, as these do run concurrently with the main thread in places.

Dr. Supergood is correct about the significance of graphical performance in Extended, incidentally - the much greater map size combined with the much greater depth/complexity of simulation makes the graphics performance far more critical in Extended than in Standard. I did not mean to be critical of those who worked on the current graphics system: it is of its time and I doubt that anything better could sensibly have been written in 1997-1999. If it were possible to recast the engine now to take advantage of modern methods and technology, that would be splendid, although is rather beyond my abilities.

On a map as large as the Bridgewater-Brunel map, most of the time is spent in passenger generation as a result of the large number of alternative destinations that it is necessary for passengers to have, together with the time spent by the game in hashtable lookups for routes on player networks. The performance of the hashtable and weighted vectors (for the buildings, which are accessed when passengers pick somewhere at random to go for each iteration of their destination search) are therefore critical, although I am not sure whether they can be improved.

As to the relationship between threads and execution units, my approach to threading in Simutrans has been to have a bespoke multi-threading model for each subsystem that requires multi-threading, and to have a set pool of threads for each of those subsystems (e.g., passenger generation, convoy routing, etc.). The number of threads in that pool is equal to the number of threads minus one (to take into account the main thread; although, I am now changing that for the passenger generation to make that equal to the number of threads, as that does not run concurrently with anything else of any significance). Some of these multi-threaded subsystems run concurrently with all sync steps (e.g. the path explorer, which uses only one thread, the convoy routing and the private car route finding) and some do not (the route unreserver for railways and the passenger generation). This is all independent from the number of threads allocated for the graphics, of course. Quite how this fits into the relationship between the number of threads and the number of execution units I do not know, but it is certainly considerably better in performance terms than it was when all of these things were single threaded.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 14, 2018, 06:49:57 AM
Looks like the server has gone down.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 14, 2018, 12:30:31 PM
My apologies: there was some code that I added yesterday that worked on Visual Studio but would not compile on GCC. I have now fixed that and am recompiling on the server now. It should be back up again in a few minutes.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 15, 2018, 05:47:15 AM
Server is unstable. Crashed twice in the last few hours. Only user activity was line maintenance work such as adding convoys, removing convoys, adding new mail lines etc.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 15, 2018, 10:49:15 AM
There was a bug that is consistent with this description fixed in the latest nightly build.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on January 19, 2018, 06:17:36 PM
The server has been down since morning.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 19, 2018, 10:36:19 PM
My apologies for this: this was due to a compile error in the Linux builds, which I have now fixed. The server is running again.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on January 20, 2018, 12:49:05 PM
My company seems to have had its password stripped out at some point, and been edited by other players. Are passwords being deliberately removed after a certain time period, or is it still a bug like we had on the canterbury server?

Also, my line "west interconnecter ferry" has a weird issue - ships at dock report an error "too complex" and will not depart. I cannot send them to depot (they can't find one) and I cannot enter their schedule menu to see whats up or change where they are going. I've added extra waypoints to the route in case it' the distance between ports causing an issue but that doesn't seem to have solved anything. Thoughts?

Lastly, it seems changes to the passenger generation or something have affected my company rather badly, but other companies dont look unduly affected? Is there a change that people have made to accomodate the new balancing? I can't immediately see what has been done by other players, all the routes look the same as before. Yet my margin is well negative now. I've tried tweaking passenger demographics for routes, unsure if that will affect anything substantial.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 20, 2018, 04:01:18 PM
As to the passwords, there is a system that will unlock companies if they have been inactive for a certain period of time (in game years) to allow other players to take over companies of players who have become inactive so as not to clog up the limited saved game slots.

If you think that the issue with the ferry is a bug, I should be grateful if you could post a separate bug report in the usual way.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 20, 2018, 09:42:55 PM
The error message is pretty self explanatory. You made a line that is far too complicated. If it should be considered that is open to debate and might be a bug.

There was a large reduction in passenger generation of ~1/3. This was attributed to stage posts and other unmanned stops no longer inherently generating passenger traffic.

The problem is your network was not very profitable to start with. Where as it only cost companies like mine ~30% of my yearly profit, it caused you to flip into negative numbers.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on January 21, 2018, 04:15:59 PM
Quote from: DrSuperGood on January 20, 2018, 09:42:55 PM
The error message is pretty self explanatory. You made a line that is far too complicated. If it should be considered that is open to debate and might be a bug.
The line has 4 stops and a mirror instruction. It is probably the simplest shipping line I have.

If the profitability issue is a simple as stated I'll have to simply review line provision, that's fine. Just wanted to be sure I wasn't missing some underlying cause / cleverness before I start that task. It does seem other players are generating more profit from very similar lines to mine, I'm unsure what the difference is, convoy spacing or something perhaps. I'm still trying to get the hang of the new passenger dymanics, so wasn't going for optimising before, but I guess now need to.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on January 21, 2018, 09:06:09 PM
I think I noticed on some of your lines that you have quite high waiting times on some lines. Try get that down to just a couple of hours and see what effect that does. That being said, my ships are going in negative revenue currently. It's the road network that keeps me in positive income.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 21, 2018, 09:22:27 PM
I should note for clarification that the error message about a route being too long/complex refers to the route between any given two points in the schedule, and is not a complaint about the complexity of the schedule.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 22, 2018, 01:08:08 AM
Most of my ships make me excessive amounts of profit, to the point I decided to throw a lot of it away raising (enlarging) an island out of the ocean.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on January 22, 2018, 07:01:08 PM
Server is down.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: AP on January 22, 2018, 07:02:13 PM
Quote from: DrSuperGood on January 22, 2018, 01:08:08 AM
Most of my ships make me excessive amounts of profit, to the point I decided to throw a lot of it away raising (enlarging) an island out of the ocean.
I noticed this, but couldn't figure out how you were doing it. I assumed it was a bug operating in your favour... ;-)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 22, 2018, 09:16:58 PM
QuoteI noticed this, but couldn't figure out how you were doing it. I assumed it was a bug operating in your favour...
The bug is called offering efficient services to people at affordable prices. Unlike yours which often have overcrowding or cause other player's stops to overcrowd.

Old ships are slow, so really long distance routes do not work.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 22, 2018, 09:21:15 PM
Quote from: Rollmaterial on January 22, 2018, 07:01:08 PM
Server is down.

It seems to be running as far as I can tell, and two people appear to be connected.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on January 22, 2018, 09:25:52 PM
Yes, it is running again.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 23, 2018, 12:27:13 AM
I should note that the server is temporarily offline for a memory upgrade.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 23, 2018, 11:28:50 AM
The server is now back online following the upgrade; hopefully, players will be able to notice improved performance and reliability.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on January 24, 2018, 08:20:34 PM
The server is down.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 24, 2018, 09:50:09 PM
The game seems to have been terminated by the server because it was taking too much memory, and this appears to have occurred during a load/save cycle, with the consequence that the saved game had become corrupted, in turn meaning that the automatic re-start failed because it would always try to load a corrupted saved game and quit with an error.

I have now restarted the server from the latest backup, but the out of memory issue is very likely to be due to a memory leak, since I have recently upgraded the server's memory from 4Gb to 6Gb. I have spent some time investigating a possible memory leak, but have so far been able to make very little progress in finding the cause.

Edit: I think that I have now fixed the memory leak, which was related to pedestrians and private cars.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on February 13, 2018, 12:34:13 AM
Could players please stop unloading all their mail at my (slot 4 Far East Company) stops that are servicing single towns for local pickup. You can even unload to my hubs directly (saves you on upkeep and hops) as long as you keep the mail waiting for your lines at it under 500 in total. If you cannot promise such limits then rather unload all that mail in your own stop nearby one of my hubs and then use a local shuttle service to move it across to my hub, letting you store as much mail are your lines require.

What some of you are doing is like gathering together 500 vans filled with mail and then dumping it in some local village post office to be delivered. Where as my hubs are like large post office centres handling thousands of vans per hour, the local post offices are not. If the game had any physics at all the poor post office would literally explode with all that mail!

Unless one does this I cannot garuntee that return mail is delivered to your networks at all, which might negatively effect profitability.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on February 20, 2018, 12:03:26 PM
I have noted some feedback suggesting that people are having performance problems (i.e., a large lag between input and action, caused by the clients not keeping up with the server). When we last had this issue, I managed to optimise performance a little, and also reduced the server's target framerate from 30fps to 20fps to make it easier for clients to keep up. It seems that this is again becoming more of an issue as the map expands.

May I ask what people's views would be on further reducing the target framerate from 20 to 15fps? The movement of graphics will be noticeably less smooth, but there will be a reduced tendency to lag behind the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on February 20, 2018, 04:09:07 PM
I would recommend reducing the frame rate to 15. I pretty much have to play at maximum zoom level and even still start to lag behind with enough windows open.

For future tests I recommend using a map half the size. As good as these massive maps are I think experimental is just too demanding for them, especially in a multiplayer environment.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on February 20, 2018, 11:12:27 PM
Thank you for letting me know. I have now adjusted the frame-rate - the change will take effect on the next server restart.

Edit: As to the performance generally, about 75% of all CPU time accross all cores is taken by the passenger generation code. Just finding a destination for passengers takes 23.3% of CPU time accross all cores. The issue is not the geographical size of the map, but rather the population density. The computational intensity of generating passengers increases with the square of the population, since, as the population increases, so too does the number of alternative destinations that passengers must search before finding a suitable destination. Adding alternative destinations for mail would exacerbate this, but only modestly, as there are far more passengers generated than mail.

It may be better for future maps thus to have fewer towns (perhaps 500?), but leave the land area large and use the clustering setting to have large wilderness areas (similar to the Scottish highlands, perhaps). Also, the population grows too quickly, I think - not as much too quickly as in the past, but too quickly all the same. This should be dealt with when revising the town growth algorithm.

In the meantime, if anyone can think of a more efficient weighted vector implementation (I have checked - this is not in STD or the STL), that would be very helpful.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on February 21, 2018, 07:35:32 AM
If passenger generation is the main performance issue, then I'll add that code to my list of things to investigate, and see if I can find any improvements to it (although at my current rate someone else may get there first). It seems like the sort of code that would be easy to write inefficiently, and hard to fully optimise.
Incidentally, this sort of thing would probably be easier for me to investigate once I have a more powerful laptop (in particular, with more RAM) and can actually run the server game myself.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on February 21, 2018, 12:33:21 PM
That would be very helpful, thank you. I suspect that the biggest inefficiency is in the use of the weighted vector: the at_weight function has a computation time which increases with the number of elements in the vector, which, of course, is quite different from an ordinary vector, where performance is constant no matter the number of elements.

I did look into this, but there is no standard weighted vector, and all the suggestions for writing algorithms for this that I can find use precisely the same sort of iterate through everything in the list mechanic used by the current system. In theory, I imagine it would be possible to have a system with multiple entries in a vector, the number of entries representing the weight. This would then greatly improve access time, but probably at the cost of much higher insertion/removal time for elements and higher memory overhead (although all that would be stored would be 64-bit pointers).

Do not worry about the time, incidentally, as it takes me a long time to get around to things to, and the code is complex.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: prissi on February 22, 2018, 07:19:15 AM
at_weight uses a binary search. There is nothing faster than that so far, and the access increases only with the square root of elements. Even for 4 billion entries less than 32 iterations are needed. (Inserting and deleting from it are of course much more time intensive.)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on February 22, 2018, 10:33:23 AM
Interesting: thank you for that information.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on March 21, 2018, 02:15:04 PM
Arlspike Fisherman, if you are reading this: you have a vehicle with no route in Crandon blocking the whole traffic!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Speedbus on March 22, 2018, 06:24:59 AM
It should be fixed now. I am very sorry, and I apologize for any inconvenience.

The cause was that there is no public right of way anymore between (1765,2686) and (1765,2689). In other words you managed to interrupt the public route. As far as I understand the concept of public rights of way this should not have been possible.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 22, 2018, 07:21:49 AM
The server game is starting to hit the point where we are going to run out of viable trains. Only the very early trains have been balanced, with the ones being introduced now all having insane running costs.

For example the 59km/h train costs just 0.08c/km where as the new 80km/g train costs 7.70c/km. Seeing how they also lack monthly maintenance costs this points towards their data not being rebalanced.

I would be willing to hack together some reasonable sounding numbers that would work with the gameplay, however they would not be historically sourced.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 22, 2018, 11:00:32 AM
Dr. Supergood - as an interim measure until full balancing can be put together after the new features are added, that would be very helpful.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 23, 2018, 12:36:02 AM
I have put a merge request for the engines up to 1835. I will do more in the future.

Generally I have tried to scale per km cost with engine power, factoring in engines becomming more fuel efficient due to scale and better designs. Per month costs have been scaled representing the realitive complexity of the engine and number of crew needed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 23, 2018, 12:40:06 AM
Splendid, thank you. I have now incorporated this.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 25, 2018, 07:02:10 AM
Server failed to migrate nightly at the correct time. It should have done so ~1 hour before making this post, but still is using the previous nightly. All other servers seemed to have migrated as expected.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 25, 2018, 01:21:31 PM
Oddly, the control script seems to have lost control of the Simutrans-Extended instance. I am in the process of restarting the server now.

Edit: This is now running the correct version.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 29, 2018, 11:18:35 PM
Server has just this moment crashed due to index out of bounds error. Also crashed my client immediately after out of sync (as the server crashed so sync was lost).

For example index 66 of 0...0.

Seems fairly reproducible with the server game. Crashes after a few minutes.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 30, 2018, 01:26:50 AM
Thank you for the report. Connecting with a debug version, I get the desync, but not the crash. Can you let me know the exact text of the error message that you get so that I can at least try to narrow down the problem?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 30, 2018, 06:31:19 AM
Crashes very reliably with same error each time. Server is basically unplayable at the moment.

Attached is image of the thrown error.

Not sure how useful it is though. It is a typical vector index out of bounds. What is interesting is the vector has 1 element and it is trying to read index 66 and it is of type world coordinates. Possibly related to routing or pathing?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Speedbus on March 30, 2018, 06:34:26 AM
I got this error message just a few minutes ago:
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on March 30, 2018, 06:53:40 AM
There are many different vector types, so it is useful knowing which one it is. In this case, even without examining a backtrace, we further know that it is vector_tpl of koord3d, which appears in about 24 places in the code (search for "vector_tpl<koord3d>"). Given recent discussion, this one in particular stands out to me:

simhalt.h-422-  * Used for the time interval system
simhalt.h-423-  */
simhalt.h:424:  vector_tpl<koord3d> station_signals;
simhalt.h-425-
simhalt.h-426-#ifdef USE_QUOTE

Also, the vector is not empty - '0..0' actually means that the vector contains one element (so the valid indices are 0 to 0 inclusive).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 30, 2018, 08:00:38 AM
QuoteAlso, the vector is not empty - '0..0' actually means that the vector contains one element (so the valid indices are 0 to 0 inclusive).
Ops my bad.

Anyway it is currently a fatal error that is preventing one from progressing on the server game. I would not be surprised if it is related to the timed interval system as there are at least 3 known bugs with that.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 30, 2018, 06:35:38 PM
I think that I have fixed this now - I am just deploying the fixed version on the server. This should be running again in ~15 minutes. Sorry for the trouble.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on March 30, 2018, 07:33:05 PM
The server still seems to be running the previous version.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 30, 2018, 09:12:27 PM
Seems fixed, no crashes on the server so far.

That said the server did freeze for a very long time (do not know if it stopped). However that could be because of someone with a slow internet connection joining but I did not have the time to wait and find out.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on March 30, 2018, 09:25:04 PM
Quote from: DrSuperGood on March 30, 2018, 09:12:27 PM
That said the server did freeze for a very long time (do not know if it stopped). However that could be because of someone with a slow internet connection joining but I did not have the time to wait and find out.
That might be me.

Also, the server seems to crash right after the first month shift.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 30, 2018, 09:28:53 PM
I have been attempting to update the server to the latest correct version following Rollmaterial's earlier report, apparently without success; but perhaps it did succeed and I was testing with the wrong version...? I am rebuilding and restarting now.

Edit: This is now back: apologies for the difficulties.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 09, 2018, 09:04:40 AM
Server is down. Been down since it was scheduled to restart with nightly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 09, 2018, 08:27:01 PM
Thank you for the report, and apologies for the difficulties. The saved game appears to have become corrupted for reasons that are not clear. I have restored what I think is the latest backup of the saved game and restarted the server, but I should be grateful if you could check whether this is recent enough or whether this appears to lost a significant amount of progress so that I can restore the other backup if this appears to be too old.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 09, 2018, 08:33:25 PM
I dont know about how old the savegame is, I have not been so active lately, however, all the passwords have been reset, so people might consider go in and reset their passwords.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 09, 2018, 09:14:23 PM
It is quite old, I recall being in October or November 1842 when I connected yesterday.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 09, 2018, 09:26:07 PM
Thank you for letting me know - I am now restarting with the later saved game, which appears to be in February 1843.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 09, 2018, 09:35:13 PM
Did you accidentally take the wrong savegame? Just returning to the server, I am looking at the very changes I did right before you restarted it.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 09, 2018, 09:59:01 PM
It seems so, although I am not quite sure how. I am restarting again with hopefully the correct version: apologies for the trouble.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 12, 2018, 12:05:22 AM
Server game is stuck in an infinite crash loop.

Error:
7koord3d index out of bounds: 111 not in 0...110.

Cannot get screenshot because the game is in a fatally crashed state and trying to do so results in the dialog being missing.

Will try later when new nightly is up. However if it still crashes that means feedback on the various bug reports will be delayed until it is fixed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 12, 2018, 01:07:33 AM
Thank you for your report: the crash should be fixed in the next nightly. Apologies for the trouble.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 12, 2018, 01:29:27 AM
No problem, I will begin testing in ~5 hours when the nightly rolls over.

Will change back one of my lines to using choose signals. Will also start a new line with choose signals. Will also observe the trouble spots where trains currently run too slowly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 12, 2018, 01:45:59 AM
Splendid, thank you.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 12, 2018, 07:40:21 AM
Crash is fixed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 12, 2018, 08:04:36 PM
Server crashed when I tried to place a new signalbox at location (327,842). So it needs restart...  :)


edit:

The game is up and running again!  :)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 13, 2018, 09:14:14 AM
Pushed a commit for pakset revision up to 1850.

The future trains will cost considerably more to run than currently. This is because trains are excessively profitable at the moment, with just 5 passenger lines of my company on the server generating more profit than all other companies combined. They will still be cheap enough to make good profit from, but no longer as good as free.

For how the numbers were derived...
Due to a lack of overhaul/maintenance feature, I have factored in the cost of the trains into their monthly and running costs. Every ~1,600,000km one will effectively buy the train again. Every 1200months (100 years) one will also effectively buy the train again.

Fuel economics is currently at 0.01 per kW per km. Trains have an efficiency divisor of 0.5, with tanks 0.6 and inefficient trains 0.4. I am aware this probably is kind of nonsense, however without an actual fuel efficiency model it is likely good enough.

Each person is paid 10 per month. With trains using either 3, 5 or 7 people at the moment depending on size and power. Obviously this would be replaced by an employment system eventually.

So a 80kw train will now cost ~1-2 per km and ~70 per month. Before they had numbers like 0.2 per km and 6 per month.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 13, 2018, 09:45:01 PM
Same error/crash as before...

Error:
7koord3d index out of bounds: 111 not in 0...110.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 13, 2018, 09:50:20 PM
I think it was me who crashed it. It happened the moment I reassigned a train to another line.

Worth noticing:

The train was part of a schedule which demonstrated the "ignore choose signal" bug. I had already tried manipulating the schedule to see if I could solve it that way, I had rebuilt the signals but to no luck. So I figured I would solve it by creating a new line, reassigning all convoys to the new line. It worked fine for 8 out of 10 convoys, the two rest being held for departure, hence their schedule could not be modified. To circumnavigate that I pressed the "go to depot" button to make it go to the depot. After the 5 minute reversing session, I opened the schedule of the first train and attempted to reassign it to the new schedule, but upon closing the schedule window, the server crashed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 13, 2018, 11:19:01 PM
I am having trouble reproducing this: I am circa 30 minutes into May 1845, and this crash has not recurred (on my local machine using the saved game from the server). Is this crash recurrent on the server?

Thanks to Dr. Supergood, incidentally, for the provisional balancing work: it is much appreciated.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 13, 2018, 11:21:03 PM
Nope, it didnt happen again, server is happily running.

I forgot to mention that the depot was part of the old schedule because I had already pressed "send to depot".
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 13, 2018, 11:43:51 PM
It will not be possible for me to find and fix this bug unless I have a means of reproducing it reliably. If anyone is able to find such a means, I should be grateful if that person could upload the saved game in which it can reliably be reproduced and open a new thread with a bug report.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 14, 2018, 06:10:15 AM
Server randomly crashed. The synchronization model meant the client never reached that state so I am not sure of the error or if the client would even have crashed.

I also had recently messed around with a time interval choose signal repeatedly deleting and replacing it. However the crash occurred several minutes after.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 14, 2018, 10:54:28 AM
The server seems to be back online now. I am afraid that I have no way of fixing a crash that I cannot reproduce reliably.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 14, 2018, 10:17:49 PM
The server now reliably crashes with an Out of bounds error shortly after connecting.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 14, 2018, 11:41:01 PM
Crashes for me too, just like rollmaterial describes. Connect, wait a few minutes and then crash.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Speedbus on April 15, 2018, 06:42:04 AM
Same behavior with today's new exe file (#a529a46).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 15, 2018, 02:19:28 PM
Apologies for the trouble: I have now restarted the server with a version which should fix the crash. I should be grateful if anyone could confirm whether this helps or not.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 16, 2018, 09:24:50 PM
We can now announce the first railway running powers agreement! The Crandon and Lakes Railway now serves Ves Transport Agency's Netstoke Southern Harbour with an hourly service to Green Lewisby and Selford Gay.
(https://simutrans-germany.com/files/upload/Netstoke.png)
(https://simutrans-germany.com/files/upload/Netstoke_ownerships.png)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 16, 2018, 10:17:27 PM
How wonderful! This may be a Simutrans first.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 16, 2018, 11:26:54 PM
Appears to work fine too! Although, you have one train currently at the station that cannot find a route!
How did you get that player color view?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 16, 2018, 11:34:22 PM
Quote from: Ves on April 16, 2018, 11:26:54 PM
How did you get that player color view?
By pressing Shift+o.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 16, 2018, 11:57:14 PM
How can you people manage with hourly services... People in the East seem to want quarter hourly services! If the trains would start on time...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on April 24, 2018, 12:14:10 AM

(https://i.imgur.com/jxkWULD.jpg)

Today, Bay Transport has completed very first phase of The Bay Mainline.
Which has costed Bay Transport its entire capital and its credit.  :-X

But very hopeful that the new line will bring heaps new passenger into Bridgewater transport system.

Ves Transport Agency, with its awesome engineering work quickly has created two connecting junction at the eastern side of the bay region.
Cradon and Lakes Railway, also join junction at the region.

(https://i.imgur.com/3G0eIza.png)

(https://i.imgur.com/8H3mAFa.png)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on April 24, 2018, 12:30:54 AM
What departure per month values do you use?

I personally start from 8 then doubling it to 16/32/64 maybe 128.
Cradon and Lakes Railway, seems to use 6.

It would be nice to have coop unified value to perhaps plan better and fine tune running coop schedules.
Or perhaps there is already certain value as "standard"? like 6?



Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 24, 2018, 01:04:36 AM
QuoteWhat departure per month values do you use?
I usually use whatever many slots I can get reliably for the number of trains I have servicing a line. This takes ~6 game months to get right...

With timed interval signals I would recommend at most 1 train every 15 minutes. 1 every 30 minutes might be better for more reliable high speed and allows the option of multiplexing with another line, eg mail, reasonably successfully. The maximum throughput is 1 every 5 minutes but that forces everything to always run at half speed and if an emergency stop occurs there will likely be massive delays.

With absolute block signalling one can schedule as fast as one likes, limited only by block size and the speed of the trains.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 24, 2018, 01:09:56 AM
I usually use 12 or 6, but also 16 and 24, which both (almost) gives round numbers. Otherwise, I tend to look at the actual minutes instead of the dividends and, as with drsupergood, tend to run the services as close to the 10 minute mark as possible, but with around 5 minutes as a margin.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Isaac Eiland-Hall on April 24, 2018, 01:44:17 AM
Just a quick note - the rail company local to the Panama City, FL area is "The Bay Line". It runs something like 100km north to Dothan, AL. Not a very large company, but it's our only one. :)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 24, 2018, 05:17:58 AM
I have put forward a merge request for balance changes up to 1860.

On top of trains and traction engines, the changes also retrospectively cover all the early sail ship types. Specifically sail ships now have a significant monthly fixed cost representing salaries for either 20 or 30 crew. I could not find sources of the actual crew count unfortunately so these are rough and probably ignorant guesses. On the other hand sail ships have a much lower per km cost, after all wind is free!

Next update I will try and go through and add fixed costs to break wagons. The reason some coaches have a variant with breaks that appear superiour in all aspects to variants without breaks is because they are meant to have higher fixed costs. Each wagon with breaks required a permanent guard to man it, where as coaches without breaks did not.

This changed with the introduction of continious breaks (around 1860-1870 they will show up) since breaks could then be applied from the locomotive by the driver without the need of a guard. Break vans still had guards, but they were only needed for emergencies and shunting purposes. For example a train with 17 coaches might have only had 2 break vans but thanks to continuous breaking most of the coaches had breaks the driver could use. This was critical in reducing the breaking distance at high speeds to reasonable levels for safe and efficient rail operation. All modern passenger trains should be using continuous breaking of sorts, of the sort to fail with the breaks stuck on for additional safety.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on April 24, 2018, 11:53:39 AM
Bay Transport has been liquidated  :-[

Board of Trade (admin), could you please give new chance to begin?
Ves, if above is allowed. I could only run frequent services between

1) Canal Mouth -  St, Martin - Ves Bugleigh Railway Station
2) Canal Mouth -  St, Martin - Fenny Bicken - Lewiston - Ves Shrewport
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 24, 2018, 12:24:20 PM
Dr. Supergood - thank you for that: that is most helpful. I will incorporate that when I get home.

Nuhgl - what will happen is, after a year or two, the company will be finally liquidated, leaving a slot free. You can then start a new company, with fresh starting capital, in that slot. You might also be able to take over one of the other unlocked companies sooner (especially one of the ones that has very little infrastructure so that you are more or less starting afresh).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on April 24, 2018, 03:14:27 PM
Quote from: jamespetts on April 24, 2018, 12:24:20 PM
Dr. Supergood - thank you for that: that is most helpful. I will incorporate that when I get home.

Nuhgl - what will happen is, after a year or two, the company will be finally liquidated, leaving a slot free. You can then start a new company, with fresh starting capital, in that slot. You might also be able to take over one of the other unlocked companies sooner (especially one of the ones that has very little infrastructure so that you are more or less starting afresh).

Aha! I see.
I just took over Mercia Transport which had a million money and no operation. And now company has new name "Bay Connex".
Bay Connex will de-mothball all railways Bay Transport had, and start operation.

Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 24, 2018, 08:09:53 PM
Dr. Supergood - changes now incorporated: thank you.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on April 25, 2018, 04:36:20 AM
(https://i.imgur.com/iEZY5ZP.png)

I get pakset mismatch on latest nightly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 25, 2018, 06:08:30 AM
Did you update to todays nightly? If you have Java 9 or 10 there is an automated update tool I wrote which can help you do that with a minimal download. Usual update size using the Java updater is <30MB every day and just a button press.

I can confirm the server is working as intended and I can connect to it with todays nightly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 26, 2018, 07:36:13 PM
The server is stuck on an out of bounds crash.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on April 26, 2018, 07:37:23 PM
Quote from: Rollmaterial on April 26, 2018, 07:36:13 PM
The server is stuck on an out of bounds crash.

I am also trying to connect to server and I get Server did not respond.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 26, 2018, 07:40:06 PM
Quote from: nuhgl on April 26, 2018, 07:37:23 PM
I am also trying to connect to server and I get Server did not respond.
It takes a little bit to restart. When you connect it will crash with an out of bounds error a few seconds in.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 26, 2018, 09:50:30 PM
Can confirm, out of bounds crash. 27 not in range.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 27, 2018, 01:09:54 AM
I have now fixed this - this should be working again from the next nightly build. Thank you very much for the reports, and apologies for the trouble.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 28, 2018, 05:17:35 AM
Index out of bounds crash. Index 33 not in range 0...32. Seems to occur in ~1 minute after the game resumes. Appears to be crashing the server as well.

Also would it be possible to merge in the balance changes up to 1970?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 29, 2018, 01:41:23 PM
My apologies for the difficulties. I have now fixed the crash and incorporated your balancing changes up to 1870 and am running a manual recompile on the server now, so this should be working again shortly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on April 30, 2018, 07:48:41 PM
Is server down?
I get no server response atm.

(https://i.imgur.com/KveLo7C.png)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 01, 2018, 10:56:50 PM
The main server is not down, but the listing server is. Until the listing server is fixed, you can connect manually by opening the load game dialogue and typing, "net:bridgewater-brunel.me.uk".
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on May 01, 2018, 11:11:07 PM
I have attempted to log onto the server multiple times both today and yesterday using the load savegame dialog, but without luck. It quite quickly returns the message "Could not connect to bridgewater-brunel.me.uk"
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 01, 2018, 11:41:04 PM
Thank you for the report. There seems to have been a corrupt saved game. I have restored from the latest backup and am in the process of restarting now.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: nuhgl on May 02, 2018, 04:59:03 AM
(https://i.imgur.com/PskHMuj.png)

I get revision mismatch on latest build?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 02, 2018, 12:03:36 PM
You posted at just around the time that the rebuild would have been occurring, I think, so you might want to try updating your version and trying again.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on May 05, 2018, 11:33:49 PM
Rollmaterial, now I got kicked and server seems unrespondable  :P
But now its possible to get in again!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on May 08, 2018, 05:52:19 AM
Something appears to have happened to the nightly build. Usually it is available at this time. Instead there is no hash file and the server appears down.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 08, 2018, 10:13:46 AM
Thank you for letting me know. The update process seems to have been interrupted. I have re-run the update process manually, and this now seems to be working.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on May 11, 2018, 04:00:41 PM
Looks like the server is down.
Edit: Up and running again.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on May 13, 2018, 02:47:53 PM
The server seems to be down again.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 13, 2018, 10:31:45 PM
It seems to be running again now. Can anyone give any insight into the circumstances in which the server crashes so that I might be able to reproduce these circumstances?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on May 13, 2018, 11:04:52 PM
They happen when transferrìng the save during connection to the server aborts due to the connection breaking.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 14, 2018, 01:01:20 AM
Quote from: Rollmaterial on May 13, 2018, 11:04:52 PM
They happen when transferrìng the save during connection to the server aborts due to the connection breaking.

I am not sure that I fully understand - what do you mean when you refer to the server aborting due to the connexion breaking? If a client disconnects during a transfer, I do not think that that crashes the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on May 14, 2018, 10:18:03 AM
I was trying to connect to the server and during the transfer stage my internet access was interrupted, so my attempt to connect failed. Afterwards, the server remained unresponsive for sometimes over 30 minutes.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 14, 2018, 10:31:14 AM
Quote from: Rollmaterial on May 14, 2018, 10:18:03 AM
I was trying to connect to the server and during the transfer stage my internet access was interrupted, so my attempt to connect failed. Afterwards, the server remained unresponsive for sometimes over 30 minutes.

Can anyone confirm whether they have had any similar experiences? It may be that the server is waiting for the client and perhaps needs a shorter timeout set somewhere. Does anyone know whether this is any different with Standard?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on May 31, 2018, 10:29:39 PM
No I have not had that issue ever, but I generally dont have any issues with the internet.
However, the server appears to be down at the moment.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 31, 2018, 10:36:34 PM
It appears to be unable to start, usually caused by an interruption during the build process.

I am now rebuilding the server manually, which involves using the latest code, which includes the OTRP which has now been incorporated. Once the rebuild has completed, you will need to update your version of the code and pakset to join the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on May 31, 2018, 10:49:44 PM
Nice!
Looking forward to try that feature!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 31, 2018, 10:53:00 PM
Excellent. The server should now be running again.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on June 04, 2018, 10:39:00 PM
The servergame freezed and is now unjoinable, ie not responding.
edit: Running again!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on June 06, 2018, 09:41:30 AM
Ouch, looks like some bridges of Bay Transport were mothballed and interrupted most of the network.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 06, 2018, 11:22:09 AM
Server game just froze at end of month (start of new month). Forcing the client to advance to that state also resulted in it freezing. Appears to be symptomatic of an infinite loop somewhere. Possibly the result of removing company assets as several of the abandoned companies are going in solvent. Do not know if it is recreateable at the moment.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on June 06, 2018, 12:13:48 PM
I will not have time to look into this until this evening - I should be grateful for an update by then on whether it has resolved itself or not.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on June 06, 2018, 03:32:28 PM
Yeah, I can confirm that it freezes on month end (October > November), I saved the game locally and fixed some, but it doesn't seem necessarily related to the infrastructure. It still freezes and enters infinite loop.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 07, 2018, 08:23:36 AM
It progressed beyond that point, however it then froze randomly mid month...

Can we make the autosave period every 15 minutes or so? I am losing a ton of progress on the server game as a result of these freezes...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on June 07, 2018, 01:47:40 PM
It reverted by 30-in game minutes after the server went unresponsive (saving the game and loading it result in a crash to desktop without error message or freeze).

Edit: Crashes now in November 1874 with index out of bounds error.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Speedbus on June 09, 2018, 05:29:33 AM
Quote from: Junna on June 07, 2018, 01:47:40 PMEdit: Crashes now in November 1874 with index out of bounds error.

Confirmed, cf. attachment
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on June 09, 2018, 02:04:25 PM
My apologies for the trouble: I have now fixed the index out of bounds error: this was related to the new overtaking features.

As to autosaving, it is set to autosave every 1 hour (if nobody has joined and caused an earlier load/save cycle more recently than an hour). I doubt that 15 minute interval autosaves will be practical, since it will excessively interrupt gameplay with long load/save cycles too frequently.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 10, 2018, 06:25:30 PM
As the listing server is down at the moment it is a good time to mention how to join it without the listing server. In the multiplayer menu paste the following...

bridgewater-brunel.me.uk:13353

And hit search. If the server is running it will load details and you can join. Also apparently works from the save/load menu for some reason...

I suggest mentioning this in the opening post. It is hinted but I do not think that helps anyone who has not studied how networks work.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on June 10, 2018, 06:49:28 PM
In the multiplayer menu, it is not necessary to specify the port, it will also find the server by simply typing bridgewater-brunel.me.uk.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on June 10, 2018, 06:51:30 PM
Thank you for the suggestion: I have now added this to the first post. Incidentally, as the server uses the default port number, it is not necessary to type the port number.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Isaac Eiland-Hall on June 11, 2018, 01:29:41 AM
Looks like I'm having troubles with the server that hosts the listing. It's my backup server, and cpanel isn't removing old backups. Meanwhile, I suspect the disk is full again. I may have to rebuild it, but checking with Vladki first to see if he needs access to files before I rebuild the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on June 11, 2018, 07:44:14 AM
Quote from: Isaac.Eiland-Hall on June 11, 2018, 01:29:41 AM
Looks like I'm having troubles with the server that hosts the listing. It's my backup server, and cpanel isn't removing old backups. Meanwhile, I suspect the disk is full again. I may have to rebuild it, but checking with Vladki first to see if he needs access to files before I rebuild the server.

Thank you for the update, and for hosting - that is most helpful.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 11, 2018, 09:01:25 AM
Warning, all lines that are functioning with absolute block signalling system are broken at the moment due to some bug in the last nightly. This is especially important for small companies as you will likely go broke if people play too much. After the bug is confirmed fixed you will need to manually fix all your lines as trains may be stuck in junctions or overlapping each other.

For example Ves's company will be broke (negative money in bank) in 1 month. This is quite bad because his company is massive.
Title: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on June 11, 2018, 10:53:34 AM
Would it not be possible to temporarily pause the server until the bug is fixed? I don't have time to often go online and fix the deadlocks. And yes, I'm on the edge of being broke! ?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on June 11, 2018, 12:10:46 PM
Please do, all my lines are single-tracked so...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 12, 2018, 12:28:24 AM
Seems fixed in the current nightly. I recommend people login and manually fix all their lines as soon as possible.

I recommend that everyone build up enough money in reserve that they can survive at least 2 years of operation without any revenue.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on June 12, 2018, 06:43:40 AM
Quote from: DrSuperGood on June 12, 2018, 12:28:24 AM
I recommend that everyone build up enough money in reserve that they can survive at least 2 years of operation without any revenue.

Trying....
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 12, 2018, 09:06:03 AM
Server appears down. Someone tried to join and it never resumed there after.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on June 12, 2018, 09:18:50 AM
The listing server suggests that is it back now.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 13, 2018, 12:07:30 AM
Ves your company will default in under an ingame year. If you want help preventing this from happening feel free to PM me your company password and I will see what I can do. I cannot make any promises but it would be shame to see all the effort you spent be lost.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on June 13, 2018, 02:38:50 PM
rip Ves company.

There's a critical crash now, one of those tpl out of bounds once again, reverted server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on June 13, 2018, 09:40:41 PM
I am not able to reproduce this crash, I am afraid - is it still reproducible on the server?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on June 13, 2018, 10:46:59 PM
So, it went the way it did :P

Starting over now with a new company!

edit:
And btw, for anyone interrested in starting on the server, there are hell of a bunch of unused tracks now which can just be purchased!  :thumbsup:
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on June 14, 2018, 02:05:22 AM
The crash was caused when Bay Transport attempted to fix Crandon and Lakes stuck trains by temporarily revoking access rights, but it reverted after the crash and it was fine. Rollmaterial fixed his jams today, so it is working better now.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 21, 2018, 11:16:39 AM
I have made a pull request for more balance changes. These balance changes effect everything in Pak128 Britain Extended, meaning that there should be no further worries of running out of useful vehicles. If the vehicles are entirely useful is another question...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on June 21, 2018, 08:30:47 PM
By the way, earlier today it crashed and resetted when I tried to use the plant random tree tool. Can anyone else reproduce that?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 21, 2018, 09:54:50 PM
Avoid planting trees, it bloats the save file size and memory usage.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on June 22, 2018, 03:59:01 AM
Surely it shouldn't crash though, should it?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on June 22, 2018, 06:33:43 AM
Well it might if you cover the entire map with trees due to the increased memory usage. However you are right that 1-2 trees should not cause a crash.

Can you reproduce this in any way? If so file a bug report.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on July 05, 2018, 12:10:35 PM
Whoever is playing Arlspike seem to have some... issues. Rather than abandon their company and remove the password, they spent like 15 million just to demolish all their things and closed all their lines and operations over the course of endless hour meticulously demolished all their thousands of stops, including removing landscaping... lol
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on July 06, 2018, 05:52:33 AM
In the process of doing that they dropped my revenue ~100,000 per month from all the traffic they were generating with me lol.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on July 14, 2018, 07:33:52 AM
Server just crashed a few minutes before this post was made. Unsure of cause.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on July 22, 2018, 01:55:38 AM
Server just crashed with 3 players on it. All clients crashed immediately after they disconnected.

I removed a signal box that controlled an intersection while a train was going through it. The train went very slowly by where a signal used to be for several tiles before the crash. I am unsure if this was the cause as I do not know what other players were doing at the time.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on July 22, 2018, 10:42:38 AM
If anyone is able to give sufficient information to allow this to be reproduced reliably, I should be most grateful. I am afraid that there is no way that I can reproduce the crash from the above description unless removing any signalbox always causes a crash.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on July 22, 2018, 06:48:15 PM
I am aware that the chance of finding the cause for such a crash is slim from what I wrote. The reason I log each one I encounter is in case some kind of pattern can be discovered which might eventually lead to the discovery of the cause.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on July 25, 2018, 04:12:29 PM
Server is down at the time of posting. Not sure what caused it as I just went to join it.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on July 25, 2018, 09:32:32 PM
My apologies for this - there seems to have been a corrupted saved game. I have now restored from the backup and the server should be back online shortly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on July 30, 2018, 03:50:58 PM
Client with server version mismatch. The server is not running the latest deployed nightly build (the one my updater is fetching). I am guessing it is still running the previous nightly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on July 30, 2018, 07:59:41 PM
The nightly build process must have been interrupted or similar. I have now re-run this process manually, and the versions now seem to be correct. Apologies for the trouble.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on August 15, 2018, 10:39:31 AM
Server appears down now for an extended period (~6 hours at time of posting).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on August 15, 2018, 12:40:42 PM
Thank you for the report - this has now been fixed. The problem was a compile error that only affected command line server builds.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on August 15, 2018, 12:48:36 PM
Oops, a missed translation slipped through my checks. That's the problem with transferring pre-translation changes onto a post-translation codebase; usually I pick them up when my local build fails.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on August 28, 2018, 10:57:09 AM
Server appears down now for an extended period (~6 hours at time of posting). Possibly similar issue to before as it was meant to restart with nightly but instead never restarted.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on August 28, 2018, 12:54:48 PM
I am away this week without access even to my secondary desktop, so I am afraid that I cannot fix this at present - please let me know whether it resolves itself to-morrow.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on August 29, 2018, 05:20:00 AM
Seems to have resolved itself with the nightly deploy.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on August 31, 2018, 08:08:15 AM
Server offline again... Again seems around time of reboot, or slightly earlier.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 02, 2018, 10:15:34 AM
My apologies for the difficulty: the saved game appears to have become corrupted. I have now restored from the backup.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on September 02, 2018, 02:53:33 PM
The passwords are gone in the backup save. Apparently there has been some progress since the reboot. I would be fine with rebooting with a correct save, would anyone oppose that?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 02, 2018, 02:58:21 PM
Can you elaborate on what you mean by "rebooting with a correct save"?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on September 02, 2018, 03:08:12 PM
I meant to restart the server with a backup where the passwords have been kept. It has happened before that the server got stuck with a corrupt save and was restored with a backup without passwords.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 02, 2018, 03:12:11 PM
I am not sure that the server has any left with passwords now and it would take a very long time laboriously to check each one; would it not be easier for players simply to restore their passwords?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 02, 2018, 03:25:37 PM
You have loaded the wrong save. The one restored to is ancient, losing many hours of peoples work.

Bellow is a link to the most recent save game before the server crashed. Or at least it was the most recent one I have. It is not corrupt.
https://www.dropbox.com/s/o8dxwltzod25jm2/Extended%20Server%20Game%2030082018.sve?dl=0

This save is considerably in the future compared with the current one. I completely redid the transport for several islands including setting up complex bus routes.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 02, 2018, 04:08:52 PM
I had not restored "the wrong" saved game - I had restored the latest apparently uncorrupted game available in my set of backups. I note that there are people online now - I will have to check with them before now resetting whatever they are doing now and re-loading this game.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 02, 2018, 04:17:32 PM
QuoteI had not restored "the wrong" saved game - I had restored the latest apparently uncorrupted game available in my set of backups.
So the server does not keep a copy of the most recent made multiplayer saves like the clients do? Or was it that all of them were corrupted?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 02, 2018, 04:20:48 PM
The server keeps a copy of the single latest save. That was corrupted. The server has also been configured to have a rotating backup of 6 prior versions. The latest in time of these was also corrupted, so I restored the second latest in time, being the most recent apparently uncorrupted saved game available.

I am now having trouble connecting to the server to try to speak to the people who are playing.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on September 02, 2018, 08:51:58 PM
Have you ever been able to (or tried to) diagnose why saves on the server are getting corrupted?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 02, 2018, 09:05:07 PM
I have not tried this, as I am not sure quite where I would start in the diagnosis. One hypothesis - so far untested - is that the corruption might happen if the server restarts to apply an update to Linux, which is set to occur automatically for security reasons, during a load/save cycle.

If you have any ideas for looking into this, I should be most interested.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 02, 2018, 09:15:41 PM
Restarting during or shortly after save/load cycle would explain the corruption. Files are not written out immediately to disks unless explicitly ordered to do so, instead they will be streamed out over time thanks to file caches.

The solution would be to schedule Linux updates to happen when the server is restarting with the nightly.
Linux is cryptic so I do not know how one would do this. However surely it must be possible...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on September 02, 2018, 10:21:52 PM
For that hypothesis you could try logging the times at which saves are created and loaded, and compare these to the times at which the server is restarted. You could also try applying mitigation along the lines DrSuperGood suggests.

However, I don't see how that cause should lead to earlier saves being corrupted too, unless those earlier saves were made not long before the most recent one (so were still in a cache when the server made the next save). I think having earlier saves corrupted too does rule out a bug in Simutrans, but I'm not certain of this.

Another thing to consider (although I don't know how testable this is) is whether the corruption is down to small errors (perhaps indicative of a dodgy/failing disk), or whether the save is significantly damaged or truncated (which would be more indicative of it having never been fully written in the first place).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 02, 2018, 11:01:21 PM
The server is professionally hosted and corruption usually consists of a file a fraction of the size of the full save (e.g. ~10MB instead of ~76MB). The backups are made by discarding the oldest backup, copying the second oldest backup to the name of the oldest backup and so forth until the current saved game is copied to the newest backup slot. There are a total of six slots and this rotation does not occur unless the fresh saved game has changed, so this would, I imagine, explain the way in which the very latest backup becomes corrupt. This would mean that the latest uncorrupted backup is in fact the most recent uncorrupted game that was ever saved by the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 03, 2018, 03:53:35 AM
Except that could not be the case as the save I provided was more recent than the one restored to. I am pretty sure I was still connected when playing...

Are we going to restore to the version I provided? If not I will just have to spend more hours rebuilding what I lost sigh...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on September 03, 2018, 05:38:40 AM
Quote from: jamespetts on September 02, 2018, 11:01:21 PMcopying the second oldest backup to the name of the oldest backup
I hope you're just renaming the old files, and not making new copies of them? Otherwise that would explain why older saves are getting lost, and also provides a fairly simple fix for that issue.

Quote from: DrSuperGood on September 03, 2018, 03:53:35 AMExcept that could not be the case as the save I provided was more recent than the one restored to
I don't see any contradiction here: the fact that you have an uncorrupted save stored locally does not mean that a corresponding save was successfully written to the server's disk.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 03, 2018, 06:01:32 AM
QuoteI don't see any contradiction here: the fact that you have an uncorrupted save stored locally does not mean that a corresponding save was successfully written to the server's disk.
And why would it not be successfully written to the server? I played for many minutes after the save was made which should be more than enough time for all data to be written out. Of course this assumes that the file cache is set to periodically write out changes and not just wait until cache eviction to write them out, which I guess would be a sensible settings for some server applications.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 03, 2018, 10:33:32 AM
Thank you for your thoughts. Firstly, as to the backups - I have looked at the old backup rotation script that I had written back in 2012 to deal with backing up saved games. This used the Linux "cp" command. I have now modified the script to replace the "cp" command with the "mv" command for all but the first backup (as it is important that the first backup is indeed a copy, as the original file needs to remain untouched). However, this would not address the issue described here, as the only corrupt backup was the first, which was (correctly) a copy of the current server save file.

I have looked over the logs and cannot find anything of significance: what appears to have happened on the 31st is that the saved game became corrupted at some point (I do not have the exact time as many of the logs were not timed - I have now modified this) and there came a point when the game could not be restarted. If Dr. Supergood's save was an automatic rather than a manual save from his end, I am not clear on why this failed on the server other possibly than that this was relating to cache settings, which I am not entirely sure how to adjust (a brief search has not yielded clear results - do either of you know how to adjust these?).

I have now restarted the server with the restored saved game provided by Dr. Supergood; I have also taken the opportunity to increase the maximum commuting time tolerance to 3 hours and also increase the maximum visiting time tolerance to 6,015 minutes and the minimum visiting time tolerance to 12 minutes (up from 8) to reflact changes made to the pakset since the server game was originally created.

I do note, however, that Dr. Supergood's saved game also does not appear to have password data retained. I have backed up the saved game that was in use on the server until this restoration in case of difficulty.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on September 03, 2018, 12:02:55 PM
The 'sync' command (which optionally can be given a list of files to sync) should "Synchronize cached writes to persistent storage". So calling that after the copy (and perhaps also once after finishing all operations) would be a good idea. 'sync' is intended for exactly this sort of situation.

The other thing you could do is to first copy the save to a file with a different name to the ultimate backup, then sync the write, and then rename the save to the actual backup name. This should ensure that you never end up with a partial backup save file (except under the temporary name).

Also, I would expect replacing cp with mv (where possible) to significantly improve the time taken to save the backups.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 03, 2018, 07:38:26 PM
QuoteI do note, however, that Dr. Supergood's saved game also does not appear to have password data retained. I have backed up the saved game that was in use on the server until this restoration in case of difficulty.
Obviously it does not as I am not the server... Only the server has the password data for security reasons (if I had it, I could login as anyone I wanted to). Password data is stored in a separate file next to the game save. The game save file is transferred to clients so for the passwords to be kept secure they must be stored separately in an unrelated file that is not transferred to clients but is used by the server to authenticate passwords.
QuoteAlso, I would expect replacing cp with mv (where possible) to significantly improve the time taken to save the backups.
A modern drive system should be writing large files at over 20MB/sec so even the massive server save is at most 5 seconds, probably far less.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 03, 2018, 09:21:50 PM
Thank you for that suggestion: I have now added sync commands where sensible, and also replaced one instance of a forced shutdown with a shutdown using nettool in case this was responsible for the difficulties.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on September 05, 2018, 01:15:52 PM
The server has been down for the last 4 hours apparently.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 05, 2018, 09:31:59 PM
Thank you for the report. This seems to have been another corrupt saved game incident. I have restored from the backup, but I am not sure what is causing this.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on September 09, 2018, 10:42:48 PM
What is the value of max_diversion_tiles? I am trying to replace the bridges over Crandon station but cannot remove one of them, even though I have built a 12-tile long diversion.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 09, 2018, 11:41:32 PM
QuoteWhat is the value of max_diversion_tiles?
I think about 8-10 tiles. A diversion must also be of equal or better axel load. So for example you cannot divert a cobblestone road over Tar MacAdam road despite a higher speed limit but you can divert it over Tar MacAdam (heavy) road.

Honestly I do not like the public way system at all. It happily turns your bridges into public ways inside a city but it does not take the maintenance away from them in the process. It also is a real pain to upgrade bridges to higher tonnage as a result. It also will not let you downgrade public ways to at least the current public way type (inner city for pavemented roads, otherwise between city for non pavement).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on September 09, 2018, 11:48:39 PM
Quote from: DrSuperGood on September 09, 2018, 11:41:32 PM
A diversion must also be of equal or better axel load. So for example you cannot divert a cobblestone road over Tar MacAdam road despite a higher speed limit but you can divert it over Tar MacAdam (heavy) road.
Thank you, I am perfectly aware of that ;)

Anyway, I lost my first attempt in a crash, and my second attempt succeeded. However, whether a bridge will be removed seems a bit random at times.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 10, 2018, 01:04:28 AM
QuoteHowever, whether a bridge will be removed seems a bit random at times.
Unless the bridge itself is a diversion it will not start out as a public way. City buildings cause the ramp/span ways to become public ways if they are created in the surrounding times. If a bridge is inside a city it need not necessarily become a public way and as such can be deleted at the owner's leisure. However if it does then the annoying diversion rules apply.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on September 12, 2018, 02:39:15 PM
All the extended servers seem to be down at the moment. It is not even possible to access the server list page: http://list.extended.simutrans.org:8080/list
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 12, 2018, 02:52:12 PM
That suggests an error with the listing server, which I do not run. As a workaround, you can access thus server by typing net:bridgewater-brunel.me.uk in the load game dialogue.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on September 12, 2018, 03:06:59 PM
Thanks, the server is indeed running, I tried putting the URL but put in the https:// url which obviously didn't work.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 14, 2018, 08:35:51 AM
Cannot connect to the server. Not sure if its because people are joining or because it has crashed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 14, 2018, 12:05:15 PM
Thank you for the report. We seem to have had saved game corruption again: I have restored from the latest backup, so this should be running again shortly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 14, 2018, 12:53:07 PM
I am getting tired of losing work on this server... For every 1 hour of actual work I put in I end up having to spend 3 hours due to redoing stuff multiple times! Sigh...

This time I cannot even provide a save with all the work. It appears that you got a save made slightly before the last one I have. Which would mean the save that was corrupted is the one I have (which had only very little work done by then, easy to redo) and the server did not save after I spent some time on it.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 14, 2018, 01:01:43 PM
I am sorry that there are difficulties: without being able to reproduce the error reliably, it is extremely difficult to track down what they are. It is not at all clear to me why the saved games are so regularly becoming corrupted. I am grateful for your work in relation to the memory leak investigation, which I will look into when I get some time.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on September 14, 2018, 06:18:19 PM
If it can be of any help I have a save from last night which I at least have managed to load correctly: https://drive.google.com/file/d/19BqNZ24I_2BdHs_FQeFNUGMb9492oZbe/view?usp=sharing
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 15, 2018, 01:25:26 AM
Unfortunately it is too late by now for that. I redid most of my work on the server and many other players spent hours on it.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 15, 2018, 05:34:26 PM
Thanks to some very helpful diagnostic work from Dr. Supergood, I have now pushed two memory leak fixes and confirmed that at least most of the crashes are caused by running out of memory.

It will be very instructive to observe whether these issues are resolved after to-morrow's nightly build.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on September 16, 2018, 10:35:24 AM
As someone from Somerset I am struggling to type the name 'Bridgewater' with the 'e' when querying the server. James can you please go back in time to the 18th century and convince the duke to change the spelling of his name to 'Bridgwater'?

Thanks in advance.

(Also Bay Transportation Group's new Class A4s are too long for some of the stops on their route so everything has ground to a halt on those lines.)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 16, 2018, 01:16:57 PM
If you could send me a time machine by post, I should happily oblige.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 16, 2018, 05:18:03 PM
Could be worse... The server might be named "42726964676577617465722d4272756e656c". Now that would be hard to type!

If you are on Windows you can copy and paste the details from this thread. This is what I do when joining.

Also the extended server listing server being down is temporary. It will eventually be restored. Such is the nature of lower use base opensource "free" projects.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: prissi on September 18, 2018, 12:46:09 PM
Also SDL2 on linux could copy and paste ... at least this was added recently to stadard, file "clipboard_s2.cc"
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on September 18, 2018, 11:34:33 PM
I think I will go bankrupt soon as I accidentally built a 22km long tunnel which has put me about £3million over my credit limit. I am not sure how this is possible as I didn't have the money for this, and I was pretty certain I was holding ctrl. Also the chances of this must have been so slim as there had to be another double height slope at the same height exactly inline!

Is it possible to get some help with this debt. I don't think railway companies in the 1930s inadvertently built > 20km long tunnels. Here is a pic of the impact on my budget:

(https://i.imgur.com/PV83TS1.png)

Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on September 19, 2018, 12:15:14 AM
Unfortunately not all capital expenditure is checked against the credit limit - in fact coverage is pretty patchy. This ought to be improved.

Another feature that could be useful is if expensive purchases (above a threshold of perhaps 5% of wealth or some absolute value) were subject to an explicit confirmation dialogue to avoid accidentally spending large amounts of money (which would off further protection in the event that you the expensive purchase didn't exceed your credit limit).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 19, 2018, 01:17:42 AM
If you go bankrupt you can always join my company. Doubt there is a mistake big enough that can spend 500M in one go!

It seems the UI is slightly unrepsonsive due to the low frame rate the game works at. You might have pressed ctrl too soon before mouse release or released ctrl too soon after mouse release.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on September 19, 2018, 12:57:31 PM
The double slope is created automatically.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on September 19, 2018, 11:51:49 PM
I think I should be alright, I am almost back in credit, although I have an extra 30,000 in interest to pay each month now. I think the server save is corrupted again. I have tried loading it offline and it causes Simutrans to crash after loading finishes. I have a save from around 22:00 that works.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2) - FATAL ERROR
Post by: DrSuperGood on September 20, 2018, 02:23:31 AM
I do not think the save is corrupt, rather there is a fatal bug that manifests itself almost immediately after load. Someone will have to debug it...

Edit:
Stack trace below...
Exception thrown: read access violation.
this was nullptr.
> Simutrans-Extended Normal x64 Debug (SDL 2).exe!strasse_t::get_overtaking_mode() Line 57 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!road_vehicle_t::can_enter_tile(const grund_t * gr, int & restart_speed, unsigned char second_check_count) Line 3655 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!vehicle_t::hop_check() Line 1640 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!vehicle_base_t::do_drive(unsigned int distance) Line 372 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!convoi_t::sync_step(unsigned int delta_t) Line 1312 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!karte_t::sync_list_t::sync_step(unsigned int delta_t) Line 4661 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!karte_t::sync_step(unsigned int delta_t, bool do_sync_step, bool display) Line 4724 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!interrupt_check(const char * caller_info) Line 112 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!karte_t::step() Line 5488 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!karte_t::interactive(unsigned int quit_month) Line 10570 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!simu_main(int argc, char * * argv) Line 1384 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!sysmain(int argc, char * * argv) Line 826 C++
Simutrans-Extended Normal x64 Debug (SDL 2).exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 793 C++
[External Code]


In road_vehicle_t::can_enter_tile the local variable current_str is null.

I am guessing this is a bug with the overtaking patch. It probably only manifested itself now because someone actually bothered to use one of the many overtaking or direction limited road mechanics other than the default.

// When overtaking_mode changes from inverted_mode to others, no cars blocking must work as the convoi is on traffic lane. Otherwise, no_cars_blocking cannot recognize vehicles on the traffic lane of the next tile.
//next_lane = -1 does NOT mean that the vehicle must go traffic lane on the next tile.
const strasse_t* current_str = (strasse_t*)(welt->lookup(get_pos())->get_weg(road_wt)); // THIS IS NULL
if(  current_str  &&  current_str->get_overtaking_mode()==inverted_mode  ) {
if(  str->get_overtaking_mode()<inverted_mode  ) {
next_lane = -1;
}
}

if(  current_str->get_overtaking_mode()<=oneway_mode  &&  str->get_overtaking_mode()>oneway_mode  ) {
next_lane = -1;
}


The error appears to be that the second conditional test is not testing that current_str is non null like the first conditional test is. It can pass the first conditional test if NULL but will crash with a null pointer dereference with the second test.

In case someone wants to blame a person for it (joking, this would be more for interest) the details of which vehicle is causing the crash are below.

x = 6102
y = 3237
owner_n = 3
name_and_id = "(5015) Clydesdale horse (single)"

Apparently this was one of my horses! I have not touched that area of the map for decades...

Also the tile it was on was not a road? Very strange.

I tested the following fix and it appears to prevent the crash. If this does not cause other bugs I do not know.
// When overtaking_mode changes from inverted_mode to others, no cars blocking must work as the convoi is on traffic lane. Otherwise, no_cars_blocking cannot recognize vehicles on the traffic lane of the next tile.
//next_lane = -1 does NOT mean that the vehicle must go traffic lane on the next tile.
const strasse_t* current_str = (strasse_t*)(welt->lookup(get_pos())->get_weg(road_wt));
if(  current_str  ) {
const overtaking_mode_t current_overtake_mode = current_str->get_overtaking_mode();
if(  current_overtake_mode==inverted_mode  ) {
if(  str->get_overtaking_mode()<inverted_mode  ) {
next_lane = -1;
}
}

if(  current_overtake_mode<=oneway_mode  &&  str->get_overtaking_mode()>oneway_mode  ) {
next_lane = -1;
}
}
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 21, 2018, 07:15:56 AM
This issue has been fixed in the latest nightly. Play on the server can resume.


EDIT: I seem to be having problems remaining in sync for an extended period of time.

Yeh there is 100% an OoS bug now...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on September 21, 2018, 12:54:00 PM
Yeah normally I am losing synchronisation with the server after only 5 minutes or so.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on September 21, 2018, 02:21:48 PM
Based upon the timing, I think the two most likely causes of the desync are either something I merged from Standard, or the change in circumstances that exposed the OTRP crash could also be exposing a OTRP desync.

A good line of investigation would probably be to see if the crash can be reproduced locally (i.e. testing with both server and client on the same computer, or otherwise avoiding the main server). If it can be reproduced, then see if it can also be reproduced (from the same savegame and actions) using a build based on commit 99c2b9. That should give a probably indication of whether it is changing code or changing circumstances that have triggered the bug. If it is a change in code that is at fault, then I'd check commit 280439 (the last commit on the merge-from-standard branch before the latest merge), and if that can reproduce the desync then try bisecting the merge-from-standard commits betwen 280439 and 48bc29.

For various reasons (lack of time, lack of computing power) I can't easily investigate this myself, but perhaps those suggestions are of some help.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on September 21, 2018, 03:01:59 PM
QuoteA good line of investigation would probably be to see if the crash can be reproduced locally (i.e. testing with both server and client on the same computer, or otherwise avoiding the main server).
There is no crash... It just out of syncs after a while (30-300 seconds).

Did the OoS from power nets get fixed?

Another approach would be a debug functionality build which every frame forces a hash check and dumps a listing of hashes of all objects on the map every frame. When an out of sync occurs, the listing from the client and server for the same frame could be programmatically compared and the object(s) that went out of sync detected. As this happened as quickly as possible the divergence should be minimal so I would imagine only a dozen or so mismatched objects being detected.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on September 21, 2018, 08:57:08 PM
Quote from: DrSuperGood on September 21, 2018, 03:01:59 PMThere is no crash... It just out of syncs after a while (30-300 seconds).

Wherever I wrote 'crash', pretend I wrote 'desync'.

And your suggestion also sounds feasible.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Junna on September 27, 2018, 02:45:36 AM
Yeah, it's impossible to stay connected for more than a few minutes now...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: prissi on September 27, 2018, 04:40:15 AM
Did Experimental now contain the overtaking patch? I though that was not network save.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on September 27, 2018, 08:31:06 AM
It does, and I do remember that discussion, although I haven't yet reread it. This possibly adds another reason to consider just removing that feature and waiting for it to be done (or doing it) properly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 27, 2018, 10:43:53 AM
I have noted this issue. I will have to undertake some investigation over the week-end, including trying to find a way of testing old and new versions of the code with the same saved game (which will have to be prepared specially by being manually saved to an older version). I will note in particular the potential issue relating to the overtaking patch, and reversion will have to be considered if this is indeed the culprit and the author of that patch is not able to fix it within a reasonable time.

Has anyone noticed desync problems on other servers? It is possible that the issues on the Bridgewater-Brunel server arise as a result of the increase in road traffic owing to the era, which might well implicate the overtaking patch, although further testing would be needed to confirm this.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: TurfIt on September 27, 2018, 03:32:54 PM
I don't recall any particular remaining network safety issues in the last version I looked at before the author stated they would no longer work on it - v12. Issues were more usability, code duplication, unfinished code (TODOs left), reversion to undesirable vehicle behaviours, and some features that I couldn't make work as they were described - e.g. signs for 'lane pinning'. The latter could indicate bugs of an undefined behavior sort, or simply misunderstanding of what was supposed to happen, but I couldn't match the videos that were posted...
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on September 29, 2018, 09:04:57 PM
Please note that, although this server is still running, it is temporarily running an archived saved game for testing purposes. Changes made to this game will not be permanent. Please see this (https://forum.simutrans.com/index.php/topic,18476.new.html#new) thread for details.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on October 06, 2018, 12:23:34 PM
Due to ongoing issues with players being unable to remain in synchronisation with the server, the server is now running for testing purposes only until further notice. Progress will not be saved.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: passengerpigeon on February 28, 2019, 01:04:34 AM
Dear Jamespetts,
I have recently returned to Simutrans after another hiatus, and can say that this is certainly an intriguing server even if it is only in testing mode. One thing I am curious about is the history behind the map: right now, in 1954, there are four fragmented railway services and a whole load of mothballed/degraded track. Strangely, almost all of the track seems to have degraded in 1940; did a big company go bankrupt in that year? Also, since you haven't updated this thread in a while, I was wondering whether you have made any progress in the meantime getting the server back to a playable state, in terms of saving progress.
Thank you,
Passengerpigeon.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on February 28, 2019, 01:17:45 AM
I am making very slow progress in trying to fix the problem (and have been working on this this evening): see here (https://forum.simutrans.com/index.php/topic,18476.new.html#new) for details.

The mothballed track is because a large number of companies were manually liquidated to narrow down the fault when testing. An original saved game from the game year 1940, when the live version of this game was stopped, has been saved and will be reinstated when the problem is fixed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 10, 2019, 11:15:09 AM
This server is now online again after the loss of synchronisation problem has been fixed.

I suggest that those who wish to continue playing log in and claim their slots quickly, as I believe that I did not backup the password hashes. Please let me know by PM if somebody else has claimed the password on your company so that I can reset it.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on March 10, 2019, 12:59:33 PM
Finally, I've missed this server! Then I would like to reiterate my request for increasing max_choose_route_steps if you don't mind. :D
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 10, 2019, 03:10:30 PM
My company "Royal Western" needs a password reset. Someone I do not know has claimed it.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 10, 2019, 03:13:43 PM
Thank you for letting me know. I am currently out of the house, and I do not know of a way of doing this with an Android device: I will do this when I get home this evening.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 10, 2019, 03:21:52 PM
QuoteThank you for letting me know. I am currently out of the house, and I do not know of a way of doing this with an Android device: I will do this when I get home this evening.
No problem. I just wish people would not claim what is not theirs (they probably took it because it had the most money).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on March 10, 2019, 06:51:50 PM
Fantastic that it is back!
I was playing on it with one more player, and I believe the server crashed for some reason. It is not possible to log back in now since 10-15 minutes
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: NoMorePacers on March 10, 2019, 06:57:45 PM
I was also playing on the server, and I lost synchronisation (although I suspected this to be due to my fairly slow internet) and I can access the server, but it is paused.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: NoMorePacers on March 10, 2019, 07:04:03 PM
I have actually managed to regain access to the server and it is running for the moment.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on March 10, 2019, 08:58:48 PM
James, you might want to remove the "DEBUG1_LNER-Gr....." -car from the pakset, now that it is not needed any more!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 10, 2019, 10:33:08 PM
I have now unlocked Royal Western - apologies for not having been able to do this sooner.
I have already removed the debugging carriages, which should take effect from to-morrow's nightly build.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 11, 2019, 12:13:44 AM
Server might have just crashed when I tried to join. Loaded in fine but instant drop to OoS after a few minutes of waiting for server.

EDIT: After speaking with James we came to the conclusion that the server is performing quite poorly due to a lack of memory. This may or may not be related to the crash but does mean it is running quite slow.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 11, 2019, 01:29:31 AM
Some instability has been noted. It is suspected that this may be due to high memory usage (~95%); I will monitor the situation and may need to upgrade my hosting plan. The usage does not seem to be referable to a memory leak.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on March 11, 2019, 01:55:58 AM
95% would be moremeaningful if you tell us what it is out of (or what the actual value is). Then we could compare it with usage elsewhere - e.g. the approximately 6GB I remember using in a debug build (though some of this could probably be swapped out most of the time).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 11, 2019, 05:25:14 AM
Quote95% would be moremeaningful if you tell us what it is out of (or what the actual value is). Then we could compare it with usage elsewhere - e.g. the approximately 6GB I remember using in a debug build (though some of this could probably be swapped out most of the time).
The server has 6GB of memory. The game is running at over 5.2GB which does not leave much free on the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: passengerpigeon on March 14, 2019, 05:49:41 AM
Dear James,
What is the map number used by the server? I am looking to start a new singleplayer map but am not generally fond of the default generator, which for some reason produces weird fractal patterns with many map numbers. Alternatively, what are some other good map presets or player-made heightmaps that I could use?
Thank you,
Passengerpigeon.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 14, 2019, 11:38:42 AM
I am afraid that I cannot recall the number used now as I did not take a note of it. The map generator could perhaps do with being improved one day, but that would be a big project, and it is a long way down the list of priorities.

If you play with the settings and generate enough random maps, you should be able to find something suitable in due course: that is how I generated this map.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 14, 2019, 05:15:56 PM
I have received notification from my hosting provider that, owing to maintenance, there may be some downtime in the late evening of the 28th and small hours of the 29th of March 2019. This might temporarily interrupt play on this server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 14, 2019, 09:32:02 PM
QuoteI am afraid that I cannot recall the number used now as I did not take a note of it.
It is saved (part of save file) to allow extension at the boarders later. Unless Extended removed this functionality or diverged before it was added of course.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 14, 2019, 11:56:37 PM
Quote from: DrSuperGood on March 14, 2019, 09:32:02 PM
It is saved (part of save file) to allow extension at the boarders later. Unless Extended removed this functionality or diverged before it was added of course.

I have not altered this functionality in Extended.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: NoMorePacers on March 17, 2019, 07:25:03 PM
I have updated to the latest version of the game, and I have tried to join the server, but the game says there is a mismatch, and that DEBUG1_LNER-Gresley-Express-Brake-front, DEBUG1_LNER-Gresley-Express-Brake-rear, DEBUG1_LNER-Gresley-Express-Coach and DEBUG1_LNER-Gresley-Express-Dining are all missing.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on March 17, 2019, 07:27:26 PM
Did you update your pakset?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: NoMorePacers on March 17, 2019, 07:30:49 PM
Quote from: Rollmaterial on March 17, 2019, 07:27:26 PM
Did you update your pakset?
I downloaded the full package (executables + pakset) but this problem has still occured.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on March 17, 2019, 07:49:13 PM
Those were debug vehicles added during early stages of debugging the recent desync, and were recently removed from the pakset. The error you're getting means that either you or the server haven't updated the pakset properly - you've just copied the new files into the old folder, which won't delete any files that no longer exist. Look for files with names beginning with "vehicle.DEBUG1_LNER-Gresley-Express", and delete them from your pak folder if they exist. (And in future, remember to delete the old pak files and extract into an empty folder.)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on March 17, 2019, 07:49:57 PM
Quote from: NoMorePacers on March 17, 2019, 07:30:49 PM
I downloaded the full package (executables + pakset) but this problem has still occured.
In case you did not do this, make sure you dont just "merge" the new pakset you downloaded with the old one, since there are some files that might not get removed properly. The DEBUG_ vehicles are not supposed to be in the pakset, but they might be in an elder version of the pakset, so best is to completely remove the old one before installing the new one.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: NoMorePacers on March 17, 2019, 08:42:25 PM
I have done this and am now on the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on March 18, 2019, 12:16:29 AM
I suggest using my Java updater to avoid this problem. It also deletes file to mirror changes to the pakset.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on March 20, 2019, 12:23:14 AM
James, you can use the terminal for long distance busses, and the through stops for short distance busses **** you please!
Will have to go to bed now, but will complete it tomorrow and spend some new airplanes!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 20, 2019, 01:32:18 AM
I should note that I am having some no route issues with these stops. This might be a bug, but it takes about half an hour to load the server game in my debug build and I also must go to bed now.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on March 20, 2019, 09:28:41 AM
The stops are with the overtaking mode set to parallel mode, so you should enter from the north side only. Or would you prefer normal 2 way mode instead?

Skickat från min ONEPLUS A6003 via Tapatalk

Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 20, 2019, 09:46:42 AM
Quote from: Ves on March 20, 2019, 09:28:41 AM
The stops are with the overtaking mode set to parallel mode, so you should enter from the north side only. Or would you prefer normal 2 way mode instead?

Skickat från min ONEPLUS A6003 via Tapatalk



The ones with which I am having trouble are the dead-end stops rather than the straight through stops. It might be helpful to test whether turning off the parallel mode makes a difference to this. The other thing that it might be worth testing is whether the choose sign is the cause of the problem.

However, I do not think that we do need a non-standard mode for the 'bus stops - I cannot imagine running a 'bus every two minutes or anything like that.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on March 20, 2019, 07:13:42 PM
Hello, may I register an interest into operating a transport company on your map?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 20, 2019, 07:36:08 PM
Yes, certainly. Just log in, find an open slot (i.e. one with no company registered) and set up a new company.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 21, 2019, 11:40:02 AM
The server listing appears to be down at present. To log into the server manually, open the load game dialogue, and type net:bridgewater-brunel.me.uk
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on March 23, 2019, 02:05:28 PM
Looks like the server hasn't updated.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on March 23, 2019, 09:16:31 PM
It keeps crashing everytime I want to load it :(
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 23, 2019, 11:56:07 PM
Is it your copy that crashes, or is it the server?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on March 24, 2019, 12:13:46 PM
Is anyone else finding that the server doesn't un-pause when a new player joins? I am finding that the game saves and then and reloads the map but then never seems to un-pause. If i disconnect and rejoin then I often find time has progressed since when the server paused for me.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: NoMorePacers on March 24, 2019, 02:20:58 PM
Quote from: SuperTimo on March 24, 2019, 12:13:46 PM
Is anyone else finding that the server doesn't un-pause when a new player joins? I am finding that the game saves and then and reloads the map but then never seems to un-pause. If i disconnect and rejoin then I often find time has progressed since when the server paused for me.
I am on the server right now and the game is unpaused (although it intermittently pauses from time to time).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: fam621 on March 24, 2019, 06:03:39 PM
Quote from: jamespetts on March 23, 2019, 11:56:07 PM
Is it your copy that crashes, or is it the server?

Server
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on March 30, 2019, 10:58:11 AM
I am having trouble with the server this morning. When I connect the server doesn't unpause and after a period I lose sync with the server without it ever unpausing
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 30, 2019, 12:36:24 PM
Thank you for your report. This appears consistent with the server running low on memory; I am in the process of looking into upgrading the server and will hopefully deal with this shortly. My apologies that you are having trouble.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on March 30, 2019, 01:27:42 PM
No worries James. Is the server run on a local machine? If so I have just bought some new RAM for my PC so I potentially have 2 x 4Gb DDR4 sticks I could send you if that helps with running the server?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 30, 2019, 02:56:10 PM
Quote from: SuperTimo on March 30, 2019, 01:27:42 PM
No worries James. Is the server run on a local machine? If so I have just bought some new RAM for my PC so I potentially have 2 x 4Gb DDR4 sticks I could send you if that helps with running the server?

Thank you for the offer, but this is run on a VPS, so I am afraid some physical RAM will not assist. It is kind of you to offer, however.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Spenk009 on March 30, 2019, 04:40:51 PM
Is there anything the community can do for you? Maybe a more premium plan aided by the people who follow and root for you?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 30, 2019, 05:00:50 PM
It is more a matter of time in getting it sorted out - do I understand that it now fails consistently at every login attempt?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 30, 2019, 05:04:39 PM
The server tells me that it crashed most recently with a segfault, and that memory usage is currently at 92.5% for the Simutrans-Extended process alone.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 30, 2019, 11:00:30 PM
I am able to get into the server having just tried now. The issue appears to be intermittent. The difficulty is that I am not entirely sure that it is lack of memory; there are, as noted above, some segmentation faults reported, but I have never been able to reproduce these in a debugging environment.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on March 31, 2019, 10:54:00 AM
I have just ordered an upgrade from the hosting provider which will increase the available RAM from 6GB to 8GB. Whilst it is not entirely clear whether all the crashes are memory related, the server is clearly struggling with low RAM, and there are plans to make changes that might increase RAM consumption, so this is likely to be worthwhile even if the crashes are caused by something else. If they are caused by something else, this upgrade should confirm that.

There might be a short period of downtime while the server updates to the new settings.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 01, 2019, 12:27:29 AM
The server is up and running again now. It seems more responsive from the command line at least.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 04, 2019, 06:43:55 PM
Since it's now 1948 are we all nationalised and James will take charge of all our companies?  ;)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 04, 2019, 09:36:09 PM
Happily, we simulate an alternative reality where this did not occur!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 06, 2019, 08:46:13 AM
I'm not sure if it's a bug or a feature but every company seems to have taken a massive hit in passengers over the last two in game months.

(https://i.imgur.com/dSL5Ljo.png)

As you can see here passenger numbers have dropped to less than 20% of their amount two months ago (it is nearly the end of the current month).

(https://i.imgur.com/FILJjk9.png)

Here is another company to show its not just me experiencing this.

I know that a rise in car traffic is intended to be simulated around this time, but this seems a bit over the top.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 06, 2019, 11:05:19 AM
Thank you for your report. I have identified t hat this is caused by a bug which prevents any passengers from being generated at all. I have now fixed the bug, and am about to restart the server to update it to the fixed version. My apologies.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 06, 2019, 05:11:17 PM
Oh, that was good news for basicly all transport companies on the server!  :D
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 07, 2019, 12:27:28 PM
It appears as if the server is down. It doesnt show up in the (just restarted) server listing dialog, and can also not connect via the load game dialog.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 07, 2019, 02:25:45 PM
There was a problem with the path explorer data saving: I have fixed the problem (I think - it is hard to test this comprehensively), updated the server to the fixed version and rolled back to a backup save that was not corrupt. The server should be back very shortly.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 07, 2019, 04:44:06 PM
Looks like the server crashed again.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 07, 2019, 04:55:35 PM
I have been working for the last few hours on trying to fix this - the work remains in progress.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 07, 2019, 05:03:26 PM
Okay, thank you for the update!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 07, 2019, 06:21:13 PM
I believe that I have fixed this now. As before, the bug would have caused saved game corruption, so I have had to restore the saved game from a recent backup. The server is in the process of rebuilding/restarting now.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 10, 2019, 06:09:03 PM
The server seems to be a lot quicker to unpause when joining. However I am finding a that it doesn't unpause for me when another player is trying to join, I am guessing that this is causing me to lose sync but the server doesn't boot me out. In this case I would leave the server and rejoin, but presumably someone else is having the same issue as after I rejoin after a couple of minutes someone attempts to join again causing the game to save and then not unpause. 
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 10, 2019, 06:13:01 PM
The long time when someone else is connecting is due to the sheer size of the save (~500 MB). Therefore I would like to ask the other players: what download speeds do you typically get?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 10, 2019, 06:19:51 PM
I usually get about 170Mbs from my ISP, and when I join the server it probably takes about 2 mins at most, the longest part being calculating paths. 
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 10, 2019, 06:23:37 PM
Sorry SuperTimo, that would be me! I am currently attempting to join the server since a bunch of minutes now.
If I understand the information right, I should have 100Mbps.
However, looking at the task manager, it is very very very lazy with its workload. Mostly it runs with 0, but every 10-15 seconds it generates a spike at 40kbps.
Is there anything I can do to speed it up?

For instance, interacting with this forum, it instantly creates a spike at >100kbps (the scale only goes up to that).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Rollmaterial on April 10, 2019, 06:26:59 PM
I seem to be experiencing the same as Ves as I have now observed occasional spikes of to 30 Mb/s while remaining in the 10-15 Mb/s range most of the time.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 10, 2019, 06:28:52 PM
Joining the swedish servergame which is on another server immediatedly sends the graphs to >100kbps until the loading cycle is done and the game is established, so it is something with bridgewater-brunel server specifically.

I stopped the joining proces also now since it takes ages..

edit:
This time joining, it was much better, going from 6-8mbps and topping at around 22mbps.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 10, 2019, 09:31:39 PM
Can I ask all of those who are having trouble with connecting to check whether their ISPs have any sort of traffic shaping policy or similar? I have not ever had this problem when connecting (I use Zen in the UK, which is a well reputed ISP), and the server is not self-hosted, but remotely hosted in the UK.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 14, 2019, 09:06:13 AM
I'm having some trouble connecting to the server this morning. I am able to load in but then lose synchronisation immediately. I tried downloading the full package of the nightly build but that has not helped.

In addition this I ran the server save offline for a while which caused a crash to desktop after a couple of minutes, not sure what the cause of that was though.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 14, 2019, 09:27:25 AM
Thank you for the report. Can I ask whether you were able to remain connected successfully yesterday?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 14, 2019, 09:35:11 AM
Yesterday I was connected for long periods although I did suffer de-sync occasionally. 
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 14, 2019, 09:40:24 AM
Quote from: SuperTimo on April 14, 2019, 09:35:11 AM
Yesterday I was connected for long periods although I did suffer de-sync occasionally. 

When did you first notice the occasional loss of synchronisation?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 14, 2019, 10:14:16 AM
I am not really sure, I don't recall it happening with any kind of consistent periodicity. I would be working on something and then suffer de-sync but be able to rejoin the server quickly, probably happened around three times. I was on the server until around 16:00 yesterday so not sure how it was after that.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 14, 2019, 10:16:47 AM
Quote from: SuperTimo on April 14, 2019, 10:14:16 AM
I am not really sure, I don't recall it happening with any kind of consistent periodicity. I would be working on something and then suffer de-sync but be able to rejoin the server quickly, probably happened around three times. I was on the server until around 16:00 yesterday so not sure how it was after that.

I mean - on which day did it first start to occur?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 14, 2019, 10:21:03 AM
I think I de-synced once on Friday, but I only noticed it occurring multiple times yesterday.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 14, 2019, 10:53:38 AM
Quote from: SuperTimo on April 14, 2019, 10:21:03 AM
I think I de-synced once on Friday, but I only noticed it occurring multiple times yesterday.

Thank you for the information.

These issues can take an extremely long time to solve. I have been able to reproduce the issue. I have pushed a fix for the crash, which may or may not be related: you will need to download a new version of the build from the server to connect.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 14, 2019, 11:51:43 AM
Thanks for the quick turnaround. The crash seems to be fixed but I am still unable to connect to the server without losing sync immediately.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 14, 2019, 11:54:58 AM
Quote from: SuperTimo on April 14, 2019, 11:51:43 AM
Thanks for the quick turnaround. The crash seems to be fixed but I am still unable to connect to the server without losing sync immediately.

I have pushed another attempted fix - but this also fails.

This looks to be another major problem, which may take another 6 months to fix, during which there will be no possibility of any further development and the online game will not be playable.

If anyone is able and willing to assist with testing, that would be most helpful. One of the difficulties in testing is that the saved game is so large that it takes an extreme amount of time to run each testing cycle, and many scores or even hundreds of testing cycles are necessary to narrow down the problem.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 15, 2019, 05:28:04 PM
I can try and do some testing if necessary. Presumably the server will need reverting back to an old save first though, since at the moment it is impossible to stay in sync at all.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 15, 2019, 05:32:30 PM
One test would be, after backing up the current saved game, simply to liquidate your company to see whether that makes the problem go away: that should help to narrow it down considerably.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 15, 2019, 05:40:50 PM
I have now backed up the saved game and deleted your company on the live game. I should be grateful if you could log in and re-test, since I have insufficient memory on the computer that I have with me at present to log into this game successfully.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on April 15, 2019, 06:26:01 PM
James: since you're editing the game now, could you provide a link to a version of the save which is known to trigger desyncs?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 15, 2019, 06:51:02 PM
Quote from: ACarlotti on April 15, 2019, 06:26:01 PM
James: since you're editing the game now, could you provide a link to a version of the save which is known to trigger desyncs?

Certainly: here (http://bridgewater-brunel.me.uk/saves/server13353-network-april-2019-pre-test-backup.sve) is a copy.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 15, 2019, 08:19:58 PM
I tried to connect a couple of times, it seems my company is still there though. As such I still de-sync almost immediately after joining.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 15, 2019, 08:51:40 PM
Thank you for trying. For some reason, the command to liquidate the company seems to have failed. I am not sure what might have caused this.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 16, 2019, 01:14:01 PM
Got a desync immediatedly after joining right now. Which company was yours Super Timo? There are three free slots at the moment.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 16, 2019, 09:48:59 PM
I also desync soon after joining. As joining takes 5+ minutes or so I have not tried it much.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 16, 2019, 09:50:13 PM
I note that the liquidation did not succeed for reasons as yet unclear; I will not be able to look into this until I return home next week.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on April 17, 2019, 04:42:25 PM
Quote from: Ves on April 16, 2019, 01:14:01 PM
Got a desync immediatedly after joining right now. Which company was yours Super Timo? There are three free slots at the moment.

My company is the Great Highland Railway.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Vladki on April 17, 2019, 09:03:07 PM
I have tried with linux, but the game is not playable on my computer. It requires 10 GB of RAM, and I have "only" 8 GB. When it finally loaded it disconnected immediately. But I would guess it was mostly due to high swapping, that my computer could not keep up with the server. I remember that during the previous desync debugging I was able to connect and play just fine. Did the game advance so much that it requires much more memory, or was there any significant change in code?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 17, 2019, 09:09:21 PM
Quote from: Vladki on April 17, 2019, 09:03:07 PM
I have tried with linux, but the game is not playable on my computer. It requires 10 GB of RAM, and I have "only" 8 GB. When it finally loaded it disconnected immediately. But I would guess it was mostly due to high swapping, that my computer could not keep up with the server. I remember that during the previous desync debugging I was able to connect and play just fine. Did the game advance so much that it requires much more memory, or was there any significant change in code?

I have not been able to connect with my 8Gb Linux computer for some time. However, the path explorer data saving may have increased memory consumption. I will have to investigate possible inefficiencies there when I get a chance, but that will be a significant amount of work, so will have to compete with all the other high priorities for my very limited time unless someone else is able to look into this first.

It is notable that you disconnect straight away even with Linux - that suggests that the problem is not platform specific as it was with the last error.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: ACarlotti on April 17, 2019, 09:16:00 PM
I have been able to reproduce the desync locally, which should make it easier to invesitgate. It also seems to be using nearer 8GB on my computer (I think slightly less), and I'm able to comfortably run a c;ient and server with 16GB of RAM.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 18, 2019, 02:07:48 PM
I am now connected to the server for several minutes (perhaps 15 or so) without any dissync!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 18, 2019, 03:34:57 PM
Quote from: Ves on April 18, 2019, 02:07:48 PM
I am now connected to the server for several minutes (perhaps 15 or so) without any dissync!

Excellent - thank you for letting me know. A. Carlotti's fix (documented on the other thread) seems to have succeeded.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on April 18, 2019, 03:40:43 PM
Well indeed it does! I am still connected to the server so it indeed seems fixed! Thank you James and ACarlotti!

Will you reinstate the build from 15/4 or should we just continue on this one online now?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 18, 2019, 08:27:35 PM
I have now restarted the server with the backed up saved game so that play on this server can continue following the fixing of the loss of synchronisation error.

My apologies for the disruption, and thanks again to A. Carlotti for the fix.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 22, 2019, 01:21:38 PM
At ~600MB the server save is getting a bit ridiculous to join. That is over 60 seconds download time on my 10 MB/sec internet connection. Good luck with a slower connection speed!

I have a feeling the trade off in increased load speed for saving the connection information might not be worth the ~6 times increase to file size.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 22, 2019, 01:27:38 PM
Quote from: DrSuperGood on April 22, 2019, 01:21:38 PM
At ~600MB the server save is getting a bit ridiculous to join. That is over 60 seconds download time on my 10 MB/sec internet connection. Good luck with a slower connection speed!

I have a feeling the trade off in increased load speed for saving the connection information might not be worth the ~6 times increase to file size.

Can I ask whether the overall joining time (taking into account the "calculating paths" time previously) for you is now more or less than it was before the path explorer data saving was introduced? For me, it is significantly less, but I get the impression that this might not be so for you?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on April 23, 2019, 05:22:49 AM
I did not really notice much of a difference. Before rebuilding all the paths took a very long time. Now the server saving (compressing many GB of data) and transmitting (~60 seconds for me) is extremely long. Unfortunately I do not have timing data for either case.

However in the process you might have pushed the server out of sensible reach for many people. I have a 10 MB/sec internet connection which might not be the fastest but is still faster than a lot of people even here in the UK. My old internet connection, which I used to join the previous bridge water server game before double heights and such, was only around 0.3 MB/sec. On such slow connection it would take 30 minutes to join the current server, instead of the ~6 minutes it took before the change. For such people this is a massive increase in joining time since even a slowish computer could probably recalculate all that stuff in 24 minutes.

Unfortunately it is getting to the point that maybe the server game map size was a bit too ambitious. If it were reduced by 3/4 of the size it would still be ~200MB odd which is more reasonable to join and a lot of other things including memory usage would be a lot better so even the server would be struggling a lot less.

In the long term maybe a state streaming model is needed for maps of this complexity, similar to FPS games where by the server calculates everything and streams a view to the players. This would lower joining time massively to just a few seconds for even the most complex maps.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on April 23, 2019, 09:58:26 AM
Thank you for your feedback. What I really need to know in order to decide whether to disable path explorer data saving in relation to the server game is whether, on average and overall, joining is now faster or slower, otherwise reverting this may make things worse (on average and overall) rather than better.

As to the size of the server game: the eventual data size is difficult to predict for any starting map size without actually attempting to start at any given time. What matters, of course, is not the size of the map in tiles but the quantity of towns and player transport infrastructure. Once this map reaches a few years beyond the present day, I intend to make the next map somewhat smaller in size (~400-500 towns instead of 760 as in the current map), which should help matters. I notice that there are still, by 1951, large areas of the map not reached by transport networks, suggesting that the number of players interested in playing this game and able to join the server is less than the number of players needed to develop a map of this size fully, suggesting that a moderately smaller map would still give ample scope for enjoyment.

However, I do want a map physically large enough to make air transit and shipping interesting.
Title: Re: Crashes on the server
Post by: ACarlotti on May 10, 2019, 12:14:14 AM
Quote from: DrSuperGood on May 09, 2019, 03:26:25 PM
Server is instantly crashing upon resuming after a join. The client I joined with then crashes (no error message, straight out closes) soon after.

Segmentation fault. In line 1337 in path_explorer.cc, it is trying to access connexion_list[3].connexion_table, which is a null reference (connexion_list[3] is all zeroes). This is in the search for category 6, which is long goods.

I don't know why that's happening yet, but I have noticed that path_explorer uses (in various places) 63336, 65536 and 63356. I think they were all intended to be 65536. I don't think this is the cause of the crash though (since I'm pretty sure there aren't that many halts or convoys in use).

EDIT: I'm not sure why the forum did this - my reply appeared against the original thread with the new threads title, and it doesn't give any warning if the post you are replying to has been moved. This post should be moved to the appropriate thread.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on August 03, 2019, 08:41:45 PM
I might not be able to maintain my company for a while. A PSU issue killed my Motherboard or CPU and so I have had to revert to a spare with only 4GB of memory. I cannot port the memory to it because of compatibility issues (DDR3 V DDR2). This might take a few weeks to fix or I might have intermittent access to systems with more memory to play a bit on.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: SuperTimo on August 17, 2019, 10:58:19 AM
Has the sever been down for the last couple of days? Every time I try to connect it fails to respond.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on August 17, 2019, 11:13:07 AM
It seems to be constantly crashing and restarting. On http://list.extended.simutrans.org:8080/list , it never seems to be more than 2 minutes since the last announce (normally expected every 15 minutes).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on August 29, 2019, 06:21:50 PM
I can now play again however I cannot seem to join the server, with it appearing constantly down last time I tried. I will try again later.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on October 24, 2019, 07:33:03 PM
The server (and the VPS/whatever it runs on in its entirety, judging by the web server not responding) seems to have been down for more than 24 hours now.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on October 30, 2019, 11:44:34 PM
The server now no longer displays on the server list. I remember before it went down that line statistics started to inflate, eg. distance traveled, passengers, earnings etc - which suggests something was wrong with the timing/simulation.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on October 31, 2019, 01:47:03 PM
Quote from: freddyhayward on October 30, 2019, 11:44:34 PM
The server now no longer displays on the server list. I remember before it went down that line statistics started to inflate, eg. distance traveled, passengers, earnings etc - which suggests something was wrong with the timing/simulation.
I personally doubt it's related to that, considering that the web server is down too.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on November 11, 2019, 10:28:48 AM
My apologies for not having looked into this previously: as many here may know, it is very difficult for me to work on Simutrans-Extended at present as I am awaiting parts to replace my faulty computer, which is currently very difficult to use and does not have enough RAM to run the Bridgewater-Brunel server game.

I looked at the server and noticed that the instance of Simutrans-Extended seems to have been running since the 23rd of October without any activity (e.g. backups); nettool could not connect to it. It would not stop the process even with the simctrl script. I have now rebooted the server entirely; I should be grateful if people could check whether this has helped.

I am afraid that I cannot test for a bug that may be causing the server to freeze with the latest saved game stored there, as I am unable to run this until I replace my computer, hopefully at the end of this month.

Edit: I also notice an issue with the domain name: the server does not appear to recognise its own domain name: running "ping bridgewater-brunel.me.uk" on the server yields an "unknown host" error.

As a workaround, players might attempt to connect with the command net:46.32.231.222 in the load game dialogue (typed in place of a filename there) to see whether the domain name issue was responsible.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Mariculous on November 11, 2019, 11:47:22 AM
Quoteplayers might attempt to connect with the command net:46.32.231.222 in the load game dialogue

You could also enter 46.32.231.222 instead of bridgewater-brunel.me.uk into the normal network dialog.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on November 11, 2019, 06:37:26 PM
Directly connecting to the IP address works (although the game is frozen in August 1999, around the time when the server stopped responding. I'll update later on if it changes.)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on November 12, 2019, 01:01:43 AM
Is it frozen in the sense that the game is paused and will not unpause, in the sense that it has reverted to an earlier time period than the latest available, or that Simutrans-Extended becomes unresponsive after connecting to the server?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on November 12, 2019, 01:53:07 AM
I have got it to work today without any major issues.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on November 12, 2019, 01:23:44 PM
The game eventually unpaused as usual, it just took a while.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on November 12, 2019, 08:30:03 PM
Splendid, thank you for confirming.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on November 25, 2019, 04:05:10 AM
For me the server only seems to be online for the last 10 minutes of every hour, so I suspect long and repeated autosaves are the problem. IMO, autosaves should only occur at game-time (say, per month) rather than real-time intervals. On a related note, is there no way to sync clients without reloading each time a new client joins or a desync occurs?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on November 25, 2019, 02:58:49 PM
The in-game autosave feature is disabled, but it is set to run a save/load cycle every hour if no player has joined (thus triggering a save/load cycle) within the last hour.

If a save/load cycle takes 50 minutes, then the saved game is too large to be dealt with reasonably by the server, unless there is some error causing an additional delay; but I cannot test this properly at present until I am able to replace my computer.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on November 25, 2019, 04:27:28 PM
If it is taking 50 minutes to save/load cycle that really is not practical for anyone but the most devote player to use. A new server game might be recommended in such situation, possibly one with 25% less area so that memory usage is less of a problem for the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on November 25, 2019, 05:02:42 PM
Quote from: DrSuperGood on November 25, 2019, 04:27:28 PM
If it is taking 50 minutes to save/load cycle that really is not practical for anyone but the most devote player to use. A new server game might be recommended in such situation, possibly one with 25% less area so that memory usage is less of a problem for the server.

Indeed - although we would need to verify that this is the case before making such changes.

However, as I have mentioned before, land area per se has very little on either memory or CPU usage; it is the number of town buildings and quantity of transport infrastructure that has this impact. It is better to have a more spread out map (with local clusters of towns) where long distance transport can occur alongside local transport than have a more concentrated map of homogeneous density. Reducing the rate of town growth might well be worthwhile to prevent excessive load, but this is likely to be very challenging to calibrate.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on November 25, 2019, 10:00:42 PM
Issues with the savegame itself aside, wouldn't it still be far better to use in-game intervals for load/save cycles? This would guarantee some level of progression between each cycle. There is little use in autosaving when nothing has happened.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on November 26, 2019, 03:17:37 AM
Quote from: freddyhayward on November 25, 2019, 10:00:42 PMIssues with the savegame itself aside, wouldn't it still be far better to use in-game intervals for load/save cycles? This would guarantee some level of progression between each cycle. There is little use in autosaving when nothing has happened.
The problem is that it must complete a save/load cycle every time someone joins. If someone tries to join, anyone already in the game would have to wait 50 minutes before they can start playing again. Most people will give up by that time.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Mariculous on November 26, 2019, 04:58:22 PM
I guess I had the same issue far less extreme on my server.
Due to the smaller map, loading times were -sometimes- around 10 minutes. However, on the same machine, most times it was much faster, around 30s.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on November 26, 2019, 06:24:19 PM
I should note that the 50 minutes time given is unconfirmed based on the report of the server being available only 10 minutes in any given hour. 10 minutes is still too slow - but 30 seconds is acceptable. It is unclear at the present what might be causing such large fluctuations.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on November 26, 2019, 08:47:04 PM
Quote from: jamespetts on November 26, 2019, 06:24:19 PM
I should note that the 50 minutes time given is unconfirmed based on the report of the server being available only 10 minutes in any given hour. 10 minutes is still too slow - but 30 seconds is acceptable. It is unclear at the present what might be causing such large fluctuations.
I would doubt it is actually 50 minutes - when already connected, the server usually unpauses at ~30 minutes past the hour. The 50 minutes I observed could be due to additional crashes or other clients attempting to join.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 17, 2019, 01:43:01 AM
As discussed here (https://forum.simutrans.com/index.php/topic,19048.msg182785.html#msg182785), I have finally put together my new computer and have just this evening set up my Simutrans-Extended development environment.

Some brief testing shows that increasing the number of threads increases performance noticeably for systems that have the requisite number of cores. The server actually has 6 cores available, so I have increased the number of concurrent threads on the server from 4 to 6. This change should take effect with to-morrow morning's restart.

I have also made some other experimental changes for performance. I have increased the server_frames_between_steps setting from 4 to 16 (an increase of a factor of 4). This is to allow a higher framerate and more a responsive interface without overloading players' computers. I have also increased the framerate setting from 10 to 30, which hopefully will be workable given the previous setting change.

I should be grateful for any feedback on these updated settings, which will be applied on to-morrow morning's restart.

I should note that, even testing with my new computer in single player mode, a saved game from the server in the summer seems somewhat slow with the release build and unplayable with a debug build, so it may be that furutre server games may need to be smaller (in terms of the number and/or size of towns rather than in overall map area, as it is buildings and player networks that generate the most CPU load).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Mariculous on December 17, 2019, 03:03:23 PM
Sorry, I just crashed the server by connecting to it :/

edit: seems to be up again but won't try again.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on December 17, 2019, 05:35:33 PM
The updated settings seem to be causing my client to crash to desktop (when the server 'comes to life') without any error message. I run on a Core i5-3450 with 24GB RAM if that information is of any use to you.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 17, 2019, 06:10:10 PM
Interesting - thank you for your reports.

Can I check whether you are able to connect without crashing if you manually edit simuconf.tab and set "threads=6"?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on December 17, 2019, 06:43:54 PM
Setting threads to 6 does work. As for performance, scrolling through the map is a lot smoother, but the game itself seems to run a lot slower. (vehicles move for a few seconds, then it idles for a couple of seconds, then it starts to move, rinse and repeat)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 17, 2019, 06:57:25 PM
Quote from: CK on December 17, 2019, 06:43:54 PM
Setting threads to 6 does work. As for performance, scrolling through the map is a lot smoother, but the game itself seems to run a lot slower. (vehicles move for a few seconds, then it idles for a couple of seconds, then it starts to move, rinse and repeat)

Interesting, thank you for that. I will need to try connecting myself to test this. I suspect that future maps will need to be smaller (in terms of number/size of towns, rather than land area) so as to avoid overloading people's computers.

The number of threads issue is a bug that deserves its own thread, I think. Until that be remedied, I suggest that people do manually edit their simuconf.tab files as suggested.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 18, 2019, 09:43:18 AM
Quote from: CK on December 17, 2019, 06:43:54 PMSetting threads to 6 does work. As for performance, scrolling through the map is a lot smoother, but the game itself seems to run a lot slower. (vehicles move for a few seconds, then it idles for a couple of seconds, then it starts to move, rinse and repeat)
That is because the server is running slow. The simulation pauses waiting for the server to give the go ahead to proceed.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on December 18, 2019, 10:45:18 AM
Is there any reason not to store the current game and begin a new one with a smaller population, given that performance won't improve for some time (if at all)? Recently there have only been three active players, myself, CK and whoever controls Arlspike Fisherman, and I certainly wouldn't mind.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 18, 2019, 11:29:26 AM
Quote from: freddyhayward on December 18, 2019, 10:45:18 AM
Is there any reason not to store the current game and begin a new one with a smaller population, given that performance won't improve for some time (if at all)? Recently there have only been three active players, myself, CK and whoever controls Arlspike Fisherman, and I certainly wouldn't mind.

It will take some time to set up a new game - I think that the new year would be the best time for this. In the meantime, a very demanding game on the server is useful for testing.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Phystam on December 18, 2019, 03:22:48 PM
I have Java island map with simutrans pak128.britain-ex scale(1tile=125m), and it would be good for the next game. It has less map size and more realistic terrain than the current game. May I provide it for the next game?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 18, 2019, 03:53:41 PM
Quote from: freddyhayward on December 18, 2019, 10:45:18 AMRecently there have only been three active players, myself, CK and whoever controls Arlspike Fisherman, and I certainly wouldn't mind.
Because when I try to join 9/10 times the server fails to respond or the server takes so long to respond that joining times out during the server saving stage.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on December 18, 2019, 09:19:20 PM
Quote from: DrSuperGood on December 18, 2019, 03:53:41 PM
Because when I try to join 9/10 times the server fails to respond or the server takes so long to respond that joining times out during the server saving stage.
That's what I'm trying to say, this situation isn't good for anyone.
edit: Phystam, could you upload the map? I'd be interested to take a look.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 18, 2019, 09:20:36 PM
Quote from: Phystam on December 18, 2019, 03:22:48 PM
I have Java island map with simutrans pak128.britain-ex scale(1tile=125m), and it would be good for the next game. It has less map size and more realistic terrain than the current game. May I provide it for the next game?

Interesting - what size is this map and what does it look like?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Phystam on December 19, 2019, 02:01:22 AM
The map looks like below, and it has 8500x1690 map size with 125m tile scale.
When you convert the image to BMP or PPM file format, then you can use the heightmap.
(https://cdn.discordapp.com/attachments/514739526330220547/657038185590685724/jawa125.png)

I also have a 100m tile scale map, so I attach it too. This map has 10624x2112 map size.
(https://cdn.discordapp.com/attachments/514739526330220547/657038436406132779/jawa100.png)



EDIT:
This heightmap has been created from ALOS World 3D - 30m ©JAXA (https://www.eorc.jaxa.jp/ALOS/en/index.htm).

Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on December 19, 2019, 12:43:56 PM
Ah, the Indonesian island of Java. The terrain does force players to follow the contours and thus it rewards tilting trains. I'm in favour of this for the next map.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 19, 2019, 06:17:00 PM
Would be acceptable as long as there is enough flat land. Nothing worse than trying to build when every single tile crossed changes elevation.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on December 19, 2019, 10:33:14 PM
Interesting. This will be a somewhat different challenge to the present map as this allows land journeys from and to all points, rather than forcing players to use ships, save for the north-western island, where there is a possibly bridgeable channel.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on December 19, 2019, 11:18:11 PM
Although the current map has reached the point where multiple cross-sea tunnels are operational due to the sheer abundance of funds (and those tunnels provide an excellent return on investment).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Phystam on December 20, 2019, 06:56:45 AM
Northern coast has large flat area but southern coast has harder terrain. Construction of railway to southern coast will be challenging task. On the other hand, northern flat area would have large amount of population, so it would be also hard task to avoid overcloud.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on December 20, 2019, 01:19:17 PM
Quote from: CK on December 19, 2019, 11:18:11 PMAlthough the current map has reached the point where multiple cross-sea tunnels are operational due to the sheer abundance of funds (and those tunnels provide an excellent return on investment).
I am pretty sure there were rules in place on the server to stop one doing this. Specifically that in 2016 the longest tunnel one could build is 57 km, with earlier dates limiting to shorter tunnels based on the real length of tunnels built. This rule was to stop people repeating the old extended server where there were 12-16 cross map tunnels since railway tunnels first became available.

At some stage a system limiting the length of underwater tunnels is intended but is currently a low priority.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on January 07, 2020, 04:07:59 PM
I still cannot enter the server. It tells me that it didnt recieve the NWC_GAME package within 10 minutes, alternative a bad one.

However, that new map looks very cool, I would support that as the next game map!
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on January 09, 2020, 03:31:03 PM
Quote from: Ves on January 07, 2020, 04:07:59 PM
I still cannot enter the server. It tells me that it didnt recieve the NWC_GAME package within 10 minutes, alternative a bad one.

However, that new map looks very cool, I would support that as the next game map!
It requires a lot of patience and generally a couple of attempts to eventually be able to enter the server, but I can confirm that it is possible.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 09, 2020, 06:44:43 PM
Quote from: CK on January 09, 2020, 03:31:03 PM
It requires a lot of patience and generally a couple of attempts to eventually be able to enter the server, but I can confirm that it is possible.

That is useful to know. May I ask what the performance is like once you do manage to login?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on January 09, 2020, 07:11:20 PM
Quote from: jamespetts on January 09, 2020, 06:44:43 PM
That is useful to know. May I ask what the performance is like once you do manage to login?
Sluggish, to summarise.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 09, 2020, 07:55:19 PM
Quote from: CK on January 09, 2020, 07:11:20 PM
Sluggish, to summarise.

Thank you. Are you able to elaborate on this; is it unresponsive to commands; is the speed inconsistent; are there regular pauses? The particular type of sluggishness can help to narrow down how best to deal with a high load.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: CK on January 09, 2020, 08:28:32 PM
Quote from: jamespetts on January 09, 2020, 07:55:19 PM
Thank you. Are you able to elaborate on this; is it unresponsive to commands; is the speed inconsistent; are there regular pauses? The particular type of sluggishness can help to narrow down how best to deal with a high load.
The speed appears to be consistent, but the pauses are regular, and the game is occasionally unresponsive to commands.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 09, 2020, 09:10:43 PM
Quote from: CK on January 09, 2020, 08:28:32 PM
The speed appears to be consistent, but the pauses are regular, and the game is occasionally unresponsive to commands.

Interesting - thank you for letting me know.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on January 14, 2020, 01:07:33 PM
Is there anywhere I can view the autosave logic for this server?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 14, 2020, 02:39:26 PM
The logic is here:


root@438242:~# cat rotate-backup.sh
# Rotation and backup script for the Simutrans-Experimental server
# Written by James E. Petts, December 2012
# Modified September 2018 to add thd date/time

# This script is designed to:
# (1) check whether the saved game has been modified in the last hour;
# (2) if it has not, run the force-sync command;
# (3) check again whether the saved game has been modified in the last hour
# (the force-sync command might or might not modify it depending on whether -
# (a) Simutrans-Experimental is running; and
# (b) there are any players connected); and
# (4) if it has, rotate the saved games using the rotate.sh script.

echo
echo "******"
echo
echo "Running the backup and rotation script..."
echo
echo "The current date and time is"
date
echo
SAVEGAME="/usr/share/games/simutrans-extended/server13353-network.sve"

# Check that the server saved game exists at all
if [ ! -e $SAVEGAME ]
then
echo "Error: saved game not found at $SAVEGAME"
echo
exit 1
fi

# Check the current time and the last modification time of the saved game file
# Use Unix time (seconds since 1 Jan. 1970)
NOWTIME=$(date +%s)
NOWTIME_FRIENDLY=date

SAVEMODTIME=$(stat -c %Y $SAVEGAME)
SAVEMODTIME_FRIENDLY="stat -c %y $SAVEGAME"

HOURAGO=$(expr $NOWTIME - 3600)
HALFHOURAGO=$(expr $NOWTIME - 1800)

echo "Current time:"
$NOWTIME_FRIENDLY
echo
echo "Game last saved:"
$SAVEMODTIME_FRIENDLY
echo

# Check whether the saved game was modified more than an hour ago
if [ $HALFHOURAGO -gt $SAVEMODTIME ]
then
echo "The game was last saved more than half an hour ago. Run a force sync."
echo
/root/force-sync.sh

# Check again whether the saved game was modified more than an hour ago.
# But first, wait two minutes, as it might take a while to execute the
# force-sync command.
sleep 120
else
echo "The game was last saved within half an hour - do not run a force sync."
echo
fi

NEWSAVEMODTIME=$(stat -c %Y $SAVEGAME)

if [ $HOURAGO -gt $NEWSAVEMODTIME ]
then
echo "The game was not updated with a force-sync. Either the server is not running, or no clients are connected."
echo
exit 2
else
echo "The saved game has been updated in the last hour. Rotate the backups."
echo
/root/rotate.sh
fi
sync


The above is a shell script set to run once every minute on the server.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on January 14, 2020, 03:02:03 PM
Thanks, would you mind also sharing force-sync.sh?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 14, 2020, 03:05:43 PM
Here it is:


# Shell script to run a force-sync on the running Simutrans-Experimental server
# Written by James E. Petts, December 2012
# Modified September 2018 to add the date/time for logging purposes

echo "Running a force-sync..."
date
echo

/usr/share/games/simutrans-extended/nettool -s bridgewater-brunel.me.uk -p [PASSWORD REDACTED] clients

echo

/usr/share/games/simutrans-extended/nettool -s bridgewater-brunel.me.uk -p [PASSWORD REDACTED] -q force-sync

sleep 3m
sync

Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on January 14, 2020, 03:21:47 PM
Thanks. From what I can tell, this uses code from network_cmd_ingame.cc, which goes ahead with autosaves even when no clients are connected. Perhaps this is contributing to the server's connection difficulties?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on January 14, 2020, 03:28:56 PM
The difficulty, I think, is that the time that it takes to save is equal to or greater than the designated interval between saves.  From what I can deduce from looking at memory allocation, most of the data are player routes.

I notice from the code that, although the comments refer to hourly saving, it was changed at some point to half-hourly saving. I can re-increase it to hourly saving and see whether that helps for the time being; but the ultimate issue is that the saved game is too demanding for the server.

Edit: I have now made this modification.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: DrSuperGood on January 14, 2020, 09:55:42 PM
I think at this point people mostly want a new server game. I have not been able to play for over a month because every time I try to join it fails...

At times I want to join for 5-15 minutes and maintain my stuff or do part of a new route. But currently it is taking over 30 minutes to join which is counter productive to this play style. Instead of repeatedly trying to rejoin once it fails I rather let people who want to play for 2-3 hours play uninterrupted.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on February 01, 2020, 11:33:57 AM
While we all wait for either a technical fix or a new savegame, I thought I'd share a rail network map I created for fun based on the Bay region of the server. The map does not include operators other than the Bay Transport Group nor any of the many Bay Metro underground lines.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Mariculous on February 01, 2020, 12:02:29 PM
Uhm "for fun" does not imply a broken image I guess?
For some reason I can see the thumbmail but I cannot open the image itself. "unsupported file format"
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on February 01, 2020, 06:15:38 PM
I have the same trouble as Freahk.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Matthew on February 01, 2020, 07:38:30 PM
The map looks very professional, freddyhayward! I've never seen the Bridgewater-Brunel game, but it looks like this corner of the rail network has an authentic feel.  :)

BTW I can see the map by right-clicking on the attachment and downloading it. I guess that the preview is affected by the forum's ongoing troubles.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Ves on February 01, 2020, 07:43:04 PM
I also could only see it by downloading and open in GIMP (my normal picture viewer could also not open it)!
Nice looking map you made!  :D
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on February 01, 2020, 10:51:04 PM
Hopefully this link works: (https://simutrans-germany.com/files/upload/btg-brr-met.png)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: VOLVO on May 14, 2020, 04:21:44 AM
Quote from: freddyhayward on February 01, 2020, 10:51:04 PM
Hopefully this link works: (https://simutrans-germany.com/files/upload/btg-brr-met.png)
Wow, haven't been able to do anything to the company for a very long time due to hardware unable to cope, almost forgot how the network looks like.

The Circular line hardly see any passengers since the opening of the underground lines. Blandinglow line is even worse, but that's what they call community service I guess.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on May 14, 2020, 06:17:47 AM
Quote from: VOLVO on May 14, 2020, 04:21:44 AM
Wow, haven't been able to do anything to the company for a very long time due to hardware unable to cope, almost forgot how the network looks like.

The Circular line hardly see any passengers since the opening of the underground lines. Blandinglow line is even worse, but that's what they call community service I guess.
Out of interest, how do you know this? were you a player on the server, perhaps the founder of the BTG? did you open a downloaded save, or is this from memory? what time period was this?
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: VOLVO on May 14, 2020, 01:57:08 PM
Quote from: freddyhayward on May 14, 2020, 06:17:47 AM
Out of interest, how do you know this? were you a player on the server, perhaps the founder of the BTG? did you open a downloaded save, or is this from memory? what time period was this?
The company founder is nuhgl, who has disappeared for a very long time, then I took over the company in 190x I think, then until 195x I couldn't connect to the server reliably anymore.

Also the company has become a bit too big to manage. The modernisation of using modern signal boxes and signal systems, modern rolling stock and high speed tracks has took me ages.
I don't have a local save copy anymore unfortunately.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: freddyhayward on May 15, 2020, 03:27:56 AM
Quote from: VOLVO on May 14, 2020, 01:57:08 PM
The company founder is nuhgl, who has disappeared for a very long time, then I took over the company in 190x I think, then until 195x I couldn't connect to the server reliably anymore.

Also the company has become a bit too big to manage. The modernisation of using modern signal boxes and signal systems, modern rolling stock and high speed tracks has took me ages.
I don't have a local save copy anymore unfortunately.
Well, the save progressed to about 2004 before becoming impossible to run without crashing, even offline. By this time, most of the regional network had been electrified and slow curves eliminated. Most services ran at 160kph.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 16, 2020, 10:38:27 AM
This game has now been terminated and replaced with a new game on this server (https://forum.simutrans.com/index.php/topic,19880.0.html), starting in 1750 and with plenty of industry.

The save for this game in its final, May 2004 state can be downloaded here (http://bridgewater-brunel.me.uk/saves/bb-2-final.sve).
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: VOLVO on May 17, 2020, 03:23:35 AM
Quote from: jamespetts on May 16, 2020, 10:38:27 AM
This game has now been terminated and replaced with a new game on this server (https://forum.simutrans.com/index.php/topic,19880.0.html), starting in 1750 and with plenty of industry.

The save for this game in its final, May 2004 state can be downloaded here (http://bridgewater-brunel.me.uk/saves/bb-2-final.sve).
1.3GB of savegame. No wonder I couldn't connect.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 17, 2020, 11:27:11 AM
Quote from: VOLVO on May 17, 2020, 03:23:35 AM
1.3GB of savegame. No wonder I couldn't connect.

The new map has been made with considerably fewer towns, so hopefully the saved game size should remain manageable.
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: VOLVO on May 17, 2020, 04:44:24 PM
Quote from: jamespetts on May 17, 2020, 11:27:11 AM
The new map has been made with considerably fewer towns, so hopefully the saved game size should remain manageable.
I also see town growth disabled? (or reduced so significantly we don't get a single population increase for a year?)
Title: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: Mariculous on May 17, 2020, 07:10:38 PM
I cannot confirm this.
Some of the towns I serve grew quite a lot already.