URL:
<http://gna.org/bugs/?20366>
Summary: Corrupted preferences file should not prevent
Wesnoth startup
Project: Battle for Wesnoth
Submitted by: shadowmaster
Submitted on: Thu 13 Dec 2012 10:23:00 PM CLST
Category: Feature Request
Severity: 4 - Important
Priority: 5 - Normal
Item Group: User Interface
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.10.x, 1.11.0, 1.11.1, trunk r55849
Operating System: Any
_______________________________________________________
Details:
When Wesnoth hits a WML parser error when reading the main preferences file,
it will instantly quit without any visual indication. The most that it will do
in this case is printing the parser error in stderr with the affected file
referred to as "<unknown>".
This is a rather severe usability problem that has affected every version I
can recall. Ideally, there should be no way for Wesnoth to corrupt its
preferences file, but this can not only happen accidentally (filesystem
failure, etc.), but also deliberately, such as by entering the command :alias
=foo=bar in the in-game command line.
To solve it I would propose ignoring the preferences file every time it exists
and can't be read, and warning the user with an in-game notification via GUI
dialog with an option to discard the corrupted preferences file and overwrite
it, as well as pointers to solve the issue without discarding it.
Since this is not so much a bug as it is missing functionality (a sane
fallback and notification in case the preferences file cannot be parsed), I
have submitted it as a feature request.
(If nobody wants to try solving this before 1.11.4 or so, I may look into it
myself.)
Steps to reproduce:
- Open the preferences file, and insert a '=' character at the beginning so
that the first line reads like this:
=attribute=value
- Try starting Wesnoth. stderr should look like this:
Battle for Wesnoth v1.11.1+svn (55849)
Started on Thu Dec 13 22:13:22 2012
Automatically found a possible data directory at /home/shadowm/src/wesnoth
Unexpected characters at line start, value '=' at <unknown>:1
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?20366>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs