Nothing entered.
[http://sourceforge.net/p/ufoai/bugs/3179 Item 3179] imported from sourceforge.net tracker on 2013-01-28 20:02:17
Version: 2.4-dev IA-32 Mar 23 2012 Win32 RELEASE
Map: Village commercial (terror mission with landed harvester)
During boarding of the alien craft, one of my soldiers used a gas grenade but was too close and stunned himself. I completed my turn and I estimate three aliens were left operational at that point. I saw two of them moving outside, one of which finishing movement on top of my stunned soldier; then the alien turn did not progress further. Using Retry from the menu froze the game and I had to Ctrl-Alt-Del. This may have interrupted the writing of ufoconsole.log, the last entry in there is half an hour earlier.
===== Comments Ported from Sourceforge =====
====== aprogas (2012-03-23 19:11:08) ======
truncated ufoconsole.log
====== aprogas (2012-03-23 19:14:32) ======
gzipped events.log from that combat
====== darkrainx (2012-05-13 17:11:56) ======
It is caused by an endless loop in AI_ActorThink()
Since the attacker is standing on its target G_ClientShoot() will fail, then since a stunned actor is considered dead by G_IsDead() AI_PrepBestAction() will be called again, but since the same stunned actor is considered alive by G_EdictsGetNextLivingActor() the very same target will be chosen again, repeating the loop ad infinitum.
It can also affect panicked soldiers that are trying to shoot their teammates and end up standing on them.
====== tlh2000 (2012-05-13 17:37:22) ======
nice catch darkrainx
====== darkrainx (2012-05-14 00:43:02) ======
Ugh, there's another way the endless loop can happen: AI_FighterCalcBestAction() is using ent->TU for calculating the number of shoots available to the actor, but that includes reserved TUs, thus G_ClientShoot() can fail due to not enough TUs, leading to the same endless loop if the chosen target is stunned.
====== darkrainx (2012-05-14 01:56:51) ======
Cannot attach a file to a tracker item not owned by me, so I posted patch #3526445 here:
http://sourceforge.net/tracker/?func=detail&aid=3526445&group_id=157793&atid=805244
====== nokim (2012-05-14 19:01:05) ======
In my case situation differ but result is same - alien turn does not complete.
Two times:
1. All aliens were dead and i won (according to console), but last alien killed by reaction fire was left staying. If hover him by mouse hint was displayed and such. There were no any death animation or my soldier's shooting (was lag in video however). So alien was dead and alive in same time in different parts of game?
2. I switched soldiers during alien turn. He was attacked at that moment. Got infinite waiting.
In both cases i exited game using menu.
====== tlh2000 (2012-05-14 21:53:25) ======
applied the fix with 9b2d3b4e9cd7643b77e9c433803607654dc97b38 - not yet merged into 2.4
====== histidine (2012-10-22 07:53:42.964000) ======
Bug still occurs as of 2.5-dev Oct 21/22 (git).
May I ask if there's a reason this fix hasn't been merged yet, or if it already is and there are other possible causes of the bug?
====== tlh2000 (2012-10-22 11:18:02.537000) ======
one issue was fixed and merged - i suspect you've found another one.
====== histidine (2012-10-23 08:23:38.088000) ======
Well, it happened again (crashed UFO, Community Center).
Nothing unusual happened that I could see. Previous round I killed an alien with a PB pistol by opening the door, firing, closing the door, repeat once (to avoid reaction fire, but it didn't work). Then on the alien's turn, two civilians were killed by one needler volley.
ufoconsole.log reports I killed an alien with reaction fire from a laser rifle immediately after, but I didn't see this onscreen.
Win7 32 bit, 2.5-dev IA-32 Oct 22 2012 Win32 RELEASE build 1350847733.
Compiled locally on 2012.10.22 16:08:05 (UTC+8), using (IIRC) then-latest master.
ufoconsole.log and events.log in attached 7z
====== tlh2000 (2012-10-23 12:09:43.447000) ======
two kills with one shot - maybe that causes the issue. we already had problems with this earlier.
====== tlh2000 (2012-12-16 19:15:29.220000) ======
afair you fixed this already, no?
====== darkrainx (2012-12-16 19:36:22.515000) ======
Unending alien turns related to stunned soldiers are fixed, if someone encounters other causes for this, please make a separate bug report so those can be properly addressed.