Opened 6 years ago

Closed 6 years ago

#5079 closed defect (fixed)

Segfault after an attack/gather infinite loop after promotion

Reported by: elexis Owned by:
Priority: Must Have Milestone: Alpha 23
Component: UI & Simulation Keywords:
Cc: Patch: Phab:D1406

Description

We had this match on Fields Of Meroe and it abruptly ended with a segfault.

The segfault can be reproduced using the nonvisual replay and r21576.

Attachments (1)

commands.txt (137.9 KB ) - added by elexis 6 years ago.

Download all attachments as: .zip

Change History (7)

by elexis, 6 years ago

Attachment: commands.txt added

comment:1 by temple, 6 years ago

Happened when a unit attacked a giraffe and was promoted. It created an infinite loop of Order.Attack and Order.Gather in UnitAI for the original entity (due to the change in r20393). Maybe abort somewhere in one or both of these by checking if entity's inWorld.

comment:2 by elexis, 6 years ago

Summary: An a23 segfault in the simulationSegfault after an attack/gather infinite loop after promotion

comment:3 by mimo, 6 years ago

I had a look at it, and the easiest fix seems to add cmpCurrentUnitAI.Stop() inside Promotion.js when we put the unit OutOfWorld. The alternative would be to early return false in all orders (not only those two) when not InWorld.

Edit: the same change should also be done in helpers::Transform.js

Last edited 6 years ago by mimo (previous) (diff)

comment:4 by mimo, 6 years ago

In fact, the solution i proposed was not so straightforward than i thought because the Promotion is done from within a timer. So in phab:D1406 i've done it another way: aborting additional orders in FinishOrder when out of world.

comment:5 by elexis, 6 years ago

Patch: Phab:D1406

comment:6 by mimo, 6 years ago

Resolution: fixed
Status: newclosed

fixed by r21594 from phab:D1406

Note: See TracTickets for help on using tickets.