Page MenuHomeFeedback Tracker

Replication stalled when send too big array<string>
Closed, ResolvedPublic

Description

if you send a big array of strings it create a replication stalled issue for the player

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

You can try removing one entry in the array<string> unlocked_items variable created in KOTH_BackendApiGameModeComponent.WB_GetFakeProfile and you'll see that peer tool can now join with no issue

Additional Information

Hey, think a koth player found an interesting issue, the guy could not play because at team selection the group wasnt appearing and after being stuck here a minutes or so he got a replication stalled issue (i tried and could reproduce on my pc too)
after investigation i found that the culprit is the list of unlocked items being too big, i just removed some entries and now he can play again.

I am trying now in WB and i dont have the stalled issue (i guess it might not trigger using diag execs ?) but i can replicate the team selection issue with a peer tool
how am I trying is that i have this method that create the player profile

void WB_GetFakeProfile(int playerId)
    {
        string playerUID = KOTH_Helper.GetPlayerUID(playerId);
        string playerName = GetGame().GetPlayerManager().GetPlayerName(playerId);
        KOTH_PlayerProfileJson profile = new KOTH_PlayerProfileJson();
        profile.m_playerUID = playerUID;
        profile.m_playerName = playerName;
        profile.AddLevel(101);
        profile.AddMoney(9999999);
        profile.AddXp(1900000);
        profile.AddXp(1900000);

        KOTH_BackendApiGameModeComponent kothBackendApiGameModeComp = KOTH_BackendApiGameModeComponent.Cast(GetGame().GetGameMode().FindComponent(KOTH_BackendApiGameModeComponent));
        kothBackendApiGameModeComp.AddProfileToCurrentList(profile);
        kothBackendApiGameModeComp.DoRpcSyncProfileToPlayer(profile);
        
        if (!m_sessionDataGameComp.m_sessionPlayersData.Contains(playerUID))
            m_sessionDataGameComp.m_sessionPlayersData.Insert(playerUID, new KOTH_SessionPlayerData());
    }

i just need to add

array <string> unlocked_items = {
    "{BFC763A0EC802042}Prefabs/Weapons/Rifles/KOTH_3RBN_HK416_VFG.et",
    ... with around 55 entry like that
};
profile.m_unlockedItems.InsertAll(unlocked_items);

and the peer tool get weirdly stuck like that which would result in a stalled error on the server after a minute or so
https://cdn.discordapp.com/attachments/506882186058793005/1265613348301570059/image.png?ex=66a225c8&is=66a0d448&hm=c2d2e6a70f3ab50e0726c368e2e6f4fde11cef863d2a9ecc11388a233189b8b9&

Event Timeline

Sen created this task.Jul 24 2024, 2:13 PM
Sen changed Severity from None to Major.
Sen changed Reproducibility from N/A to Always.
Sen updated the task description. (Show Details)
Sen edited Steps To Reproduce. (Show Details)Jul 24 2024, 4:16 PM
Sen edited Additional Information. (Show Details)
Sen edited Additional Information. (Show Details)
Sen edited Additional Information. (Show Details)
Geez changed the task status from New to Assigned.Jul 25 2024, 10:02 AM
Geez closed this task as Resolved.Aug 2 2024, 10:38 AM
Geez claimed this task.
Geez added a subscriber: Geez.

Hello Sen.
This should be resolved for the next major update.
Regards,
Geez

Sen added a comment.Aug 5 2024, 10:54 PM

hey Geez,

awesome thanks <3