View Issue Details

IDProjectCategoryLast Update
0022840AI War 2Bug - OtherFeb 25, 2020 8:55 pm
ReporterSounds Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Fixed in Version2.001 Expansion 1: The Spire Rises! 
Summary0022840: Exception occurred during world deserialization:NullReferenceException
DescriptionGetting the attached error on start up when selecting the Civil War / Fun With Faction quick scenarios.
TagsNo tags attached.

Activities

Sounds

Feb 25, 2020 6:35 pm

reporter  

ArcenDebugLog.txt (10,088 bytes)   
2/26/2020 9:26:11 AM
Exception occurred during world deserialization:NullReferenceException
Will now log details in WorldDeserializationErrors.txt

System.NullReferenceException: Object reference not set to an instance of an object
  at Arcen.AIW2.Core.Fleet+Membership..ctor (Arcen.AIW2.Core.Fleet ParentFleet, Arcen.AIW2.Core.GameEntityTypeData TypeD) [0x000ae] in <a920b1dfc8af4e66a3fd751e47648365>:0 
  at Arcen.AIW2.Core.Fleet+Membership.DeserializeFrom (Arcen.AIW2.Core.Fleet ParentFleet, Arcen.Universal.ArcenDeserializationBuffer Buffer) [0x00012] in <a920b1dfc8af4e66a3fd751e47648365>:0 
  at Arcen.AIW2.Core.Fleet.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer) [0x0021b] in <a920b1dfc8af4e66a3fd751e47648365>:0 
  at Arcen.AIW2.Core.World_AIW2.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer, System.Boolean LoadAsTemplate) [0x0057d] in <a920b1dfc8af4e66a3fd751e47648365>:0 
  at Arcen.Universal.World.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x0026e] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.World.LoadWorldFromDiskInner (System.String SaveName, System.Byte[] Bytes, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x00042] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.World.LoadWorldFromDiskNoCampaignNameSet (System.String FullSaveName, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x00035] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 

  at System.Environment.get_StackTrace () [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, System.Boolean IncludeStackTrace, Arcen.Universal.Verbosity Verbosity) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, Arcen.Universal.Verbosity Verbosity) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.World.LoadWorldExceptionHandling (System.Exception e) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.World.LoadWorldFromDiskNoCampaignNameSet (System.String FullSaveName, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.Engine_Universal.LoadGameNoCampaignNameSet (System.String FullSaveGameName, System.Boolean LoadAsTemplate) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.AIW2.External.Window_LoadQuickStartMenu+bStartGame.HandleClick_Subclass (MouseHandlingInput input) [0x00000] in <daa7d72c4fe043218d58ef79b6bc5d97>:0 
  at Arcen.AIW2.External.ButtonAbstractBase.HandleClick (MouseHandlingInput input) [0x00000] in <daa7d72c4fe043218d58ef79b6bc5d97>:0 
  at Arcen.Universal.ArcenUI_Button.OnClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.ArcenUI_Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 

2/26/2020 9:26:11 AM	Successfully opened host socket
2/26/2020 9:26:11 AM	Start Generate FULL Map with Grid and seed 419611292 and planet count 81 and 20 factions
2/26/2020 9:26:12 AM	Generate FULL Map Complete
2/26/2020 9:31:29 AM	PLAYER DISCONNECTED 0.0.0.0=>0
2/26/2020 9:31:29 AM
Exception occurred during world deserialization:NullReferenceException
Will now log details in WorldDeserializationErrors.txt

System.NullReferenceException: Object reference not set to an instance of an object
  at Arcen.AIW2.Core.Fleet+Membership..ctor (Arcen.AIW2.Core.Fleet ParentFleet, Arcen.AIW2.Core.GameEntityTypeData TypeD) [0x000ae] in <a920b1dfc8af4e66a3fd751e47648365>:0 
  at Arcen.AIW2.Core.Fleet+Membership.DeserializeFrom (Arcen.AIW2.Core.Fleet ParentFleet, Arcen.Universal.ArcenDeserializationBuffer Buffer) [0x00012] in <a920b1dfc8af4e66a3fd751e47648365>:0 
  at Arcen.AIW2.Core.Fleet.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer) [0x0021b] in <a920b1dfc8af4e66a3fd751e47648365>:0 
  at Arcen.AIW2.Core.World_AIW2.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer, System.Boolean LoadAsTemplate) [0x0057d] in <a920b1dfc8af4e66a3fd751e47648365>:0 
  at Arcen.Universal.World.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x0026e] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.World.LoadWorldFromDiskInner (System.String SaveName, System.Byte[] Bytes, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x00042] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.World.LoadWorldFromDiskNoCampaignNameSet (System.String FullSaveName, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x00035] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 

  at System.Environment.get_StackTrace () [0x00000] in <1f0c1ef1ad524c38bbc5536809c46b48>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, System.Boolean IncludeStackTrace, Arcen.Universal.Verbosity Verbosity) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, Arcen.Universal.Verbosity Verbosity) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.World.LoadWorldExceptionHandling (System.Exception e) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.World.LoadWorldFromDiskNoCampaignNameSet (System.String FullSaveName, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.Engine_Universal.LoadGameNoCampaignNameSet (System.String FullSaveGameName, System.Boolean LoadAsTemplate) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.AIW2.External.Window_LoadQuickStartMenu+bStartGame.HandleClick_Subclass (MouseHandlingInput input) [0x00000] in <daa7d72c4fe043218d58ef79b6bc5d97>:0 
  at Arcen.AIW2.External.ButtonAbstractBase.HandleClick (MouseHandlingInput input) [0x00000] in <daa7d72c4fe043218d58ef79b6bc5d97>:0 
  at Arcen.Universal.ArcenUI_Button.OnClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at Arcen.Universal.ArcenUI_Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <c5d50807ce1e4c9197c74b057d7d82b5>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 
  at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <9bb8f6e40006490da4518a3cf5afe42e>:0 

2/26/2020 9:31:29 AM	Successfully opened host socket
2/26/2020 9:31:29 AM	Start Generate FULL Map with Encapsulated and seed 419611292 and planet count 90 and 22 factions
2/26/2020 9:31:29 AM	Generate FULL Map Complete
2/26/2020 9:31:53 AM	PLAYER DISCONNECTED 0.0.0.0=>0
ArcenDebugLog.txt (10,088 bytes)   

Sounds

Feb 25, 2020 6:38 pm

reporter   ~0056102

It also look like this occurs for some (but not all) of the other quick scenarios.

BadgerBadger

Feb 25, 2020 6:41 pm

manager   ~0056103

I can't reproduce this for any of the quick start scenarios. Are you on the most recent code?

BadgerBadger

Feb 25, 2020 6:44 pm

manager   ~0056104

Last edited: Feb 25, 2020 6:45 pm

Hey Chris, see 0022834 for what looks like a variant of this. Here's what my code does for the FleetMembership serialize/deserialize

                GameEntityTypeDataTable.Instance.SerializeByInternalName( this.UnitTypeToBuild, Buffer );
                GameEntityTypeDataTable.Instance.SerializeByInternalName( this.BaseUnitType, Buffer );
                Buffer.AddItem ( this.BuildPoints );

and then

                if ( Buffer.FromGameVersion.GetGreaterThanOrEqualTo( 1, 333 ) ) //ViralShredders
                {
                    typeData = GameEntityTypeDataTable.Instance.DeserializeByInternalName( Buffer, "FleetMemDeser" );
                    result.UnitTypeToBuild = typeData;
                    typeData = GameEntityTypeDataTable.Instance.DeserializeByInternalName( Buffer, "FleetMemDeser" );
                    result.BaseUnitType = typeData;
                    result.BuildPoints = Buffer.ReadInt32();
                }

Do you see anything wrong with this?


The error message is
Exception occurred during world deserialization:NullReferenceException
Will now log details in WorldDeserializationErrors.txt

System.NullReferenceException: Object reference not set to an instance of an object
  at Arcen.AIW2.Core.Fleet+Membership..ctor (Arcen.AIW2.Core.Fleet ParentFleet, Arcen.AIW2.Core.GameEntityTypeData TypeD) [0x000ae] in <a920b1dfc8af4e66a3fd751e47648365>:0
  at Arcen.AIW2.Core.Fleet+Membership.DeserializeFrom (Arcen.AIW2.Core.Fleet ParentFleet, Arcen.Universal.ArcenDeserializationBuffer Buffer) [0x00012] in <a920b1dfc8af4e66a3fd751e47648365>:0
  at Arcen.AIW2.Core.Fleet.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer) [0x0021b] in <a920b1dfc8af4e66a3fd751e47648365>:0
  at Arcen.AIW2.Core.World_AIW2.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer, System.Boolean LoadAsTemplate) [0x0057d] in <a920b1dfc8af4e66a3fd751e47648365>:0
  at Arcen.Universal.World.DeserializeFrom (Arcen.Universal.ArcenDeserializationBuffer Buffer, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x0026e] in <c5d50807ce1e4c9197c74b057d7d82b5>:0
  at Arcen.Universal.World.LoadWorldFromDiskInner (System.String SaveName, System.Byte[] Bytes, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x00042] in <c5d50807ce1e4c9197c74b057d7d82b5>:0
  at Arcen.Universal.World.LoadWorldFromDiskNoCampaignNameSet (System.String FullSaveName, System.Boolean LoadAsTemplate, Arcen.Universal.GameVersion& FromGameVersion) [0x00035] in <c5d50807ce1e4c9197c74b057d7d82b5>:0

Chris_McElligottPark

Feb 25, 2020 6:52 pm

administrator   ~0056106

The actual bug wasn't in deserialization direct, it was in the constructor:

at Arcen.AIW2.Core.Fleet+Membership..ctor

Basically, a null type is being passed in, which is fine for deserialization as it gets that data later, but it doesn't know that so wasn't checking for a null. Fixed!

Sounds

Feb 25, 2020 8:02 pm

reporter   ~0056108

Wow! I see a new update came out moments ago. Can confirm I don't see the error anymore.

Thanks for the fix.

Chris_McElligottPark

Feb 25, 2020 8:55 pm

administrator   ~0056113

No problem!

Issue History

Date Modified Username Field Change
Feb 25, 2020 6:35 pm Sounds New Issue
Feb 25, 2020 6:35 pm Sounds File Added: ArcenDebugLog.txt
Feb 25, 2020 6:38 pm Sounds Note Added: 0056102
Feb 25, 2020 6:41 pm BadgerBadger Note Added: 0056103
Feb 25, 2020 6:44 pm BadgerBadger Note Added: 0056104
Feb 25, 2020 6:45 pm BadgerBadger Note Edited: 0056104
Feb 25, 2020 6:48 pm BadgerBadger Assigned To => Chris_McElligottPark
Feb 25, 2020 6:48 pm BadgerBadger Status new => assigned
Feb 25, 2020 6:52 pm Chris_McElligottPark Status assigned => resolved
Feb 25, 2020 6:52 pm Chris_McElligottPark Resolution open => fixed
Feb 25, 2020 6:52 pm Chris_McElligottPark Fixed in Version => 2.001 Expansion 1: The Spire Rises!
Feb 25, 2020 6:52 pm Chris_McElligottPark Note Added: 0056106
Feb 25, 2020 8:02 pm Sounds Note Added: 0056108
Feb 25, 2020 8:55 pm Chris_McElligottPark Note Added: 0056113