wesnoth-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wesnoth-dev] KISS Solution to user campaign stability problems


From: David White
Subject: Re: [Wesnoth-dev] KISS Solution to user campaign stability problems
Date: Mon, 27 Jun 2005 19:35:36 -0500
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)

ott wrote:

On Thu, Jun 23, 2005 at 06:25:55PM -0500, David White wrote:
I've committed a fix by making preprocess_file() once again modify the map that's passed in with the new defines. This means that user campaigns will inherit the defines map from the parse of game.cfg as they should.
Currently 10 campaigns appear in the Campaign menu but break when trying
to start them, with an error that indicates scenario not found.  I find
it odd that all 10 fail exactly the same way.
There's a logical explanation for why they all fail that way. Consider a template for a well-defined user campaign

[campaign]
...campaign summary data in here...
first_scenario=scenario1
define=MY_CAMPAIGN_DEFINITION
[/campaign]

#ifdef MY_CAMPAIGN_DEFINITION
...full campaign data in here...
#endif

Now the only way that an error will be generated immediately when a campaign is downloaded is if there is an error in the summary data or the #ifdef...#endif itself. If no error is generated at this stage, it will present the campaign in the campaign dialog.

When the user selects to start the campaign, Wesnoth will do two things:

- try to re-parse the config with MY_CAMPAIGN_DEFINITION defined
- try to start the game at 'scenario1'.

Now if there is an error in the campaign, the parsing will emit some error messages. The entire user campaign will be considered corrupt, and not loaded as part of the config. Then when Wesnoth gets to step 2, and tries to start a game at scenario1, of course it won't find it, because the entire module was rejected.

Now eventually it'd be nice if we did something to make the error process a little more 'user friendly', but I think the behavior at the moment is at least sane.

Further, some of these campaigns seem to completely break the campaign
dialogue.  Apparently depending on the sequence of campaigns one tries and
which ones one has installed (I had at various times different versions
of the 6 campaigns which are broken but work when the campaign file is
newline terminated, some with the newline error fixed and some not),
some of these 10 will show a scenario not found error, and then the
campaign menu will show a corrupted list, with some campaigns missing.
In one case the campaigns menu showed two user campaign entries (not
even the five mainline campaigns were present).  Restarting the game
clears this up.  This seems to support silene's statement on IRC that
config corruption is occurring.

I haven't been able to reproduce this, and I could only find a config corruption bug that has been around for a long time. Could you please try again with a change I just checked in? If the problem persists, exact steps to reproduce would be great.

Thank you once again for your thorough investigation of this problem.

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]