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)
Change History (7)
by , 6 years ago
Attachment: | commands.txt added |
---|
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Summary: | An a23 segfault in the simulation → Segfault after an attack/gather infinite loop after promotion |
---|
comment:3 by , 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
comment:4 by , 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 , 6 years ago
Patch: | → Phab:D1406 |
---|
comment:6 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
fixed by r21594 from phab:D1406
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.