#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 )
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)
Change History (28)
by , 9 years ago
Attachment: | commands.txt added |
---|
comment:1 by , 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 , 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 , 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:7 by , 9 years ago
Can you upload a commands.txt with the minimum amount of commands possible, which produces this error?
follow-up: 9 comment:8 by , 9 years ago
I have uploaded the file commands.txt. I have just fixed the error.
comment:9 by , 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:11 by , 9 years ago
I try to equip archers with bows, but still this error occurred in battle.
comment:12 by , 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 , 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 , 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:15 by , 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:17 by , 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 , 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 , 9 years ago
Component: | Core engine → UI & Simulation |
---|---|
Description: | modified (diff) |
Keywords: | patch review added |
Milestone: | Backlog → Alpha 19 |
Priority: | Should Have → Must 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 , 9 years ago
Attachment: | commands.3.txt added |
---|
comment:19 by , 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 , 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 , 9 years ago
Attachment: | ticket3221.patch added |
---|
comment:21 by , 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:23 by , 8 years ago
Keywords: | review removed |
---|
the file