News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

[ENDED GAME] Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)

Started by jamespetts, December 05, 2017, 09:03:46 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DrSuperGood

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.

jamespetts

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.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

Rollmaterial


DrSuperGood

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.

jamespetts

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.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

SuperTimo

#320
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.)

jamespetts

If you could send me a time machine by post, I should happily oblige.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

DrSuperGood

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.

prissi

Also SDL2 on linux could copy and paste ... at least this was added recently to stadard, file "clipboard_s2.cc"

SuperTimo

#324
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:




ACarlotti

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).

DrSuperGood

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.

Rollmaterial


SuperTimo

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.

DrSuperGood

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;
}
}

DrSuperGood

#330
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...

SuperTimo

Yeah normally I am losing synchronisation with the server after only 5 minutes or so.

ACarlotti

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.

DrSuperGood

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.

ACarlotti

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.

Junna

Yeah, it's impossible to stay connected for more than a few minutes now...

prissi

Did Experimental now contain the overtaking patch? I though that was not network save.

ACarlotti

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.

jamespetts

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.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

TurfIt

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...

jamespetts

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 thread for details.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

jamespetts

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.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

passengerpigeon

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.

jamespetts

I am making very slow progress in trying to fix the problem (and have been working on this this evening): see here 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.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

jamespetts

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.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

Rollmaterial

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

DrSuperGood

My company "Royal Western" needs a password reset. Someone I do not know has claimed it.

jamespetts

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.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

DrSuperGood

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).

Ves

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