View Issue Details

IDProjectCategoryLast Update
0025756AI War 2Crash/ExceptionNov 2, 2021 1:25 pm
ReporterBadgerBadger Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product VersionBeta 3.743 Return Of The Imperial Spire 
Fixed in VersionBeta 3.743 Return Of The Imperial Spire 
Summary0025756: game looks for Scourge baseinfo on DZ ship
Description11/1/2021 2:49:25 PM 3.742 SINGLEP DELAYED61: Error! Called GetExternalBaseInfoAs<Arcen.AIW2.External.ScourgePerUnitBaseInfo>() when BaseInfo was null on DZHuskarl
  at System.Environment.get_StackTrace () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00012] in /home/arcengames_aiw-ultra/CodeCrossProject/ArcenUniversal/src/UtilityLibraries/ArcenDebugging.cs:258
  at Arcen.AIW2.Core.GameEntity_Squad.GetExternalBaseInfoAs[T] () [0x00044] in /home/arcengames_aiw-ultra/CodeMain/ArcenAIW2Core/src/Logic/GameState/GameEntity/GameEntity_Squad.cs:2176
  at Arcen.AIW2.External.FireteamHonoraryDeepInfo.Disband_JustTheDeepInfoPortion (Arcen.AIW2.External.ArcenLongTermIntermittentPlanningContextBase ContextOrNull) [0x00000] in <040e2dd7eddb4288b1931d37423e3418>:0
  at Arcen.AIW2.External.Fireteam.Disband (Arcen.AIW2.External.ArcenLongTermIntermittentPlanningContextBase ContextOrNull) [0x00000] in <040e2dd7eddb4288b1931d37423e3418>:0
  at Arcen.AIW2.External.FireteamUtility+<UpdateRegiments>c__AnonStorey1.<>m__2 (Arcen.AIW2.External.Fireteam team) [0x00000] in <802d54bab52c4b1ea7000cf7d41b1054>:0
  at Arcen.AIW2.External.Fireteam.DoFor (Arcen.Universal.ArcenLessLinkedList`1[ItemType] List, Arcen.AIW2.External.Fireteam+ProcessorDelegate Processor) [0x00000] in <040e2dd7eddb4288b1931d37423e3418>:0
  at Arcen.AIW2.External.FireteamUtility.UpdateRegiments (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.External.ArcenLongTermIntermittentPlanningContext Context, Arcen.Universal.ArcenLessLinkedList`1[ItemType] AllFactionTeams, Arcen.Universal.ProtectedValDictionary`2[TKey,TValue] TeamsAimedAtPlanet, Arcen.Universal.ArcenCharacterBuffer tracingBuffer, System.Int32 MinFireteamStrength, System.Boolean allowedToDecloakEnemies) [0x00000] in <802d54bab52c4b1ea7000cf7d41b1054>:0
  at Arcen.AIW2.External.DarkZenithFactionDeepInfoRoot.DoLongRangePlanning_OnBackgroundNonSimThread_Subclass (Arcen.AIW2.External.ArcenLongTermIntermittentPlanningContext Context) [0x00000] in <802d54bab52c4b1ea7000cf7d41b1054>:0
  at Arcen.AIW2.External.ExternalFactionDeepInfoRoot.DoLongRangePlanning_OnBackgroundNonSimThread_HostOnly (Arcen.AIW2.Core.ILongRangePlanningHostContext Context) [0x00000] in <802d54bab52c4b1ea7000cf7d41b1054>:0
TagsNo tags attached.

Activities

BadgerBadger

Nov 1, 2021 5:04 pm

manager   ~0063131

This was some old code of mind, sInce the scourge handle their data differently. Previously this code would just return null silently.
I don't think this will cause gameplay problems, but it's an ugly warning.
                ScourgePerUnitBaseInfo data = entity.GetExternalBaseInfoAs<ScourgePerUnitBaseInfo>();
                if ( data != null )
                {
                    data.FireteamId = -1;
                    entity.FireteamId = -1;
                    entity.MinorFactionStackingID = -1;
                }

Chris_McElligottPark

Nov 2, 2021 1:22 pm

administrator   ~0063143

For these sorts of circumstances where null is okay, I have a TryGet method. I'll swap that in.

Chris_McElligottPark

Nov 2, 2021 1:25 pm

administrator   ~0063144

Thanks!

* In Disband_JustTheDeepInfoPortion, the "GetExternalBaseInfoAs<ScourgePerUnitBaseInfo>()" (which throws an error if it's the wrong type) now is just "TryGetExternalBaseInfoAs<ScourgePerUnitBaseInfo>()" (which is able to silently return null when it's not a match).
** This is basically old code, as Badger notes, but the way that I had translated it into the new framework was suboptimal.

Issue History

Date Modified Username Field Change
Nov 1, 2021 4:50 pm BadgerBadger New Issue
Nov 1, 2021 5:03 pm BadgerBadger Assigned To => Chris_McElligottPark
Nov 1, 2021 5:03 pm BadgerBadger Status new => assigned
Nov 1, 2021 5:04 pm BadgerBadger Note Added: 0063131
Nov 2, 2021 1:22 pm Chris_McElligottPark Note Added: 0063143
Nov 2, 2021 1:25 pm Chris_McElligottPark Status assigned => resolved
Nov 2, 2021 1:25 pm Chris_McElligottPark Resolution open => fixed
Nov 2, 2021 1:25 pm Chris_McElligottPark Fixed in Version => Beta 3.743 Return Of The Imperial Spire
Nov 2, 2021 1:25 pm Chris_McElligottPark Note Added: 0063144