Opened 3 years ago

Closed 2 years ago

#6125 closed defect (duplicate)

'Infinite loop' of sorts in UnitAI+guarding

Reported by: Freagarach Owned by:
Priority: Must Have Milestone:
Component: Simulation Keywords:
Cc: Patch:

Description (last modified by wraitii)

"INDIVIDUAL.GuardedAttacked' pushes an order to the front when the guarded entity is attacked.

Unfortunately, that completely fails to account for infinite loops.

As such, an infinite number of orders can be added over sufficient # of turns, which can end up crashing the stack.

Attachments (2)

commands.txt (181.5 KB ) - added by Freagarach 3 years ago.
r25175
commands.2.txt (57.7 KB ) - added by wraitii 3 years ago.
more minimal repro (doesn't crash though)

Download all attachments as: .zip

Change History (10)

by Freagarach, 3 years ago

Attachment: commands.txt added

comment:1 by wraitii, 3 years ago

Description: modified (diff)
Summary: Segfault in UM'Infinite loop' of sorts in UnitAI+guarding

I'm not entirely sure how the entity ends up unable to move in your OG replay, but the core of the bug is easily reproducible: guard a building under attack. Many redundant 'Repair' orders are pushed to the front.

by wraitii, 3 years ago

Attachment: commands.2.txt added

more minimal repro (doesn't crash though)

comment:2 by Freagarach, 3 years ago

So basically a duplicate of #6007?

comment:3 by wraitii, 3 years ago

I don't think so, if I understand correctly 6007 is about multiple guards doing complex computations; The issue here is that a single unit gets thousands of orders.

comment:4 by Freagarach, 3 years ago

Nah, the issue in 6007 is multiple entities getting hunderds of messages, thus push order fronts ;)

comment:5 by wraitii, 3 years ago

Milestone: Alpha 25Alpha 26

comment:6 by Silier, 3 years ago

Component: Core engineSimulation

comment:7 by Silier, 2 years ago

Owner: wraitii removed
Status: assignednew

comment:8 by Freagarach, 2 years ago

Milestone: Alpha 26
Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.