Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3221 closed defect (fixed)

[PATCH] Unit with actor 'infantry_archer_b' launched a projectile but has no actor on 'projectile' attachpoint

Reported by: tom Owned by: mimo
Priority: Must Have Milestone: Alpha 19
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by elexis)

Today I tested r16616, this error also appears in other maps.

ERROR: Unit with actor 'infantry_archer_b' launched a projectile but has no actor on 'projectile' attachpoint

Attachments (5)

commands.txt (87.0 KB ) - added by tom 9 years ago.
the file
fix-t3221.diff (922 bytes ) - added by mimo 9 years ago.
from the previous comment, I think this patch would fix it. But I've made only one game (without error!). Should be tested more.
commands.2.txt (1.1 MB ) - added by elexis 9 years ago.
ERROR: Unit with actor 'champion_unit_ranged' launched a projectile but has no actor on 'projectile' attachpoint on r16829, do visual replay to reproduce (at turn 3948 of 8256).
commands.3.txt (115.2 KB ) - added by Niek 9 years ago.
ticket3221.patch (923 bytes ) - added by mimo 9 years ago.

Download all attachments as: .zip

Change History (28)

by tom, 9 years ago

Attachment: commands.txt added

the file

comment:1 by historic_bruno, 9 years ago

Summary: Queue error.ERROR: Unit with actor 'infantry_archer_b' launched a projectile but has no actor on 'projectile' attachpoint

I really wish it mentioned the entity instead of the actor :/ (#1844)

comment:2 by sanderd17, 9 years ago

historic_bruno: it happens with all civs. So most likely it's not an issue with an actor, but with some code.

I wonder how it can happen, but my guess is that it happens with switching targets and somehow animations aren't set correctly.

comment:3 by elexis, 9 years ago

I had this exact same error on a18 today!

ERROR: Unit with actor 'infantry_archer_b' launched a projectile but has no actor on 'projectile' attachpoint

Unfortunately it's not thrown when doing the replay.

comment:4 by gameboy, 9 years ago

Urban stages, this error will appear.

comment:5 by elexis, 9 years ago

gameboy do you know a way to reproduce this error?

comment:6 by gameboy, 9 years ago

@elexis :Construction stage is in town to appear again this error.

comment:7 by elexis, 9 years ago

Can you upload a commands.txt with the minimum amount of commands possible, which produces this error?

comment:8 by gameboy, 9 years ago

I have uploaded the file commands.txt. I have just fixed the error.

in reply to:  8 comment:9 by elexis, 9 years ago

Replying to gameboy:

I have uploaded the file commands.txt.

The original commands.txt file has many commands in it, so it is hard to find out which one causes the error, since replaying the commands.txt doesn't throw the error.

But if we had a commands.txt file that has only 2-3 commands or so, then we might be able to reproduce it by doing the same commands in a game.

Replying to gameboy:

I have just fixed the error.

How?

comment:10 by tom, 9 years ago

I find a new error.

comment:11 by gameboy, 9 years ago

I try to equip archers with bows, but still this error occurred in battle.

comment:12 by trompetin17, 9 years ago

More information about the error

ERROR: Unit with actor 'infantry_javelinist_b' launched a projectile but has no actor on 'projectile' attachpoint ERROR: "Attack.prototype.PerformAttack@simulation/components/Attack.js:552:8 UnitAI.prototype.UnitFsmSpec.INDIVIDUAL.COMBAT.ATTACKING.Timer@simulation/components/UnitAI.js:1849:7 FSM.prototype.ProcessMessage@simulation/helpers/FSM.js:274:29 UnitAI.prototype.TimerHandler@simulation/components/UnitAI.js:3782:68 Timer.prototype.OnUpdate@simulation/components/Timer.js:100:4" WARNING: 7723

comment:13 by sanderd17, 9 years ago

trompetin17, thanks for the stack trace, that clears things up. As I expected, it has indeed to do with the UnitAI selecting a new target.

Actors only have projectiles defined when they are in the attack-ranged animation cycle. That animation is normally set when entering the ATTACKING state in UnitAI line 1790.

However, when just switching targets, UnitAI doesn't witch state, so the animation stays on attack-capture (certainly for the first attack, possibly also for the other ones).

So we should find a way to re-initialise the attacking state properly before chosing a new target.

by mimo, 9 years ago

Attachment: fix-t3221.diff added

from the previous comment, I think this patch would fix it. But I've made only one game (without error!). Should be tested more.

comment:14 by leper, 9 years ago

Why is the attack type not updated?

comment:15 by elexis, 9 years ago

Reproducible with r16753 and visually replaying my commands.txt in ticket:3292#attachment:t3292_commands.txt_oos_dump.7z with the -replay-visual=commands_elexis.txt argument.

Enable the timewarp mode with the developers tool (Alt+D), hit space to increase the speed by 20x and backspace to rewind. The error appears minute 13 and 10 seconds.

comment:16 by sanderd17, 9 years ago

elexis, and can you confirm that mimo's patch fixes it?

comment:17 by elexis, 9 years ago

When visually replaying the commands.txt linked above, you get an oos at 8m 10s. However the projectile error appears reliably at 13m 10s.

If you apply the patch and replay it, then the game is oos way earlier. However the error doesn't appear anymore and the gamestate doesn't seem to be more oos than in the other case...

Maybe we can identify the unit that causes the error in that replay and find an easy way to reproduce the error?

by elexis, 9 years ago

Attachment: commands.2.txt added

ERROR: Unit with actor 'champion_unit_ranged' launched a projectile but has no actor on 'projectile' attachpoint on r16829, do visual replay to reproduce (at turn 3948 of 8256).

comment:18 by elexis, 9 years ago

Component: Core engineUI & Simulation
Description: modified (diff)
Keywords: patch review added
Milestone: BacklogAlpha 19
Priority: Should HaveMust Have
Summary: ERROR: Unit with actor 'infantry_archer_b' launched a projectile but has no actor on 'projectile' attachpoint[PATCH] Unit with actor 'infantry_archer_b' launched a projectile but has no actor on 'projectile' attachpoint

The error is still prevalent and it will be very annoying in the next release if not fixed (once the rror occcurs, it occurs many times and overwrites the chat). mimo uploaded a patch that should fix it. But since we can't reproduce it easily yet, we don't have a proof it will fix it.

by Niek, 9 years ago

Attachment: commands.3.txt added

comment:19 by Niek, 9 years ago

I have had a game where this error occured on a large scale. Note that this game was played using Rise of the East

comment:20 by elexis, 9 years ago

Today niektb found a way to reproduce the error reliably!

(20:40:57) niektb: When you move your crossbowmen into the enemies village, start capturing a house. When they just start doing that, attack an enemy unit nearby (that probably was killing your units)

Now we only need to verify the patch using that recipe.

by mimo, 9 years ago

Attachment: ticket3221.patch added

comment:21 by mimo, 9 years ago

A better patch. The previous one was forcing to reset the animations at each attack, while this one correctly initialize the oldAttack type, thus allowing to reset the animation only when the type changed.

comment:22 by mimo, 9 years ago

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 17075:

fix initialization of this.oldAttackType used for resetting the attack anims, fix #3221

comment:23 by sanderd17, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.