Skip to main content
Topic: Crash on loading save game (Read 2803 times) previous topic - next topic

Crash on loading save game

I'm using Simutrans 102.0 and pak64 with no addons and a default simutab.conf. This also occurs on the latest svn trunk version.

The game crashes a few seconds after the savegame is loaded. I'm ****uming the save got corrupted somehow. Here is the save file: http://dump.xivesoftware.com/big.sve All other save files seem to work and I haven't been able to duplicate the problem.

I tried a little debugging but I'm not familiar with the Simutrans source so I didn't get far. The exception is occuring in planquadrat_t::is_connected in simplan.cc at line 596. Accessing halt_list is throwing an access violation.

I'm not 100% sure this is how it happened, but the steps taken to corrupt the save were roughly:
  • Load the uncorrupted save file and play for a while
  • Save the file over the existing uncorrupted save
  • Save another copy of the game with another (but similar) file name
  • After a few moments, save the file again with the original file name
  • Game crashed at this point. I tried loading both the save file and the copy but both crash a second or two after loading

Bonus info:
I tried loading the corrupted game file and re-saving as XML. The XML file looked ok (although it was too huge for me to properly examine), but it also crashed the game upon loading.

Pausing the game prevents the crash from occurring, but as soon as you un-pause, the crash will occur.

I also attached a log file of console output during one of these crashed game sessions. It doesn't have anything interesting or helpful that I can tell.

Edit: I almost forgot: I'm running Windows 7 RTM x64 on an early 2008 Intel iMac.

Re: Crash on loading save game

Reply #1
There is a broken p****enger packet on Appongfield North stop (388,147).
I don't know why this happened, but you can remove this p****enger with removing this stop.

- Load savegame and click pause button
- Remove Appongfield North stop completely
- Rebuild a stop on the same position

This should solve the problem.

Re: Crash on loading save game

Reply #2
Should this really crash the game though? I doubt it happens very often (and probably shouldn't happen at all) but if it does I figure a more graceful failure would be a good thing.

I'll try this solution in a while, but it will probably fix the problem.

Re: Crash on loading save game

Reply #3
Should this really crash the game though? I doubt it happens very often (and probably shouldn't happen at all) but if it does I figure a more graceful failure would be a good thing.
Yes, you are right here.

The cause of the crash is a corrupted p****enger-structure, ie p****enger that want to travel to a point outside of the map. Nothing that could have been foreseen. The corrupted variable is always set to a valid coordinate. No idea why the bug happens.
Parsley, sage, rosemary, and maggikraut.

Re: Crash on loading save game

Reply #4
Added check with error message at load time to fix such corrupted games during load time.

 

Re: Crash on loading save game

Reply #5
Thanks!