Follow-up Comment #1, bug #21804 (project wesnoth): 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: https://github.com/wesnoth/wesnoth-old/blob/30c3a9c287a0e3420c918181a6de6b79e01c2b2f/src/unit_animation.cpp#L1428 - 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.) _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?21804> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Wesnoth-bugs mailing list [email protected] https://mail.gna.org/listinfo/wesnoth-bugs
