tjensen / deathmatch.enoch

DayZ Livonia Deathmatch Mission
0 stars 2 forks source link

Player count desync #19

Closed tjensen closed 4 years ago

tjensen commented 4 years ago

I noticed that the player count (as reported by m_Identities.Count()) became out of sync with the actual player count reported by the server. It could have been related to:

SCRIPT       : PlayerDisconnected :: SurvivorBase<bbb1c8c0> :: PlayerIdentity<b9d43090> :: [...]
SCRIPT       : 8009449 | NOTIFY | [...] has left the arena
SCRIPT       : m_Identities.Count() == 6
SCRIPT       : [Logout]: Player [...] finished
SCRIPT       : inv: DayZPlayerImplement::OnItemInHandsChanged
SCRIPT       : inv: DayZPlayerImplement::OnItemInHandsChanged - human not alive! calling ResetWeaponInHands
SCRIPT       : string msg =  '[]: No Identity in Server Player List'
SCRIPT    (E):    -- Stack trace --
SCRIPT    (E):    LogMessage() scripts/3_Game/tools\debugprint.c : 226
SCRIPT    (E):    LogErrorAndTrace() scripts/3_Game/tools\debugprint.c : 126
SCRIPT    (E):    CreatePlayerList() scripts/3_Game/client\syncplayerlist.c : 28
SCRIPT    (E):    SendPlayerList() scripts/3_Game/syncevents.c : 50
SCRIPT    (E):    OnUpdate() scripts/3_Game/dayzgame.c : 2332
SCRIPT    (E):    -----------------

I think what happened was that the player disconnected after being killed and the disconnect happened before corpse processing could finish, leaving a null weak reference behind.

It might be necessary to look for (and remove) null entries from the m_Identities array.

The server also crashed a couple hours later, which might have been related to the desync.

tjensen commented 4 years ago

m_Identities is a TStringStringMap, so it's impossible for it to contain a null value. I've added some extra logging to help debug if/when this issue happens again.

tjensen commented 4 years ago

Closing this issue because I have not seen a recurrence. I believe the issue was in the base game and it was likely fixed in either 1.08 or 1.09.