News:

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

Crashes on the server

Started by DrSuperGood, May 09, 2019, 03:26:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

Server is instantly crashing upon resuming after a join. The client I joined with then crashes (no error message, straight out closes) soon after.

jamespetts

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

ACarlotti

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

jamespetts

Excellent - thank you very much for your analysis of this: that is most helpful.
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.

ACarlotti

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.

jamespetts

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