bugBattle for Wesnoth - Bugs: bug #21804, unexpected death animation

Show feedback again

bug #21804: unexpected death animation

Submitted by:  Anonymissimus <anonymissimus>
Submitted on:  Sun Mar 16 20:14:09 2014  
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.11.11+devOperating System: any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Mon Mar 17 08:23:29 2014, comment #1:

I wonder if it has anything to do with failure of some of the unit tests of the unit_map object:

chris@chris-KLR650 ~/wesnoth-src/clone/wesnoth-old $ ./test
src/tests/test_unit_map.cpp(236): error in "track_real_unit_by_iterator": Iterator should be invalid after extraction and reinsertion.
src/tests/test_unit_map.cpp(272): error in "track_fake_unit_by_iterator": Iterator should be invalid after extraction and reinsertion.

There have been a lot of bugs noticed with animations / animation pointers lately:

- mattsc notices animation segfault caused by "double kill" (rapidly hitting ctrl+k in debug mode on a unit)
at this line:


- EP: segfaults with animations of lua units, if i understand correclty... https://gna.org/bugs/?21765

Basically all of these are caused because animations are only tied by a weak (naked) pointer to the unit. When the unit is removed the animation doesn't have any way to know.

I wonder if the lack of safe pointers is causing that the animation doesn't get removed from the list of pending animations before the second unit takes the place of the first unit, with the result that the animation plays through for both. (This might make sense if some of the animation status data is stored with the unit, for example.)

Chris Beck <involution>
Project Member
Sun Mar 16 20:14:09 2014, original submission:

insert the following code into mp scenario 2p_Hamlets.cfg:
Start a game and click the right-click menu added above. This first kills kill_me and plays according animation, but also plays the animation a second time for should_live. should_live is still alive although not visible afterwards (present in the unit_map as shown by :inspect), he's just not displayed until clicking his location.
Note that it doesn't happen if kill_me is killed by an attack of the near leader.

Anonymissimus <anonymissimus>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by involution (Posted a comment)
  • -unavailable- added by anonymissimus (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup