View Issue Details

IDProjectCategoryLast Update
0025249AI War 2Crash/ExceptionJun 23, 2021 6:08 pm
ReporterChuito12 Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version3.104 Option For A Distributed Economy 
Fixed in Version3.304 Coilbeams No Longer Tickle 
Summary0025249: AI Praetorian Guard Error Faction shut down
DescriptionAs soon as a new campaign is started I get an error for an unknown exception stating that an error caused a faction to be shut down(The AI Praetorian Guard). Saving then reloading doesn't fix it, the error message will pop up as soon as I un-pause the game.

After experimenting a little bit with cheats it seems like the Praetorian Guard doesn't spawn even with a low strength fleet in an AI planet next to a bastion world. Ai reserves do seem spawn normally.
TagsNo tags attached.

Relationships

related to 0025293 resolvedChris_McElligottPark Praetorian Error On Startup 

Activities

Chuito12

Jun 14, 2021 1:55 pm

reporter  

testing with cheats.save (322,071 bytes)
testing with cheats.savemet (113 bytes)   
UK
1387945491
2712
test
<color=#66ffce>Easier </color> Full Ensemble
Difficulty 7
1
<color=#007fff>Chuito</color>
testing with cheats.savemet (113 bytes)   
zdf.save (215,784 bytes)
zdf.savemet (111 bytes)   
UK
1387945491
20
test
<color=#66ffce>Easier </color> Full Ensemble
Difficulty 7
4
<color=#007fff>Chuito</color>
zdf.savemet (111 bytes)   
ArcenDebugLog.txt (1,045,750 bytes)

BadgerBadger

Jun 14, 2021 5:00 pm

manager   ~0062091

I've put in a bit of defensive code here, but the fundamental problem seems to be that the AI Difficulty for the Praetorian Guard is not being set.

BadgerBadger

Jun 14, 2021 5:07 pm

manager   ~0062092

I note a number of entries like
6/14/2021 3:05:56 PM 3.104 SINGLEP OnLoad: AI faction: AI Sentinels had a difficulty of -1, which is not helpful for setting overlord difficulty level.
6/14/2021 3:05:56 PM 3.104 SINGLEP OnLoad: AI faction: AI Sentinels had a difficulty of -1, which is not helpful for setting overlord difficulty level.

When I load this save game as well; unclear if that is related.

The AI Difficulty for the praetorian guard is not serialized to disk in the first place. If I add debugging code like this:
                                        itemAsType.AIDifficulty = AIDifficulty_PraetorianGuardTable.Instance.DeserializeByInternalName( Buffer, "ExternalFactioonData_Common_PraetorianGuardData", "PraetorianGu\
ardDifficulty" );
                                        if ( itemAsType.AIDifficulty == null )
                                            ArcenDebugging.ArcenDebugLogSingleLine("difficulty is null", Verbosity.DoNotShow );
Then I see it is triggered by this save game

BadgerBadger

Jun 15, 2021 10:57 am

manager   ~0062096

Additional debugging notes: once this problem starts happening (I've observed it happening immediately after starting a new game) then every time you call faction.GetPraetorianGuardExternal() the AIDifficulty will be null. Even if you assigned it to be != null on the previous sim-step.

I think this means that when this bug is occurring, we're creating the PraetorianGuardExternalData fresh each sim-step.

I suspect without evidence that this problem is related to the fact that we can create new Praetorian Guard factions if they are missing in game. If we take this path I don't think we ever set up the AIDifficulty for the faction.

Chuito12

Jun 15, 2021 8:51 pm

reporter   ~0062107

I think I found out how to consistently reproduce the bug:

*Select a Quick start 2-Moderate Fallen Friends Arise and Edit setup.
*Increase Cryogenic pods to 30 and Increase Home Settlements to 5
*As soon as the game is started the errors pop up. Usually says from 8 to 52 errors since start

When I reported this bug I tried for a while to start a game normally but got bored and decided to play a quick start "Fallen Friends Arise" spire game with the praetorian guard bug anyways (easier AI homeworlds this game I guess).
Today I started a couple new games to see if it would happen again and the bug didn't happen except when loading the save I created then. Starting a new game after loading the bugged save doesn't trigger the bug it seems.
The bug doesn't seem to happen when its just me and 1 or 2 AI and I increase the Home Settlements, it usually starts when its me, 2 AI, Fallen Spire factions *and* I increase the home settlements/cryo. Not entirely sure if those are strictly necessary but its what I used to check and was consistently triggering the bug.

The bug can sometimes happen on Custom Start. But, After triggering the bug *once* through quick start it continues to happen everytime on new campaigns that are created on Custom start regardless if there is the FallenSpire or the Settlements/Cryo number are changed. Exiting and restarting the game sometimes fixes this I think. I'm not entirely sure if I have to change the settlements/cryo or if it just happens when I enter the "edit setup" screen on the Fallen Friends quick start.
After triggering the bug once it seems to keep happening on multiple games I edit setup on in the 2-Moderate tab of quick start (or the custom game screen), Doesn't happen on the two easiest quick starts on the 1st tab.

I included the bugged save I started and an earlier autosave of it since I have a couple hours into it, and the debuglog too. Maybe you guys can use it, idk.
Hope it helps!
ArcenDebugLog-2.txt (1,724,196 bytes)
Train raid.savemet (120 bytes)   
CL
997671100
8184
fellen frend
<color=#66ffce>Easier </color> Full Ensemble
Difficulty 7
6
<color=#007fff>Chuito</color>
Train raid.savemet (120 bytes)   
Train raid.save (380,111 bytes)
Autosave at 1h 44m 0s.savemet (120 bytes)   
CL
997671100
6240
fellen frend
<color=#66ffce>Easier </color> Full Ensemble
Difficulty 7
0
<color=#007fff>Chuito</color>

Chris_McElligottPark

Jun 23, 2021 6:08 pm

administrator   ~0062254

Thanks!

* Fixed a variety of "blank data" exceptions that could happen when setting up the game from an old save or a quickstart, among other circumstances.
** First of all, the way that missing factions are added is more careful now, although that turned out not to be the problem.
** Secondly, CPALogic and RelentlessWave subfactions are added in a better way for each AI in multi-AI games, to lead to less confusion with them.
** And lastly, if there was explicitly blank (or otherwise old) data, it was not previously reading in the current-game default. This has been corrected so that it now chooses default values.
*** This was the reason why often certain quickstarts had errors with the Praetorian Guard immediately after starting, and things of that nature.

Issue History

Date Modified Username Field Change
Jun 14, 2021 1:55 pm Chuito12 New Issue
Jun 14, 2021 1:55 pm Chuito12 File Added: testing with cheats.save
Jun 14, 2021 1:55 pm Chuito12 File Added: testing with cheats.savemet
Jun 14, 2021 1:55 pm Chuito12 File Added: zdf.save
Jun 14, 2021 1:55 pm Chuito12 File Added: zdf.savemet
Jun 14, 2021 1:55 pm Chuito12 File Added: ArcenDebugLog.txt
Jun 14, 2021 5:00 pm BadgerBadger Note Added: 0062091
Jun 14, 2021 5:07 pm BadgerBadger Note Added: 0062092
Jun 14, 2021 5:07 pm BadgerBadger Assigned To => Chris_McElligottPark
Jun 14, 2021 5:07 pm BadgerBadger Status new => assigned
Jun 15, 2021 10:57 am BadgerBadger Note Added: 0062096
Jun 15, 2021 8:51 pm Chuito12 Note Added: 0062107
Jun 15, 2021 8:51 pm Chuito12 File Added: ArcenDebugLog-2.txt
Jun 15, 2021 8:51 pm Chuito12 File Added: Train raid.savemet
Jun 15, 2021 8:51 pm Chuito12 File Added: Train raid.save
Jun 15, 2021 8:51 pm Chuito12 File Added: Autosave at 1h 44m 0s.savemet
Jun 15, 2021 8:51 pm Chuito12 File Added: Autosave at 1h 44m 0s.save
Jun 18, 2021 7:31 pm Chuito12 Relationship added related to 0025293
Jun 23, 2021 6:08 pm Chris_McElligottPark Status assigned => resolved
Jun 23, 2021 6:08 pm Chris_McElligottPark Resolution open => fixed
Jun 23, 2021 6:08 pm Chris_McElligottPark Fixed in Version => 3.304 Coilbeams No Longer Tickle
Jun 23, 2021 6:08 pm Chris_McElligottPark Note Added: 0062254