-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harden reading settings file to prevent startup freeze
There is an uncommon issue where settings file becomes corrupted and results in exception during iniParser.ReadFile(). This will cause game to freeze at startup on either a black screen or splash. Users can resolve by deleting settings.ini to restore defaults, but this usually requires community support. This commit hardens settings impot in the following ways: 1. Create a settings backup file once successfully read. 2. Add exception handling for iniParser.ReadFile() to recover from corrupted settings file. 3. First fallback is to backup settings file. 4. Second fallback is to restore defaults automatically. This isn't ideal, but better than game freezing. Currently unknown what causes settings.ini to become corrupted in this way. The repro sample provided by a user was filled with 5kb of "NULL" characters.
- Loading branch information
1 parent
46a65fd
commit f3ed7fa
Showing
1 changed file
with
49 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters