if you send a big array of strings it create a replication stalled issue for the player
Description
Details
- Severity
- Major
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- General
- Open the ReproKothTooBigArray mod (https://reforger.armaplatform.com/workshop/61F0A58F93F5D165) in WB with a peer tool
- Launch the reprotoobigarray world
- Peer tool is stuck in loading
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
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&