View Issue Details

IDProjectCategoryLast Update
0026511AI War 2Bug - GameplayFeb 24, 2022 11:41 am
ReporterSaya Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product VersionBeta 3.901 Modular Forcefields 
Fixed in VersionBeta 3.903 Multiplayer Polish 
Summary0026511: Spire empire - city tier 3 upgrade bug
DescriptionWhen playing as a spire empire, upgrading a spire city to tier 3 can result in a bug that removes all spire strike craft from your spire flagships. In the attached save game, click the leftmost spire upgrade button. The second you unpause all your flagships will switch to 1/1.
TagsNo tags attached.

Activities

Saya

Feb 23, 2022 11:40 am

reporter  

1.save (627,627 bytes)
1.savemet (119 bytes)   
CM
57990821
16845
oh nyoo
<color=#ff3232>Hard </color> Special Forces Master
Difficulty 7
3
<color=#7bafd4>Saya</color>
1.savemet (119 bytes)   
1.bak (499,916 bytes)

BadgerBadger

Feb 23, 2022 1:43 pm

manager   ~0064766

Last edited: Feb 23, 2022 1:44 pm

When I load this save and upgrade a city I don't lose any of my spire frigates. Perhaps I'm misunderstanding? Like when you say "All the flagships become 1/1" what does that mean?

Saya

Feb 23, 2022 4:29 pm

reporter   ~0064769

It does not happen every time, i had to load the save a couple of times and upgrade the city for it to happen. See this screenshot for what the 1/1 means https://i.imgur.com/p80MUh4.png

Saya

Feb 23, 2022 4:40 pm

reporter   ~0064771

Here is the debug log, i forgot that in the initial upload, sorry
ArcenDebugLog.txt (633,355 bytes)

BadgerBadger

Feb 23, 2022 4:59 pm

manager   ~0064772

Oh, yeah looks like you were hitting exceptions to trigger this problem.

BadgerBadger

Feb 23, 2022 7:19 pm

manager   ~0064776

Last edited: Feb 23, 2022 7:21 pm

The trick to recreating this exception is as follows:

Before unpausing the game, click the leftmost city notification to upgrade it.
The notification will then briefly show a 4; before the notification goes away, unpause the game. It might take some practice to figure out exactly when to unpause.

BadgerBadger

Feb 23, 2022 7:28 pm

manager   ~0064778

This problem is in RecalculateSpireCityBuildingContents_MainThreadSimOnly
in this section of the code.
            //look for any missing centerpieces, and fix them
            World_AIW2.Instance.DoForCityFedMobileFleets( null, FleetStatus.AnyStatus, delegate ( Fleet cityFedFleet )
.....

I'm not sure if this code is necessary anymore, since most cities don't have flagships anymore at all. In any case, the problem is
if ( mobileFlagship == null )
                        mobileFlagship = GameEntity_Squad.CreateNew_ReturnNullIfMPClient( mobileFlagship.PlanetFaction, desiredFlagshipData, (byte)minMarkLevelOfAllFlagships,
                            cityFedFleet, 0, Engine_AIW2.Instance.CombatCenter, Context, "FallenSpire-MissingFlagship" );

which dereferences the known-to-be-null mobileFlagship. This code was added when chris refactored the Spire to only give them 3 flagships.

I tried instead explicitly finding the city for the Fleet in question before creating the new flagship, but when this problem is hit there is no city either! You wind up with output like
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED162 TID12 Fleet Spire Fleet 'jcir iel' is missing a flagship and has no city either?!?! Here are all the ships in the fleet:
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED163 TID12 Spire Frigate #83684 Oh nyoo on Kleene
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED164 TID12 Spire Frigate #83765 Oh nyoo on Kleene
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED165 TID12 Spire Frigate #83801 Oh nyoo on Kleene
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED166 TID12 Spire Frigate #83806 Oh nyoo on Kleene
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED167 TID12 Spire Frigate #83854 Oh nyoo on Kleene
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED168 TID12 Spire Frigate #84021 Oh nyoo on Kleene
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED169 TID12 Spire Frigate #84090 Oh nyoo on Kleene
2/23/2022 5:21:26 PM 3.902 SINGLEP DELAYED170 TID12 thats all the ships

BadgerBadger

Feb 24, 2022 12:31 am

manager   ~0064781

I think this affects both the fallen spire and the infused empire

Chris_McElligottPark

Feb 24, 2022 11:41 am

administrator   ~0064805

Hopefully fixes it!

* Fully instrumented RecalculateSpireCityMobileFleetContents_MainThreadSimOnly so that if there's an exception, we'll know specifically where it's coming from. I was unable to duplicate the error that was reported from there, but if it happens again we will be able to pinpoint it.
** Additionally, that said, it seems like there was a specific issue where the game thought there was a missing centerpiece and was trying to repair it, and just getting rid of that logic is likely to fix this (as it's not really a concern of that happening).

Thanks!

Issue History

Date Modified Username Field Change
Feb 23, 2022 11:40 am Saya New Issue
Feb 23, 2022 11:40 am Saya File Added: 1.save
Feb 23, 2022 11:40 am Saya File Added: 1.savemet
Feb 23, 2022 11:40 am Saya File Added: 1.bak
Feb 23, 2022 1:43 pm BadgerBadger Note Added: 0064766
Feb 23, 2022 1:44 pm BadgerBadger Note Edited: 0064766
Feb 23, 2022 1:44 pm BadgerBadger Status new => requires feedback
Feb 23, 2022 4:29 pm Saya Note Added: 0064769
Feb 23, 2022 4:40 pm Saya Note Added: 0064771
Feb 23, 2022 4:40 pm Saya File Added: ArcenDebugLog.txt
Feb 23, 2022 4:59 pm BadgerBadger Note Added: 0064772
Feb 23, 2022 7:19 pm BadgerBadger Note Added: 0064776
Feb 23, 2022 7:21 pm BadgerBadger Note Edited: 0064776
Feb 23, 2022 7:28 pm BadgerBadger Status requires feedback => new
Feb 23, 2022 7:28 pm BadgerBadger Note Added: 0064778
Feb 24, 2022 12:31 am BadgerBadger Note Added: 0064781
Feb 24, 2022 11:41 am Chris_McElligottPark Assigned To => Chris_McElligottPark
Feb 24, 2022 11:41 am Chris_McElligottPark Status new => resolved
Feb 24, 2022 11:41 am Chris_McElligottPark Resolution open => fixed
Feb 24, 2022 11:41 am Chris_McElligottPark Fixed in Version => Beta 3.903 Multiplayer Polish
Feb 24, 2022 11:41 am Chris_McElligottPark Note Added: 0064805