From 93b568469a9e3291c2c69b9cd95e4140dcaf9976 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 11 Dec 2011 11:54:44 +0000 Subject: (svn r23491) -Document [FS#4846]: why we're not saving settings when OpenTTD crashes --- known-bugs.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/known-bugs.txt b/known-bugs.txt index 3151abf05..e8f691382 100644 --- a/known-bugs.txt +++ b/known-bugs.txt @@ -380,3 +380,30 @@ Vehicles not keeping their "maximum" speed [FS#4815]: It is possible to calculate whether the equilibrium will be passed, but then all acceleration calculations need to be done twice. + +Settings not saved when OpenTTD crashes [FS#4846]: + The settings are not saved when OpenTTD crashes for several reasons. + The most important is that the game state is broken and as such the + settings might contain invalid values, or the settings have not even + been loaded yet. This would cause invalid or totally wrong settings + to be written to the configuration file. + + A solution to that would be saving the settings whenever one changes, + however due to the way the configuration file is saved this requires + a flush of the file to the disk and OpenTTD needs to wait till that + is finished. On some file system implementations this causes the + flush of all 'write-dirty' caches, which can be a significant amount + of data to be written. This can further be aggravated by spinning + down disks to conserve power, in which case this disk needs to be + spun up first. This means that many seconds may pass before the + configuration file is actually written, and all that time OpenTTD + will not be able to show any progress. Changing the way the + configuration file is saved is not an option as that leaves us more + vulnerable to corrupt configuration files. + + Finally, crashes should not be happening. If they happen they should + be reported and fixed, so essentially fixing this is fixing the + wrong thing. If you really need the configuration changes to be + saved, and you need to run a version that crashes regularly, then + you can use the 'saveconfig' command in the console to save the + settings. -- cgit v1.2.3-70-g09d2