wesnoth / wesnoth

An open source, turn-based strategy game with a high fantasy theme.
https://www.wesnoth.org/
GNU General Public License v2.0
5.53k stars 1.02k forks source link

Preprocessor errors in mainline campaigns cause wesnoth to exit (GNA #23228) #1447

Open wesnoth-bugs opened 7 years ago

wesnoth-bugs commented 7 years ago

Original submission by vultraz on 2015-01-30

If a mainline campaign has a preprocessor error, and the user is returned to the main menu and then goes to Campaigns, only mainline campaigns will be listed, but no UMC ones.

This persists even after refreshing the cache with F5 from the main menu or fixing the offending WML and entering a game. The only way I've found to make UMC appear again is to quit and restart the game.

(Reproduced on Windows 8.1) Release: 1.13.x Priority: 5 - Normal Severity: 3 - Normal

nemaara commented 5 years ago

@Vultraz seems like the behavior for this issue is now that the game will exit, not return to the main menu screen.

Edit: discussed over Discord, probably best to save this for v2.0.

ProditorMagnus commented 5 years ago

Might be related to #1924

CelticMinstrel commented 5 years ago

I'm pretty sure F5 is supposed to bypass the cache though?

Anyway, this is a problem that only affects developers, so the priority is super-low. It could be improved, to be sure, but it's not like a Wesnoth release will be shipped with preprocessor errors in the mainline campaigns.

Wedge009 commented 5 years ago

On that note, I was thinking how to replicate this, since I don't see preprocessor errors in the main campaigns.

gfgtdf commented 5 years ago

On that note, I was thinking how to replicate this, since I don't see preprocessor errors in the main campaigns.

Well you have to add some to the campaigns main_.cfg files.

GregoryLundberg commented 5 years ago

Is it just main campaigns?

Can this be reproduced by introducing a preprocessing error into a UMC campaign with similar results?

If not, I don't see any reason to keep this issue open if ensuring there are no preprocessing issues in the mainline campaigns fully solves (avoids) the problem

jostephd commented 5 years ago

Is it just main campaigns?

Yes. An error in an addon campaign doesn't prevent subsequent add-on campaigns from being loaded. It results in a click-through dialog saying the add-on has a bug.

The failure mode for a preprocessor error in a mainline campaign (an unmatched #ifdef in HttT/_main.cfg) is two click-through messages and then wesnoth exits.

If not, I don't see any reason to keep this issue open if ensuring there are no preprocessing issues in the mainline campaigns fully solves (avoids) the problem

Well, maybe. It's low priority, certainly, but a WML error in a campaign shouldn't render the whole game unusable. It would be better to continue with that one campaign disabled, just as it's done for add-ons.