Wesnoth Units Database: MISSILE_FRAME bug

Discussion of all aspects of the website, wiki, and forums, including support requests and new ideas.

Moderators: Forum Moderators, Developers

Generous
Posts: 47
Joined: July 4th, 2011, 7:28 am

Wesnoth Units Database: MISSILE_FRAME bug

Post by Generous » March 20th, 2015, 9:07 pm

Today I've re-checked the status of my era in Wesnoth Units Database, and saw a following report:

http://units.wesnoth.org/1.12/Default_C ... error.html

Unit tree failed to generate because of

Code: Select all

error config: preprocessor symbol 'MISSILE_FRAME_MUZZLE_FLARE_MISS' expects 2 arguments, but has 0 arguments at ~add-ons/Trader/units/mechanic/Pirateship.cfg:59
However there is the same problem with many other era's - even very simple ones. Just check this page:

http://units.wesnoth.org/1.12/overview.html, Ctrl+F -> search for "wml error (31 lines)" - over 100 matches...

Possible origin of problem:

Log tells us that its Wesnoth 1.10.7 version which tries to build unit trees for 1.12.1!
And, if I'm not mistaken, Wesnoth 1.10.7 and 1.12.1 have "boats"-type units stored at different locations

User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by allefant » March 20th, 2015, 9:37 pm

Log tells us that its Wesnoth 1.10.7 version which tries to build unit trees for 1.12.1!
Oh, good catch. The build system indeed was compiling from 1.10 sources instead of 1.12 sources. I fixed it so whenever the units.wesnoth.org page gets regenerated next this will be fixed. Normally it's scheduled for every Friday night (so tonight) - but for some reason my script doesn't always succeed. (I think it is because the Wesnoth server is too weak and/or unstable to run it - there's no such problems on my own server.)

User avatar
Ravana
Forum Moderator
Posts: 2244
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by Ravana » March 20th, 2015, 9:42 pm

Is there way to get more info about timeout errors there? Is that limit against large addons?

User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by allefant » March 20th, 2015, 10:26 pm

The limit is against addons who enter an infinite WML loop. It's set to 10 seconds right now I think, so if the WML parsing isn't done after that time it assumes the WML is broken.

User avatar
Ravana
Forum Moderator
Posts: 2244
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by Ravana » March 20th, 2015, 11:06 pm

Is there way to locally debug this?

User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by allefant » March 21st, 2015, 3:19 am

Well, just trying it locally. If it works locally then it just takes too long on the server for some reason. If it also takes forever locally, then can try and debug.

User avatar
Ravana
Forum Moderator
Posts: 2244
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by Ravana » March 21st, 2015, 10:43 am

If that is wmlunits in \data\tools then it returns

Code: Select all

Traceback (most recent call last):
  File "wmlunits", line 14, in <module>
    import subprocess, yaml
ImportError: No module named yaml

Generous
Posts: 47
Joined: July 4th, 2011, 7:28 am

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by Generous » March 21st, 2015, 12:28 pm

Ravana wrote:If that is wmlunits in \data\tools then it returns

Code: Select all

Traceback (most recent call last):
  File "wmlunits", line 14, in <module>
    import subprocess, yaml
ImportError: No module named yaml
Guess you need to install a python yaml module to your system:

Code: Select all

sudo pip install pyyaml
allefant wrote:10 seconds limit is against addons who enter an infinite WML loop
Some era could have a lot of units (e.g. Ageless), and - despite it could be OK - it cant be processed in time :o
What if try to build a unit tree for such eras with a larger time limit?

User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by allefant » March 21st, 2015, 4:28 pm

I just increased the timeout to 60 seconds. I seem to remember this causing more serious problems though, but we will see - just issued a manual website regeneration.

The original issue with the outdated wesnoth binary seems fixed, I'm investigating the "wml error" every single addon is getting now, but it seems to be harmless and output is still produced.

User avatar
Ravana
Forum Moderator
Posts: 2244
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by Ravana » March 21st, 2015, 4:55 pm

There is still problem that 1.10 addons show up when they are not in 1.12 server. Like http://units.wesnoth.org/1.12/Colosseum_fast/error.html that I will not port for 1.12.

Generous
Posts: 47
Joined: July 4th, 2011, 7:28 am

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by Generous » March 21st, 2015, 5:47 pm

allefant wrote:I'm investigating the "wml error" every single addon is getting now, but it seems to be harmless and output is still produced.
Yes I could see a following "error" in my era and many others (Ctrl+F --> search for "wml error (5 lines)" on page http://units.wesnoth.org/1.12/overview.html )
But in fact there is no error :hmm: It just didn't produce a unit tree

http://units.wesnoth.org/1.12/Default_P ... error.html

Code: Select all

81028 /home/allefant/1.12/temp/wmlparser_8MlR6l/wmlparser_81hBZh.cfg.plain
1 /home/allefant/1.12/temp/wmlparser_cjYsBy.cfg
Defines: SKIP_CORE,CAMPAIGN_Trader,EASY
Battle for Wesnoth v1.12.1+dev
Started on Sat Mar 21 06:14:49 2015

User avatar
Ravana
Forum Moderator
Posts: 2244
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by Ravana » March 21st, 2015, 6:53 pm

Managed to get yaml, but not use wmlunits. Ran it with

Code: Select all

"C:\Python27/python.exe" wmlunits -A -v -a "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\userdata\data\add-ons" -o "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\userdata\data\pyout" -D "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\data" -w "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\wesnoth12_0.exe" -C "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\userdata" > pytout.txt
pause
and output was

Code: Select all

C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\data\tools>"C:\Python27/pyt
hon.exe" wmlunits -A -v -a "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0
\userdata\data\add-ons" -o "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0
\userdata\data\pyout" -D "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\d
ata" -w "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\wesnoth12_0.exe" -
C "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\userdata"  1>pytout.txt

Traceback (most recent call last):
  File "wmlunits", line 617, in <module>
    parser.parse_text("{languages}")
  File "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\data\tools\wesnoth\
wmlparser2.py", line 228, in parse_text
    self.preprocess(defines)
  File "C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\data\tools\wesnoth\
wmlparser2.py", line 267, in preprocess
    err)
wesnoth.wmlparser2.WMLError: WMLError:
    0 c:\users\lenovo\appdata\local\temp\wmlparser_e_mcf5/wmlparser_0tyahx.cfg.p
lain
    ?
    Preprocessor error:
C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\wesnoth12_0.exe --data-dir
C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\data --config-dir C:\Users\
Lenovo\Desktop\wesnoth related\stable1.12.0\userdata --preprocess c:\users\lenov
o\appdata\local\temp\wmlparser_0tyahx.cfg c:\users\lenovo\appdata\local\temp\wml
parser_e_mcf5



C:\Users\Lenovo\Desktop\wesnoth related\stable1.12.0\data\tools>pause
Press any key to continue . . .
Not sure if I put correct thing for -C, help message wasnt very clear.

User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by allefant » March 21st, 2015, 8:51 pm

I don't know if it is possible to run it in Windows.

User avatar
Ravana
Forum Moderator
Posts: 2244
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by Ravana » March 21st, 2015, 9:03 pm

I dont particularly need to run it myself, my intention is to have your one work on ageless era.

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Wesnoth Units Database: MISSILE_FRAME bug

Post by iceiceice » March 22nd, 2015, 7:59 am

:hmm:

Why does it time out when it reads an era like Ageless Era? I mean the main game does not take 10 seconds to load ageless era. Is it just that parsing WML in python is slow? Or is there something going wrong.

Post Reply