View Issue Details

IDProjectCategoryLast Update
0023752AI War 2Crash/ExceptionSep 16, 2020 6:12 pm
ReporterBadgerBadger Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product VersionBeta 2.506 ExternalData Overhaul Two 
Fixed in Version2.507 Bugfixes 
Summary0023752: Exception serializing mercenary data
DescriptionI'm hitting this sometimes when the game autosaves

9/16/2020 10:21:21 AM
DoActualSimStep exception at debugStage 7900, exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <1f0c1ef1ad524c38bbc5536809c46b48>:0
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0
  at Arcen.AIW2.External.MercenaryGlobalData.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer, System.Boolean IsForPartialSyncDuringMultiplayer) [0x001fd] in <fb5b88398cce473bbcb8f377e520869d>:0
  at Arcen.AIW2.External.MercenaryGlobalExternalData.SerializeExternalData (System.Object[] Source, Arcen.Universal.ArcenSerializationBuffer Buffer, System.Boolean IsForPartialSyncDuringMultiplayer) [0x0000a] in <fb5b88398cce473bbcb8f377e520869d>:0
  at Arcen.Universal.ArcenExternalData.SerializeExternalDataTo (Arcen.Universal.ArcenSerializationBuffer Buffer, System.String ExternalDataHeader, System.Boolean IsForPartialSyncDuringMultiplayer) [0x000d1] in <a02c218fc9fb4fe79ceb3ece92cb7752>:0
  at Arcen.Universal.ArcenExternalDataLookup.SerializeExternalDataTo (Arcen.Universal.ArcenSerializationBuffer Buffer, System.String ExternalDataHeader, System.Boolean IsForPartialSyncDuringMultiplayer) [0x0006a] in <a02c218fc9fb4fe79ceb3ece92cb7752>:0
TagsNo tags attached.

Activities

BadgerBadger

Sep 16, 2020 12:46 pm

manager   ~0058539

The problem is that the code is iterating over
            for ( int i = 0; i < groupStatesByIndex.Count; i++ )

and then we try to use i as an index into
                MercenaryGroupData mercData = MercenaryGroupDataTable.Instance.Rows[i];

I then get the error
9/16/2020 10:45:24 AM Hit exception in Serializing global mercenary data. debugCode 310 System.Exception: Tried to get index 16 in the MercenaryGroupDataTable, which only has 16 entries. Note that we are indexing the groupStatesByIndex list which has 32 entries

BadgerBadger

Sep 16, 2020 12:50 pm

manager   ~0058541

I hit this running the save game from https://bugtracker.arcengames.com/view.php?id=23746

Chris_McElligottPark

Sep 16, 2020 6:12 pm

administrator   ~0058553

Thanks!

* Fixed a bug introduced in the prior build that made it impossible to save most games that had outguard in them (all of them...?), and probably was messing with initial multiplayer sync, too. This was not seeming to affect every last save, but nonetheless was not good.

Issue History

Date Modified Username Field Change
Sep 16, 2020 12:22 pm BadgerBadger New Issue
Sep 16, 2020 12:22 pm BadgerBadger Status new => assigned
Sep 16, 2020 12:22 pm BadgerBadger Assigned To => Chris_McElligottPark
Sep 16, 2020 12:46 pm BadgerBadger Note Added: 0058539
Sep 16, 2020 12:50 pm BadgerBadger Note Added: 0058541
Sep 16, 2020 6:12 pm Chris_McElligottPark Status assigned => resolved
Sep 16, 2020 6:12 pm Chris_McElligottPark Resolution open => fixed
Sep 16, 2020 6:12 pm Chris_McElligottPark Fixed in Version => 2.507 Bugfixes
Sep 16, 2020 6:12 pm Chris_McElligottPark Note Added: 0058553