How to turn up the error reporting detail?

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.

How to turn up the error reporting detail?

Postby zaimoni » September 5th, 2017, 6:28 am

I'd like something more detailed than:
Code: Select all
Setting mode to 1920x1017
Checking lua scripts... ok
20170905 00:57:29 error config: caught config::error: Failed to load the scenario


Context: I'm retrying resurrecting Wesband (last known good 1.10.x), this time in 1.13.x . Above is a cut-paste from doing nothing except trying to load the (broken) multiplayer campaign. I just want some more detail (command line options ok) to know what I should be looking up.
zaimoni
 
Posts: 274
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.

Re: How to turn up the error reporting detail?

Postby gfgtdf » September 6th, 2017, 12:48 pm

zaimoni wrote:I'd like something more detailed than:
Code: Select all
Setting mode to 1920x1017
Checking lua scripts... ok
20170905 00:57:29 error config: caught config::error: Failed to load the scenario


Context: I'm retrying resurrecting Wesband (last known good 1.10.x), this time in 1.13.x . Above is a cut-paste from doing nothing except trying to load the (broken) multiplayer campaign. I just want some more detail (command line options ok) to know what I should be looking up.

It is posible to get more detailed errosby using the --log-debug:all (very slow since it adds a lot of ui diagnostic messages), it probably won't hepl you on this one. This erro usually means that no [scenario] or [multiplayer] with the given id was found.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
gfgtdf
Developer
 
Posts: 912
Joined: February 10th, 2013, 2:25 pm

Re: How to turn up the error reporting detail?

Postby zaimoni » September 8th, 2017, 6:25 pm

Ok (yes I'm having to splice in mp campaign configuration -- the rules were inverted ~1.11.8 so even the best-known at 1.11.5 needed splicing in a campaign tag that went from banned to mandatory. There may be other problems.) Failure is happening during scenario load so yes no chance AI is involved; the detail I need, is to report which tag or attribute is failing.

I have removed no campaign or mp ids compared to the 1.10.6 Wesband. I did need to put in a new id for the campaign tag that went from banned to required (in order to get Wesband to show as an mp campaign rather than a random map).

Working blindly, I was able to get as far as the display of the "Loading Units" text, by adding in a [rules] tag to the [mask] tag.

Current _main.cfg is:
Spoiler:

Two id values, including the named one, are defined in Wesband_main.cfg:
Spoiler:

So if it indeed is an id value issue, it's "give me the one I want, rather than this one that exists".
zaimoni
 
Posts: 274
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.

Re: How to turn up the error reporting detail?

Postby gfgtdf » September 8th, 2017, 6:31 pm

It probalby cannot find the scenario becasue you used [multiplayer] instead of [scenario]. If you use [campaign] then your scenario should be in [scenario] tags, even if it's a multiplayer campaign.

Anothe error is see is that you are using map_generation=default with scenario data in [generator], with map_gneration the generator will only be used to generate map_data (and use all other attributes from the outer scenario), if you want it to generate the whole scneairo you have to use scenario_generation=default
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
gfgtdf
Developer
 
Posts: 912
Joined: February 10th, 2013, 2:25 pm

Re: How to turn up the error reporting detail?

Postby zaimoni » September 8th, 2017, 8:21 pm

I am not qualified to revise https://wiki.wesnoth.org/MultiplayerContent : multiplayer campaigns (as of time of commenting) are documented as required to use the [multiplayer] tag as top-level, and are documented as requiring a [campaign] tag as well. That is indeed incorrect (swapping out [multiplayer] for [scenario] was enough to get things to the lobby).

It seems neither map_generation=default nor scenario_generation=default is "correct", although scenario_generation=default is "less wrong" (the player screen shows up, but then loading the game fails because no map data is found). With map_generation=default the player screen doesn't work, but loading the game soft-errors (it loads ... total black map, CPU-lock).
zaimoni
 
Posts: 274
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.

Re: How to turn up the error reporting detail?

Postby gfgtdf » September 8th, 2017, 8:37 pm

I caouldn't see anything in that page that says mp campaigns use [multiplayer] there, the sentence 'In the scenario configuration file, use a toplevel [multiplayer] tag instead of [scenario] tag' is in the single multiplayer scenario section not in the multiplayer campaigns section. The multiplayer campaign section below says 'Every scenario which should not be available to start directly, should have allow_new_game=no inside the [scenario] tag' which explicitly mentions the [scenario] tag. That said, these pages could be outdated in some apects. Unfotunetley at some points we had to block creating wiki accounts due to massive spam attacks. If you know a better wording the best thing you can do is to ask the website team to create a wiki account for you.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
gfgtdf
Developer
 
Posts: 912
Joined: February 10th, 2013, 2:25 pm

Re: How to turn up the error reporting detail?

Postby zaimoni » September 8th, 2017, 8:48 pm

No urgency ... think this forum thread will be adequate clarification (I don't think a one-off account creation for the wiki makes sense).

I tested lifting the scenario configuration out of [generator] and counter-changing scenario_generation=default to map_generation=default : no effect.

Code: Select all
Checking lua scripts... ok
20170908 15:20:12 error general: The game could not be loaded: load_game_failed: Map not found


Is this far enough along that the high-detail command line option will do something? (Won't be able to schedule more testing for a few hours).
zaimoni
 
Posts: 274
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.

Re: How to turn up the error reporting detail?

Postby gfgtdf » September 8th, 2017, 9:08 pm

I tested lifting the scenario configuration out of [generator] and counter-changing scenario_generation=default to map_generation=default : no effect.


I don't know what the error is, if you posted your scenario i might see it, no guarnatee though.

Is this far enough along that the high-detail command line option will do something? (Won't be able to schedule more testing for a few hours).


Don't know, you'd need to test.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
gfgtdf
Developer
 
Posts: 912
Joined: February 10th, 2013, 2:25 pm

Re: How to turn up the error reporting detail?

Postby zaimoni » September 9th, 2017, 6:43 am

--debug-log all : looks like it would need an overnight run just to log things.

The current failed scenario (after lifting the scenario configuration out of [generator]) is like:
Spoiler:
zaimoni
 
Posts: 274
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.

Re: How to turn up the error reporting detail?

Postby gfgtdf » September 9th, 2017, 11:50 am

the generator is lacking a [castle] tag, --log-debug=all or --log-debug=mapgen woudl have told you thins, but yes it's an engine bug, it should obviously not silently fail like this and give the error message also at default loglevel.


EDIT: also, please doon't put your code in spoilers, unless that post (not the code) is really long, [code] does automatically limit the number of lines that is displayed at once so there is noneed to worry even if your code is really long.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
gfgtdf
Developer
 
Posts: 912
Joined: February 10th, 2013, 2:25 pm

Re: How to turn up the error reporting detail?

Postby zaimoni » September 12th, 2017, 6:01 am

Confirmed: [castle] tag was enough to make further testing grindable.

As the lua interpreter no longer does Perl/PHP-style variable substitution in strings in 1.13.8 (it did at 1.11.5 and 1.10.6), I expect to have to audit all of the lua for that before further testing is meaningful.
zaimoni
 
Posts: 274
Joined: January 27th, 2005, 7:00 am
Location: Linn Valley, KS U.S.A.

Re: How to turn up the error reporting detail?

Postby shrieker1 » September 12th, 2017, 6:58 pm

I wanted to turn on some important error messages too bad it becomes quickly too noisy. I have developed following script to help me launch wesnoth with verbose log and then filter out some noisy stuff that I don't need to see. Mostly unfiltered version is stored in wesnoth.log using tee command. more verbose log helps to debug bugs that happen during scenario play.

Code: Select all
#!/bin/sh

USERDIR=""
if [ "$1" = "--clean" ]; then
   USERDIR="--userdata-dir $HOME/.local/share/wesnoth/1.12.clean"
   shift
fi

BIN=wesnoth-1.12
if [ -f "./wesnoth" -a -x "./wesnoth" ]; then
   BIN=./wesnoth
fi

WESNOTH_PARAMS="$USERDIR --log-debug=scripting/formula,scripting/lua,wml,event_handler"

DISPLAY_FILTER='processing queued | processing event |removing event |inserting event handler |Processing queued events|enter_hex|exit_hex|sighted'

LOG_FILTER="active handlers are now"

$BIN $WESNOTH_PARAMS $* 2>&1 | grep --line-buffered -v "$LOG_FILTER" | tee wesnoth.log | egrep -v "$DISPLAY_FILTER"


Of course that provides minimal help for cases when wesnoth provides error messages with minimal information what went wrong.
shrieker1
 
Posts: 21
Joined: August 7th, 2017, 5:53 pm


Return to WML Workshop

Who is online

Users browsing this forum: No registered users and 4 guests