After calling WorkshopApi::ScanOfflineItems() on a client, the game will freeze while the window is not active.
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10
- Category
- General
Steps To Reproduce
- Create some logic that calls ScanOfflineItems on the client. For example, a subworld of MpTest with a trigger that calls this when entered.
- Run this world in the Dedicated Server Tool with one client, force update disabled (like normally in the game).
- To make the freeze noticable, create some AI using GM and have them fight. This ensures you will hear the gunshots stop when the window is no longer active, and will also create workload which will become relevant later.
- Without running the Offline Items Scan, go to a different window. The game will keep running in the background, you will hear the gunshots and everything is normal.
- Trigger the Offline Items Scan, then tab out of the window again. The gunfire immiteately stops, the client stops processing things.
- Tab back into the window after a bit, and the game will be frozen for a while as it catches up - the waiting time depends on how long you weren't in the window, and how many things happened.
This issue keeps happening until the client rejoins the server.
Additional Information
I need to perform this offline items scan, because otherwise WorkshopApi::GetPageScenarios() will return an empty list.
I do not know any other ways to get all scenarios on the server, please also let me know if there is another way.