HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. "Read more...":https://support.plan.io/news/187
Bug #764976
closedServer wants us to remove unit id 1289, but we don't know about this unit! (Diplomat)
0%
Description
Couple of reproducible instances of this message, both with Diplomats:
1: Server wants us to remove unit id 1289, but we don't know about this unit!
26c2c3_timurid-T0284-Y01818-auto.sav.bz2
[l tgt="unit" id=1289 /]
Hit Turn Done.
1: Server wants us to remove unit id 483, but we don't know about this unit!
26c2c3_timurid-T0307-Y01841-auto.sav.bz2
[l tgt="unit" id=483 /]
Hit Turn Done.
Originally seen with something between 2.6.0-RC1-RC2, reproduced with RC2 + a few commits.
I'm not yet sure what happened to the units to cause them to be removed. For the first one, I think it might have been killed by [l tgt="unit" id=1250 name="Musketeers" /], but I'm not sure.
(I don't think this is likely to be related to #736060, since these aren't unique units.)
Files
Updated by Marko Lindqvist over 2 years ago
At least the turn 307 one is an allied diplomat that gets killed.
We have never seen it as it's stealthy unit, but when server checks if client should have been aware of the unit, can_player_see_unit_at() has this code:
/* Allied or non-hiding units are always seen. */
if (pplayers_allied(unit_owner(punit), pplayer)
|| !is_hiding_unit(punit)) {
return TRUE;
}
I think the part about allied units always being visible is simply wrong. That's not how other parts of the code are implemented. Shared vision would make more sense here.
Updated by Marko Lindqvist over 2 years ago
Server tries to send unit several times (as packet_unit_short_info). I've debugged that all the way to the packets_gen.c code. But client side never receives it. This starts to look more like low-level networking code bug than server logic bug.
Updated by Marko Lindqvist over 2 years ago
Marko Lindqvist wrote:
But client side never receives it.
That was user error. Client does know about the unit until it dies. Then it gets removed twice, and latter of those gives the error.
server_remove_unit_full() reduces vision before removing unit from onlookers for the very reason to avoid both of those actions potentially sending remove_unit. That doesn't work perfectly for stealth unit that loses V_INVIS vision but retains V_MAIN vision in vision reduction. Since it goes invisible with V_INVIS reduction, it gets removed. However, later removal of unit (because it has died) assumes it to be visible as can_player_see_unit_at() considers allied stealth units to be visible on seen (V_MAIN) tiles.
Updated by Marko Lindqvist over 2 years ago
- File 0025-Don-t-hide-allied-stealth-units-on-seen-tiles.patch 0025-Don-t-hide-allied-stealth-units-on-seen-tiles.patch added
- File 0013-Don-t-hide-allied-stealth-units-on-seen-tiles.patch 0013-Don-t-hide-allied-stealth-units-on-seen-tiles.patch added
- File 0010-Don-t-hide-allied-stealth-units-on-seen-tiles.patch 0010-Don-t-hide-allied-stealth-units-on-seen-tiles.patch added
- Category set to Server
- Status changed from New to Resolved
- Sprint/Milestone set to 2.6.3
Updated by Marko Lindqvist over 2 years ago
- Status changed from Resolved to Closed
- Assignee set to Marko Lindqvist