View Issue Details

IDProjectCategoryLast Update
0025504AI War 2Bug - GameplayAug 25, 2021 1:53 pm
ReporterEcthelon Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product VersionBeta 3.506 Setsuna Notices A Lobotomy 
Fixed in VersionBeta 3.603 Last of the Recent Known Regressions 
Summary0025504: Inactive threads
DescriptionAfter playing in the attached save for a while, I always seem to get a popup in the top right that informs me of some inactive threads to do with Anti-everyone zombies. Save and screenshot attached, although reloading the save fixes the issue temporarily so you may have to wait a while to see it yourself.
TagsNo tags attached.

Activities

Ecthelon

Aug 10, 2021 11:45 am

reporter  

image.png (3,735,828 bytes)
Manual 3.save (882,476 bytes)

Ecthelon

Aug 11, 2021 7:33 am

reporter   ~0062674

Playing further, I have also seen this issue with anti-AI zombies and possibly others.

Ecthelon

Aug 12, 2021 9:04 am

reporter   ~0062676

Apparently lots can fail at once. See attached screenshot of what happened when I had just started a new game. From the timers, they had been inactive from before I even started this new save?
image-2.png (1,534,574 bytes)

Daniexpert

Aug 13, 2021 2:24 pm

manager   ~0062708

0025504:0062676 I had the same issue happening on a new game on 3.509, with DLC3 factions affected also.

Chris_McElligottPark

Aug 16, 2021 3:35 pm

administrator   ~0062715

Okay, 3.510 has these changes which hopefully will solve it:

* Adjusted the thread manager class so that we now have threads initialized a lot earlier, and tied to their related sim contexts where needed, and then they are simply initialized in the future.
** The should prevent an exception that was reported by Badger and StarKelp and Zweihand that could occur in SetWorkDone(). I never could actually duplicate it, though.

* Threads are now connected in a better way to their sim contexts, and we have extra debugging info on both ends in the event that either end thinks it is stuck.
** Additionally, we can now see idle threads (those created for games with more factions but then later a lower-faction-count game is loaded so the game has nothing to do with those threads), and we no longer complain about them.
** On top of that, all threads now kick off as promptly as they should on save load 0000002 in a game session (before it could sometimes have a 20 second delay for anti-AI zombies, as one example).
** And lastly, the issue where time in the lobby was causing threads to look idle upon exit is now fixed.

I think that something was falling through the cracks.

Daniexpert

Aug 17, 2021 11:57 am

manager   ~0062732

3.510
Still getting it, quite often, upon starting games. Unfortunately the list is even richer now.
2021-08-17 17_45_56-AIWar2.png (192,030 bytes)   
2021-08-17 17_45_56-AIWar2.png (192,030 bytes)   

Chris_McElligottPark

Aug 17, 2021 1:28 pm

administrator   ~0062734

When this happens, can you right-click the time bar in the bottom of the screen? I forgot to mention that before. It has a bunch of information on the faction and the threads about what is happening, and I should be able to figure it out from that. I didn't expect it to keep happening, though.

Daniexpert

Aug 17, 2021 1:40 pm

manager   ~0062735

Next time it appears, I'll get that info.
Now, after being in the game for quite some time, it didn't appear anymore, so it might be something that doesn't work only at start, because the bug doesn't appear later during the game.

Daniexpert

Aug 18, 2021 6:45 am

manager   ~0062740

Last edited: Aug 18, 2021 6:48 am

3.600
Here it is, but this time, after a few minutes of idling, the threads started running without requiring a reboot of the game.
The background threads run fine since the start.

Daniexpert

Aug 18, 2021 7:28 am

manager   ~0062744

Yeah, it seems that with 3.600 it still happens, but the game tends to start the inactive threds within 30-60s from the beginning of the match.

Chris_McElligottPark

Aug 18, 2021 10:52 pm

administrator   ~0062759

Okay, so based on the picture that you posted in two posts up, it looks like the game thinks that it is less than 5 seconds into the game. This is incredibly strange! Because it should only be actually able to get to the part that you are seeing if it actually runs.

So... that probably means that the entire thing is stale, which means that the background thread itself is not being run. Are there any errors being logged?

Chris_McElligottPark

Aug 18, 2021 10:54 pm

administrator   ~0062760

Oh, another question: this isn't on a MP client, is it?

Chris_McElligottPark

Aug 18, 2021 11:05 pm

administrator   ~0062761

* Put in a number of potential fixes for the inactive threads issue. Essentially, when they are being shut down because of exiting from the game, they are now sure to mark themselves as complete, etc. They were previously potentially (in theory) able to get stuck in an indeterminate state.
** Please note that multiplayer clients probably will have lots of inactive threads reported at the moment, but those threads are not meant to run on the MP client, so it's a false warning on those.
** If this is still something people see on MP hosts or in single player, any added info, exceptions, or steps to reproduce would be super welcome. We have yet to be able to duplicate it.

Daniexpert

Aug 19, 2021 5:49 am

manager   ~0062762

I often pause at the start of the game, so maybe I don't give it enough time to reach the starting phase?
This is not MP.

Chris_McElligottPark

Aug 25, 2021 1:53 pm

administrator   ~0062771

This should be the last of this:

* Internally, UnpausedTimeSinceLastRestartF has been replaced with NonSetupGameTimeSinceLastLoadOrStartF, which is more complicated but now accurately measures the sort of time we want it to.
** Essentially, we want to know about how much realtime has elapsed, network-related-delays-notwithstanding, since certain things happened.
** By using an internal accumulator that is actually per-frame, and then dealing with the accumulation during that part of the simulation that checks for network delays or proceeding with the sim, we get an accurate picture now.
** This fixes various bugs, like the "inactive threads" warning on game start after being in the lobby for a while, or the threads window (left click the timer in the bottom left) not showing actual activity as it should while the game is paused. Some of those threads do in fact run during pause.
** This in turn does make it accurate when threads are running or not running during pause, which means some extra controls in there to make it show the pause-skips process correctly and not alert when those are not running.

Issue History

Date Modified Username Field Change
Aug 10, 2021 11:45 am Ecthelon New Issue
Aug 10, 2021 11:45 am Ecthelon File Added: image.png
Aug 10, 2021 11:45 am Ecthelon File Added: Manual 3.save
Aug 11, 2021 7:33 am Ecthelon Note Added: 0062674
Aug 12, 2021 9:04 am Ecthelon Note Added: 0062676
Aug 12, 2021 9:04 am Ecthelon File Added: image-2.png
Aug 13, 2021 2:24 pm Daniexpert Note Added: 0062708
Aug 16, 2021 3:35 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Aug 16, 2021 3:35 pm Chris_McElligottPark Status new => feedback
Aug 16, 2021 3:35 pm Chris_McElligottPark Note Added: 0062715
Aug 17, 2021 11:57 am Daniexpert Note Added: 0062732
Aug 17, 2021 11:57 am Daniexpert File Added: 2021-08-17 17_45_56-AIWar2.png
Aug 17, 2021 1:28 pm Chris_McElligottPark Note Added: 0062734
Aug 17, 2021 1:40 pm Daniexpert Note Added: 0062735
Aug 18, 2021 6:45 am Daniexpert Note Added: 0062740
Aug 18, 2021 6:45 am Daniexpert File Added: 2021-08-18 12_43_23-AIWar2.png
Aug 18, 2021 6:45 am Daniexpert Note Edited: 0062740
Aug 18, 2021 6:48 am Daniexpert Note Edited: 0062740
Aug 18, 2021 7:28 am Daniexpert Note Added: 0062744
Aug 18, 2021 10:52 pm Chris_McElligottPark Note Added: 0062759
Aug 18, 2021 10:54 pm Chris_McElligottPark Note Added: 0062760
Aug 18, 2021 11:05 pm Chris_McElligottPark Note Added: 0062761
Aug 19, 2021 5:49 am Daniexpert Note Added: 0062762
Aug 25, 2021 1:53 pm Chris_McElligottPark Status feedback => resolved
Aug 25, 2021 1:53 pm Chris_McElligottPark Resolution open => fixed
Aug 25, 2021 1:53 pm Chris_McElligottPark Fixed in Version => Beta 3.603 Last of the Recent Known Regressions
Aug 25, 2021 1:53 pm Chris_McElligottPark Note Added: 0062771