The International Simutrans Forum

 

Author Topic: Crashes on the server  (Read 427 times)

0 Members and 1 Guest are viewing this topic.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Crashes on the server
« 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.
« Last Edit: May 09, 2019, 11:46:01 PM by jamespetts »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Re: Bridgewater-Brunel no. 1 - Great Britain sized map (no. 2)
« Reply #1 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.

Offline ACarlotti

  • *
  • Posts: 483
Re: Crashes on the server
« Reply #2 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.
« Last Edit: May 10, 2019, 02:34:17 AM by ACarlotti »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Crashes on the server
« Reply #3 on: May 11, 2019, 12:13:42 AM »
Excellent - thank you very much for your analysis of this: that is most helpful.

Offline ACarlotti

  • *
  • Posts: 483
Re: Crashes on the server
« Reply #4 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Crashes on the server
« Reply #5 on: May 13, 2019, 05:48:41 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.