View Issue Details

IDProjectCategoryLast Update
0023439AI War 2Bug - GameplayJul 23, 2020 12:24 pm
ReporterGdrk Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version2.105 Selection Hotfix 
Fixed in Version2.106 Immortals and Unresponsiveness 
Summary0023439: Extreme delays in UI
DescriptionI'm experiencing extreme delays, up to say 10+ seconds, in e.g. pausing the game, giving orders to units... seems to build up the longer you play / more stuff happens and it clears up when reloading a save. Didn't experience these problems a few versions earlier.

Seems to me something is wrong in queueing up the commands.

Save game attached just in case.
TagsNo tags attached.

Relationships

has duplicate 0023444 resolvedChris_McElligottPark Movement orders lagged/didn't register before saving no longer worked 
has duplicate 0023446 resolvedChris_McElligottPark Bug report -- Commands are delayed or not executed 

Activities

Gdrk

Jul 22, 2020 1:29 pm

reporter  

long_delays.save (297,712 bytes)

Chris_McElligottPark

Jul 22, 2020 5:12 pm

administrator   ~0057788

When things are getting slow, is there anything in the escape menu that you notice having unusually high numbers on the memory pooling section? Normally I don't ask for screenshots, but if you have one of that section from when it is really slow compared to a fresh start, then that would be super helpful.

Gdrk

Jul 22, 2020 9:16 pm

reporter   ~0057796

Didn't see the issue in a new gameplay session. I'll get back to you when I bump into it again.

Chris_McElligottPark

Jul 22, 2020 9:57 pm

administrator   ~0057799

Thanks for checking on it!

Unfortunately, despite instrumenting quite a few things, I can't duplicate the issue. I'm issuing tons of commands, but seeing them all happen properly and they are not getting caught up in the queues. I need to get some sleep, unfortunately, but if there are any methods to reproduce the problem via one of the savegames, then I'm sure I can knock it out quickly in the morning. I simply need a way to actually see the problem happen in a reasonable amount of time with some save, and then I can knock it out. I've tried 5+ minutes of rapid clicking and looking at things in battle and moving between planets, and I can't get anything to even slightly leak right now.

Chris_McElligottPark

Jul 23, 2020 12:24 pm

administrator   ~0057812

Thanks!

* Fixed a bug where it was possible that a client would send more commands to the host than it would tell the host about, and thus the host would not know to read the extra ones (or vice-versa). In single-player you are both the host and client, so it still applies.
** This was happening because of multiple threads adding to the queues of commands at the same time that the queue was being drawn down.
** This was actually something that probably could have happened since more or less forever, but it was substantially more likely in the last few versions because of some efficiency improvements we made.
** Additionally, we have now switched to using a ConcurrentQueue for each of those collections, rather than a regular Queue. This shoudl also help with potential contention.
** There was also the possibility that we might not be able to get enough commands out of the list for some reason to then send more, and we are also now guarding against that.
** Previously, this problem was manifesting as orders not being carried out when you gave them, sometimes or all the time. And things like "save my game" and "pause or unpause" not working anymore.
** We were able to duplicate this in one savegame after some time, but no longer can. Given the intermittent nature of this sort of thing, we can't say for sure that it is solved -- but the logic of what was going on makes sense, and the fix we put in should hold that at bay. It's one of those "can't prove a negative" things, at the moment, so fingers crossed it just never shows up again.
** The characteristics that we observed while this happens, if it happens to you and you want to see what you can tell us:
*** In the escape menu, under the memory pooling performance, the number of raw commands were steadily climbing. One or two every few seconds. This should never happen in that way. Increases happen, but not a steady drain flow like that.
*** In the escape menu, further down under the Commands Queued By Type, you may see some null warnings up at the top of that list, now. That wasn't there when we observed it, but it would be if it ever happened now.

Issue History

Date Modified Username Field Change
Jul 22, 2020 1:29 pm Gdrk New Issue
Jul 22, 2020 1:29 pm Gdrk File Added: long_delays.save
Jul 22, 2020 1:29 pm Gdrk File Added: long_delays.savemet
Jul 22, 2020 3:48 pm BadgerBadger Assigned To => Chris_McElligottPark
Jul 22, 2020 3:48 pm BadgerBadger Status new => assigned
Jul 22, 2020 5:12 pm Chris_McElligottPark Note Added: 0057788
Jul 22, 2020 6:49 pm Chris_McElligottPark Relationship added has duplicate 0023444
Jul 22, 2020 9:16 pm Gdrk Note Added: 0057796
Jul 22, 2020 9:36 pm Chris_McElligottPark Relationship added has duplicate 0023446
Jul 22, 2020 9:57 pm Chris_McElligottPark Note Added: 0057799
Jul 23, 2020 12:24 pm Chris_McElligottPark Status assigned => resolved
Jul 23, 2020 12:24 pm Chris_McElligottPark Resolution open => fixed
Jul 23, 2020 12:24 pm Chris_McElligottPark Fixed in Version => 2.106 Immortals and Unresponsiveness
Jul 23, 2020 12:24 pm Chris_McElligottPark Note Added: 0057812