The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: DrSuperGood on May 09, 2019, 03:26:25 PM

Title: Crashes on the server
Post by: 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.
Title: Re: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
Post by: jamespetts on May 09, 2019, 11:45:28 PM
Thank you for the report, but please note that bug reports should not be posted on the server thread, but in their own dedicated thread in the development forum. I am about to spit this post now.

I believe that I have now fixed this in the next nightly build; I should be grateful if you could let me know whether the fix was successful.
Title: Re: Crashes on the server
Post by: ACarlotti on May 10, 2019, 12:42:37 AM
I think this was probably the first time that the game was saved while the path explorer was running on a goods category with no service (on Bay Transport Group owns long goods vehicles, and they're currently sitting in a depot in Elmey with no schedule). The path explorer will covers such categories very quickly (perhaps in only six steps), and so it is unlikely, but not impossible, for the game to be saved at such a point.

EDIT: I've now found all the relevant bit of code. For the crash to occur, the save had to take place after stage 1 of the path explorer but before stage 3. James' fix looks like it should work, but I think it would be better simply to ensure that the connection tables are never null (there's only 65536 of them, and they are currently only set to null when the world is detroyed or loaded). I'll write some code for this (and the 63356/63336 issues) later.
Title: Re: Crashes on the server
Post by: jamespetts on May 11, 2019, 12:13:42 AM
Excellent - thank you very much for your analysis of this: that is most helpful.
Title: Re: Crashes on the server
Post by: ACarlotti on May 12, 2019, 08:48:05 PM
I've now uploaded the changes I mentioned. The first commit does everything that doesn't affect the save file (i.e. changing where the tables are initialised, and fixing how many are initialised/used). The second commit ensures all 65536 entries in connexion_list are saved in future save versions.
Title: Re: Crashes on the server
Post by: jamespetts on May 13, 2019, 05:48:41 PM
Quote from: ACarlotti on May 12, 2019, 08:48:05 PM
I've now uploaded the changes I mentioned. The first commit does everything that doesn't affect the save file (i.e. changing where the tables are initialised, and fixing how many are initialised/used). The second commit ensures all 65536 entries in connexion_list are saved in future save versions.

Thank you for this: that is most helpful. Now incorporated.