Unit appearance causing the game to crash
Moderator: Forum Moderators
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.
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Unit appearance causing the game to crash
Okay. So, in case revansurik doesn't do it, I hope you feel responsible for this task, since you know most about reproducing it.mattsc wrote:Still, this is a bug that should be reported (and hopefully get fixed). Even if the WML is incorrect (I'm not sure that it is), Wesnoth should never crash to desktop on a WML error, as already stated above.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
- revansurik
- Posts: 604
- Joined: October 17th, 2012, 11:40 pm
- Location: Brazil
- Contact:
Re: Unit appearance causing the game to crash
Ok, so where do I send the bug report?
Author of the Dragon Trilogy.
If you enjoyed A Song of Fire, War of the Jewel, Aria of the Dragon-Slayer and Soldier of Wesnoth, you may like my new project: Star of Chaos, a science-fiction mystery/adventure intended to be a trilogy ;-)
If you enjoyed A Song of Fire, War of the Jewel, Aria of the Dragon-Slayer and Soldier of Wesnoth, you may like my new project: Star of Chaos, a science-fiction mystery/adventure intended to be a trilogy ;-)
Re: Unit appearance causing the game to crash
http://bugs.wesnoth.orgrevansurik wrote:Ok, so where do I send the bug report?
Re: Unit appearance causing the game to crash
To be precise, the incorrect thing in that line is the second “!“ in the middle. The starting one can stay.Code: Select all
!,Wwf,*^B*,!,W*,W*^V*,Chs,Chw,S*,S*^V*,Q*#enddef
(exclamation marks means in formula wml that the string is reversed, so the above is identical to:
Code: Select all
[not]
terrain=Wwf,*^B*,W*,W*^V*,Chs,Chw,S*,S*^V*,Q*
[/not]
Re: Unit appearance causing the game to crash
Not exactly. First off, this should not be confused with formulas as special attribute values (the word "formula" is potentially misleading here). Secondly, the exclamation point only reverses the meaning of the string that follows it, not the entire string.trewe wrote:(exclamation marks means in formula wml that the string is reversed,
(In particular, these two exclamation points do not cancel each other out completely. The meaning of "terrain=!,Wwf,*^B*,!,W*,W*^V*,Chs,Chw,S*,S*^V*,Q*" is "not fords, nor anything with a bridge, but otherwise include all water, water with a village, swamp human ruins, sunken human ruins, swamps, swamp with a village, and unwalkable terrain". If you remove both exclamation points, fords and bridges get included rather than excluded.)
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Unit appearance causing the game to crash
It isn't formula wml at all, is it ? Just an additional feature of how terrain strings can be passed to the engine.JaMiT wrote:Not exactly. First off, this should not be confused with formulas as special attribute values (the word "formula" is potentially misleading here).trewe wrote:(exclamation marks means in formula wml that the string is reversed,
This statement is based on interpretation or debugging the code which parses such terrain strings ? (Where is it, I was debugging the bug a bit.)Secondly, the exclamation point only reverses the meaning of the string that follows it, not the entire string.
(In particular, these two exclamation points do not cancel each other out completely. The meaning of "terrain=!,Wwf,*^B*,!,W*,W*^V*,Chs,Chw,S*,S*^V*,Q*" is "not fords, nor anything with a bridge, but otherwise include all water, water with a village, swamp human ruins, sunken human ruins, swamps, swamp with a village, and unwalkable terrain". If you remove both exclamation points, fords and bridges get included rather than excluded.)
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: Unit appearance causing the game to crash
Correct. I was just refraining from bluntly saying "you're wrong" (for once).Anonymissimus wrote:It isn't formula wml at all, is it ? Just an additional feature of how terrain strings can be passed to the engine.
It's based on what the wiki says (under FilterWML -- there is even an example there addressing two exclamation points). I have looked at this a bit, but ran out of time before analyzing how the string is parsed. I think it is done by terrain_matches() in terrain_translation.cpp, though.Anonymissimus wrote:This statement is based on interpretation or debugging the code which parses such terrain strings ? (Where is it, I was debugging the bug a bit.)JaMiT wrote:Secondly, the exclamation point only reverses the meaning of the string that follows it, not the entire string.
(In particular, [example given].)
If you want to look at that, I can (if I get time -- always an issue these days) focus more on the infinite recursion being triggered. (My initial perusal suggests the terrain string is being misinterpreted AND there is a logical flaw in the recursion. Two problems, one uncovering the other. Not sure about that though.)
- vinipsmaker
- Posts: 4
- Joined: July 1st, 2012, 9:27 pm
- Contact:
Re: Unit appearance causing the game to crash
Bug fixed:JaMiT wrote:[...]
If you want to look at that, I can (if I get time -- always an issue these days) focus more on the infinite recursion being triggered. (My initial perusal suggests the terrain string is being misinterpreted AND there is a logical flaw in the recursion. Two problems, one uncovering the other. Not sure about that though.)
https://github.com/wesnoth/wesnoth-old/pull/3
=D