News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Game wont load.

Started by fam621, June 19, 2019, 05:02:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fam621

Hi, when I go to open the latest nightly build of Simutrans Extended, it shows a message displaying fatal error. Picture below.


ACarlotti

Thanks for reporting. This has been diagnosed in https://forum.simutrans.com/index.php/topic,15716.msg180463.html#msg180463; just waiting now for James to incorporate the fix.
In the meantime you could probably work around this by deleting or temporarily moving simutrans-extended.xml (in the same directory as the save directory); this might affect any settings you have saved to that file, but most important things are overwritten by settings in simuconf.tab anyway.

Matthew

Yesterday, I was about to run the Nightly Updater and thought, "I'll check the forum first, just in case anything's broken." I saw ACarlotti's message and felt like I'd just missed stepping into a puddle. I don't know what timezone you're in, Mr (?) Carlotti, but it's a good thing that you were around to check the nightly as soon as it hit the server! Thank you.

So the last good copies of the .exes and extended-settings are available here if anyone wants them. I don't think they will help if you want to play the online games though, since there'll be a mismatch.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

wlindley

#3
The format of ~/simutrans/settings-extended.xml has changed.  Despite this ostensibly being a text format, any change in the internal structure results in a mismatch of the binary format, giving a crash like this.

If it were a proper XML format, instead of having records like `<i8>3</i8>` (some un-named 8-bit integer value; all values in the file must be in precisely the correct order; otherwise boom, crash) it would have values like `<default_mountain_height>3</default_mountain_height>`.  The whole point of XML is to prevent these kind of fatal errors.  Along with other poorly-documented binary formats (I have been repeated admonished Do Not Attempt To Write A Program That Reads The .dat Format, a curiously anti-Free-Software attitude), Simutrans needs a lot of work on its I/O.

Solution:  Remove ~/simutrans/settings-extended.xml  (adjust accordingly if you're on Windows)

ACarlotti

#4
Quote from: Matthew on June 19, 2019, 07:08:15 PMit's a good thing that you were around to check the nightly as soon as it hit the server!
Actually, I run local builds, so probably tested this an hour or two before it became the new nightly. (I then realised I'd built the wrong version for my intended testing because the server was still on an older version).

The XML format is just an XML-ised version of the binary save format, and the same load/save code is used for both the settings and for savegames. The XML file probably easier to manually edit the binary format, but that file is not intended to be manually edited - all settings intended to be configured in a file are in simuconf.tab.

As for "poorly-documented binary formats" - basically the best documentation for this is generally going to be the code (although in the case of the .pak files there is enough extra structure that some external help text could be written for parts of it). If documentation were provided separately to the code, then it would probably soon become inaccurate as features were added to the code. There's nothing to stop someone writing some documentation and trying to maintain it, but personally I'd probably look at the code first if I needed to know what something did.

I don't see anything inherently wrong with writing a program to read any file formats in use; you'd just need to accept taht for the binary (or xml-ised binary) formats you'd likely need to base the parser upon a copy of the relavant parts of the main source code, and be willing to update it whenever the sve or pak object versions are changed.

fam621

Quote from: thegamer7893 on June 19, 2019, 05:02:20 PM
Hi, when I go to open the latest nightly build of Simutrans Extended, it shows a message displaying fatal error. Picture below.



This bug has still not been fixed.

jamespetts

My apologies for the difficulty. This error was caused by an change to the format of ~/simutrans/settings-extended.xml without properly incrementing the saved game version. The fix has now been incorporated. A workaround is to delete ~/simutrans/settings-extended.xml (your settings, such as language, will be reset). However, if you delete ~/simutrans/settings-extended.xml to get it to work with the current version with the error, you will need to do this again when the fixed version becomes available.
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.