News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Crashing on load

Started by Junna, November 14, 2018, 05:20:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Junna

This is a modified save of the server game, where after making Bay Transport go bankrupt, the game crashes; loading the save game just previous to the running crash, also gives a crash with an index out of bounds error.

http://www.mediafire.com/file/u6qwww1j02ms8bq/sessx3.sve/file
By the way, why does it run sluggish in single player, but if I run a server and load the game, it runs at a more normal pace? In single player, there are periods where the frame rate drops drastically and responsiveness lags, but in hosted as a server, this does not occur, though CPU usage is higher.

jamespetts

This saved game appears to be either corrupt or from the wrong pakset - are you sure that this is the correct saved game?
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

#3
Thank you for uploading that. The saved game is now listed in the list of saved games, indicating that I now have the correct pakset - however, I get a "string longer than allowed size" error on loading, which is a symptom of a corrupt saved game.

Unfortunately, it is not possible to debug corrupt saved games - the only way of finding the problem that caused it is to be able to reproduce reliably the situation in which the saved game became corrupted.

Can you give any details of the circumstances in which this game was saved?
Edit: Can I check, incidentally, that you are getting the same error message as I am getting on loading this saved game?
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.

Junna

#4
That is indeed the message. I had another save from just prior, but it seems I accidentally overwrote it... I'm sure I was able to load that before without that message... I'll have to see if I can get it to reproduce now from an earlier save.

jamespetts

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.

Junna

#6
http://www.mediafire.com/file/mys97xcslw6v9w6/sessx4-1x2.sve/file
Go to Canal Mouth, which has now been removed by the liquidation, and rebuild the tracks as any company;


Using a elevated viaduct section for the two tile gap, and bridges for the others;
saving the game after this is done, will result in a broken, corrupted save-game, and if the game runs, it will crash in a short time.
EDIT: It seems related to the invisible viaduct sections over part of the canal that did not disappear when liquidated, though they are not visible. Building viaduct over them and deleting this seems to correct the crashing.

jamespetts

Thank you very much for that: that is most helpful. I think that I have now found and fixed this, and I should be grateful if you could re-test.

The problem was that, when the company was liquidated, ways with no mothballed equivalent (here, the elevated ways) were removed, in this instance, with parts of a convoy still on them. When they were built over again, a cleanup routine was called that deleted the individual vehicles in the convoy meaning that, when the convoy tried to refer to those vehicles, it crashed because it was trying to read memory that had been released.

To fix this, two changes were made: firstly, liquidated companies no longer remove ways for which there are no mothballed equivalents: they are degraded instead. Secondly, the vehicles are no longer removed when the cleanup routine is called, which prevents the crashes in existing saved games.
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.