1.18 SP Campaign - Bad Moon Rising

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by Battlecruiser_Venca »

BUG:
In current git wesnoth (03718d5-Clean)
In BMR3-Escape the Legion when Ares attacks, the game crashes (SIGSEGV)

Not sure if it's an upstream bug, but it happened only there so far for me
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by doofus-01 »

The only thing I see for Ares in that scenario are some moveto events with deprecated [ai] aspects, but that shouldn't cause a crash. Can you post a save-file?

Thanks.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by Battlecruiser_Venca »

Here it is...

BTW OS is Linux Mint 16
Attachments
BMR3-Escape_the_Legion-Automatické_uložení8.bz2
(60.61 KiB) Downloaded 390 times
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by doofus-01 »

I'm using plain old BfW 1.11.6, also on linux, and couldn't reproduce the problem, so it looks like an upstream bug. Not sure what I can do at this point.

But still, thanks for the report.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by Battlecruiser_Venca »

1.11.7 is out in git and problem persists

bt:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0x00000000014f7670 in combatant::combatant(battle_context_unit_stats const&, combatant const*) ()

(gdb) bt
#0  0x00000000014f7670 in combatant::combatant(battle_context_unit_stats const&, combatant const*) ()
#1  0x00000000012c152a in battle_context::get_attacker_combatant(combatant const*) ()
#2  0x00000000013aedca in ai::attack_analysis::analyze(gamemap const&, unit_map&, ai::readonly_context const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, double) ()
#3  0x000000000149d71b in ai::testing_ai_default::aspect_attacks::do_attack_analysis(map_location const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, map_location const*, bool*---Type <return> to continue, or q <return> to quit---
, std::vector<map_location, std::allocator<map_location> >&, std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> >&, ai::attack_analysis&, team const&) const ()
#4  0x000000000149c3f1 in ai::testing_ai_default::aspect_attacks::analyze_targets() const ()
#5  0x000000000149bcb8 in ai::testing_ai_default::aspect_attacks::recalculate() const ()
#6  0x00000000014815eb in ai::typesafe_aspect<std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> > >::get_ptr() const ()
#7  0x0000000001480f7a in ai::composite_aspect<std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> > >::recalculate() const ()
#8  0x00000000014815eb in ai::typesafe_aspect<std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> > >::get_ptr() const ()
#9  0x0000000001481569 in ai::typesafe_aspect<std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> > >::get() const ()
#10 0x0000000001385f0c in ai::readonly_context_impl::get_attacks() const ()
#11 0x000000000132d1c3 in ai::readonly_context_proxy::get_attacks() const ()
#12 0x00000000014a8219 in ai::testing_ai_default::combat_phase::evaluate() ()
#13 0x00000000014e18b5 in ai::testing_ai_default::candidate_action_evaluation_loop::do_play_stage() ()
#14 0x000000000136ee85 in ai::stage::play_stage() ()
#15 0x0000000001339c96 in ai::ai_composite::play_turn() ()
#16 0x00000000013fd1f8 in ai::manager::play_turn(int) ()
---Type <return> to continue, or q <return> to quit---
#17 0x0000000001881e5f in playsingle_controller::play_ai_turn() ()
#18 0x0000000001880df4 in playsingle_controller::play_side(unsigned int, bool)
    ()
#19 0x0000000001880929 in playsingle_controller::play_turn(bool) ()
#20 0x000000000187f0d2 in playsingle_controller::play_scenario(std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool) ()
#21 0x000000000187446e in playsingle_scenario(config const&, config const*, display&, game_state&, std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool, end_level_data&) ()
#22 0x000000000187653d in play_game(game_display&, game_state&, config const&, io_type_t, bool, bool) ()
#23 0x00000000015ef29e in game_controller::launch_game(game_controller::RELOAD_GAME_DATA) ()
#24 0x00000000010ec4b4 in do_gameloop(int, char**) ()
#25 0x00000000010ec9d1 in main ()
User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by Crendgrim »

A crash should (ideally) never happen because of UMC. You'd best report it at bugs.wesnoth.org. :)
UMC Story Images — Story images for your campaign!
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by doofus-01 »

For what it's worth, I installed BfW 1.11.7 and now I get the crash too. I deleted those moveto events with the deprecated [ai] stuff from the savefile, but the crash still occurs. I created a "war god" with debug in another campaign, and it crashed when it was the AI turn. It also crashed when the AI was going to use a different "overpowered unit", but it didn't always do it, so I'm not even sure the "overpowered-ness" has anything to do with it.

If there is a work-around I can do, it will take me some time to figure out.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by mattsc »

Hi doofus,

Several of us (flixx, fabi, myself) have been looking into this (as Crendgrim says, it should never be possible to crash Wesnoth through WML) and found what causes this crash. fabi will fix it for 1.11.8.

In the meantime, the WML reason why this is occurring, and why it only happens sometimes, is that Primeval Ares has two attacks, but only one of them has non-zero attack_weight. From Archaic_Resources/units/Primeval_Ares.cfg:

Code: Select all

    [attack]
        name=enervation
        description= _ "enervation"
        type=arcane
        range=ranged
        damage=10
        number=3
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
            {WEAPON_SPECIAL_SLOW}
        [/specials]
        # does attack_weight do anything?
        attack_weight=0.0
        icon=attacks/lightbeam.png
    [/attack]
You're asking there whether the attack_weight does anything? It does indeed, it makes 1.11.7 crash. ;)

More seriously though, this means that the work-around for this is to give this attack a very small weight instead of zero (I tested it with attack_weight=0.00001 and the crash is gone then). If it is really essential that Ares never attacks with that weapon, but that he still defends himself with it when attacked with a ranged weapon, you could do a more complex work-around by removing this attack at the beginning of the AI turn and replacing it at the end of it.

Of course, if you have other units like this, you'll have to change it for them as well until 1.11.8 is out.

I hope that makes sense. If there are follow-up problems, please let us know.
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by doofus-01 »

Hello mattsc,
mattsc wrote:Several of us (flixx, fabi, myself) have been looking into this (as Crendgrim says, it should never be possible to crash Wesnoth through WML) and found what causes this crash. fabi will fix it for 1.11.8.
Great news, thank you.
mattsc wrote:More seriously though, this means that the work-around for this is to give this attack a very small weight instead of zero (I tested it with attack_weight=0.00001 and the crash is gone then). If it is really essential that Ares never attacks with that weapon, but that he still defends himself with it when attacked with a ranged weapon, you could do a more complex work-around by removing this attack at the beginning of the AI turn and replacing it at the end of it.
The 0.00001 solution should be OK. It wouldn't hurt to revisit Ares' (and a few other) design anyway.
mattsc wrote:I hope that makes sense. If there are follow-up problems, please let us know.
It makes sense, and should keep my add-ons from being broken during BfW 1.11.7. Thanks again.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by AI »

User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by doofus-01 »

1.6.1 has been uploaded to the 1.12 server. I'm working my way through this, fixing problems as I see them. I am up to Part 1: Join the Dark Side*, so most broken animations and balance issues have been addressed up to that point. I hope to have an update next week that totally cleans up Part1, and maybe wades into the first scenario of Part 2, but this update is still an improvement over the previous versions.

*-cheese is delicious!
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by doofus-01 »

1.6.2 has been uploaded to the 1.12 server. I adjusted and updated Part 1 (last scenario should be easier), and even fixed a few minor things in Part2 (updating the ellipse being the most obvious).

I think the most obvious parts to work on are the Villages/Shops. But the skirmishes still need some work too.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by doofus-01 »

It seems I should have held off releasing an update, because I got some changes today that are significant enough to warrant another upload. So, 1.6.3 has been uploaded to the BfW 1.12 server.

I made some adjustments to the skirmishes, so that the maps are padded with an additional 5-hex border that need to be traversed for the AI to run away. I've replaced the FormulaAI for running away with MicroAI (in the skirmishes - I still need to do that for the real scenarios). There were a few graphics/interface updates as well. There's still work to do with those skirmishes, but it should be a noticeable improvement.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
doofus-01
Art Director
Posts: 4122
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: 1.10 and 1.11 SP Campaign - Bad Moon Rising

Post by doofus-01 »

1.6.4 has been uploaded to the 1.12 server.

The skirmishes still need some work, but I think it's getting better: I've added some more orcish units and changed the worldmap-skirmish unit type selection process.

I've also added a couple more choices to the shops.

I'm currently up to the part where Huric attacks Fort Khule (in Part 2); there are a couple of bug-fixes & dialogue improvements up to that point.
--------------
I think this campaign would do better with more than level=3 units, but maybe an alternative is to give silent [objects] to the enemy units. In any case, there is still some work to be done in getting skirmish balance to jibe with scenario balance.

Please let me know if you see something clunky, even if it can be played around. Thanks.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Post Reply