Settings File Corruption

Issue #6212 new
John Garder created an issue

Seems to happen way too often where Settings.xml, and various other xml files in the Launchbox\Data folder get corrupted and we have to go back and get backups to replace them. This is on an new SSD drive and has happened on different system setups. So looking for some more robust file management around these xml that are used to manage (and required to start up) launchbox.

Comments (5)

  1. Retro808

    Corruptions typically occur when LB/BB is closed abruptly not allowing any changes to save on exit. Are there you seeing instances of LB crashing or being forced closed?

  2. John Garder reporter

    No, there shouldn’t have been any forced closes, crashes or power failures. Should have been shut down normally through menus. But even if there was a power outage or system crash where a config/xml was being written and got interrupted, why would 3 or more files all be corrupt ? Seems like the one file being written would be corrupt but not several different files. When this happens it seems like there are 4 or 5 files in the data folder that get corrupted and have to be replaced. From reading Launchbox forum posts on this issue others have had, they have also had several files corrupted at once when trying to get launchbox started again. I guess even if there was a system failure, my suggestion for this request would be to put some more robust processes around the updating of those config files or an auto recovery process to prevent a launchbox system load failure.

  3. Christian

    The current functionality is by design. We’d rather a user know up front the data is no good, then try to manipulate and massage data that is corrupted. This way the user can investigate and decide how they want to proceed. Either remove the data or restore a backup (and hopefully identify and correct the cause).

    That being said the primary causes for you seeing this issue are:
    LaunchBox or Big Box are forced to close during the save event
    File sync application locks the file as we are altering it
    Hard drive is failing
    Third party application (such as Skraper) is used against the XML files and they alter the data in a way that corrupts the file

    I’ve never seen that error occur unless one of those four things has occurred.

  4. Ken Gilb

    Is there a reason the settings.xml file is continually updated? I run my BigBox on an arcade cabinet that is used by Short Term Rental guests. They are constantly turning the machine off without a graceful exit. When the settings file is corrupted the cabinet no longer works and I am forced to drive 7 hours to the rental house to copy from the backup file. If I set this up to always copy a good Settings.xml file when starting the arcade cabinet will there be other consequences? The software should continue to work if there is a power failure or someone just turns off the computer.

  5. Christian

    There are some maintenance steps that are done on load that are reflected in your settings which is why it gets updated periodically. If you hard shutdown the machine during that write process it can cause the corruption. All programs that save to file have this potential issue. It’s why Windows tells you not to do it. If you don’t need that data saved it may be easier to set up a bat file to run on machine start up that just copies a “known good” copy of the settings file to the correct folder location before starting Big Box. Would save ya the 7 hour trip.

  6. Log in to comment