View Issue Details

IDProjectCategoryLast Update
0028020AI War 2Crash/ExceptionOct 12, 2023 6:33 pm
ReporterThe Grand Mugwump Assigned ToDismiss  
Status resolvedResolutionfixed 
Product Version5.569 Standards and Practices 
Fixed in Version5.570 Petawatt 
Summary0028020: When playing as a client in multiplayer, I get an error about canaries and "w."
DescriptionI'm not even sure what this error is, but it stops me from being able to use right click in the build menu to automatically place buildings. This snippet will hopefully help you find the part of the log related to this.

Was for field with name: 'TrainCanary' Exception: System.Exception: Tried to read condensed string format index 114 which is >= the length of 109 supported characters. Some bad data just happened prior to this!
  at Arcen.Universal.ArcenDeserializationBufferModern.GetBits_InnerHelperChar (System.Boolean ReadFullUnicode) [0x000c1] in <2166f9cb4cff4adb978e75246d57db77>:0
  at Arcen.Universal.ArcenDeserializationBufferModern.ReadString_Condensed (Arcen.Universal.SerMetaData MetaData, System.String FieldNameForErrors) [0x00120] in <2166f9cb4cff4adb978e75246d57db77>:0
  at Arcen.Universal.ArcenDeserializationBufferModern.ReadString_Condensed (Arcen.Universal.SerMetaData MetaData, System.String FieldNameForErrors) [0x002af] in <2166f9cb4cff4adb978e75246d57db77>:0
  at Arcen.Universal.ArcenDeserializationBufferModern.ValidateCanary (System.String ExpectedCanaryString, System.String CanaryFieldName, Arcen.Universal.SerializationCommandType SerializationType) [0x00043] in <2166f9cb4cff4adb978e75246d57db77>:0
10/8/2023 2:05:53 AM 5.569 CLIENT DELAYED132 TID12 Canary code mismatch at LuckyCanary ('' instead of '7'). Code above it is the real problem.
10/8/2023 2:05:53 AM 5.569 CLIENT DELAYED133 TID12 Canary code mismatch at WinnerCanary ('' instead of 'GG'). Code above it is the real problem.
10/8/2023 2:05:53 AM 5.569 CLIENT DELAYED134 TID12 Canary code mismatch at WhateverCanary ('' instead of 'w'). Code above it is the real problem.
10/8/2023 2:05:54 AM 5.569 CLIENT DELAYED135 TID7 Fixed attempt to read more faction data than we had FactionConfigurations on the client. (Index 24 was requested from a list with only 24 entries.
10/8/2023 2:05:54 AM 5.569 CLIENT DELAYED136 TID7 Canary code exception at TrainCanary ('' instead of 'tr8n'). Code above it is the real problem. Exception: System.Exception: Could not read string 'TrainCanary', but did get this partial one: '???Y:g?aH????6^2z20???"‘r?xz????c
TagsNo tags attached.

Activities

The Grand Mugwump

Oct 8, 2023 11:45 pm

reporter  

ArcenDebugLog.txt (4,135,477 bytes)
ErrorsReportedByEngine.txt (3,028 bytes)   
9/28/2023 6:28:21 AM (5.567) Mem: 1,654,202,368 Mode: Off Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
NullReferenceException: Object reference not set to an instance of an object
Stack Trace: Arcen.AIW2.ExternalVisualization.ShipRenderManagerGroup+RenderStatusRenderer.Render () (at <d95092cdd7ee4b70a409771a242af535>:0)
Arcen.AIW2.ExternalVisualization.ShipRenderManagerGroup.Render () (at <d95092cdd7ee4b70a409771a242af535>:0)
Arcen.AIW2.ExternalVisualization.ShipRenderManagerGroup.RenderAll () (at <d95092cdd7ee4b70a409771a242af535>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.HandleSquadAndShipUpdates () (at <d95092cdd7ee4b70a409771a242af535>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.RunPlanetUpdateTree () (at <d95092cdd7ee4b70a409771a242af535>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.RunUpdate () (at <d95092cdd7ee4b70a409771a242af535>:0)
ArcenMainGameVisuals.Update () (at <5fdf3ca02d9c47699cccf22d5e324078>:0)



10/8/2023 3:45:09 AM (5.569) Mem: 2,255,187,968 Mode: Client Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
IndexOutOfRangeException: Index was outside the bounds of the array.
Stack Trace: TMPro.TMP_Text.DrawUnderlineMesh (UnityEngine.Vector3 start, UnityEngine.Vector3 end, System.Int32& index, System.Single startScale, System.Single endScale, System.Single maxScale, System.Single sdfScale, UnityEngine.Color32 underlineColor) (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.GenerateTextMesh () (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at <a692422ec0264b89b898411f4bafe9dc>:0)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at <6c742b63882e4028831fefcd3ee9f3da>:0)
UnityEngine.Canvas:SendWillRenderCanvases()



10/8/2023 5:44:55 PM (5.569) Mem: 1,421,348,864 Mode: Client Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
IndexOutOfRangeException: Index was outside the bounds of the array.
Stack Trace: TMPro.TMP_Text.DrawUnderlineMesh (UnityEngine.Vector3 start, UnityEngine.Vector3 end, System.Int32& index, System.Single startScale, System.Single endScale, System.Single maxScale, System.Single sdfScale, UnityEngine.Color32 underlineColor) (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.GenerateTextMesh () (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at <a692422ec0264b89b898411f4bafe9dc>:0)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at <6c742b63882e4028831fefcd3ee9f3da>:0)
UnityEngine.Canvas:SendWillRenderCanvases()



ErrorsReportedByEngine.txt (3,028 bytes)   

Chris_McElligottPark

Oct 9, 2023 9:19 am

administrator   ~0067931

First thing I would do is verify the local install for both the client and the host.

Secondly, if you're able to make this reliably happen in a specific save, it would be very useful to have that save.

Thanks!

BadgerBadger

Oct 9, 2023 11:58 am

manager   ~0067932

There's a bunch of funky errors in here, like
  at Arcen.AIW2.External.EntitySimLogicImplementation_BaseInfo.AddDroneGunShotToSim (Arcen.AIW2.Core.DroneGunShot shot, Arcen.AIW2.Core.ArcenHostOnlySimContext ctx) [0x000e7] in <c2c6d7f525614240b517d185eba35dd3>:0

I see a bunch of entries like
huh setup had a different config
huh setup had a different config
huh setup had a different config
huh setup had a different config
huh setup had a different config
huh setup had a different config
huh setup had a different config
huh setup had a different config
huh setup had a different config
huh setup had a different config

Which seems to be some debugging left in

Also
10/8/2023 5:44:56 PM 5.569 CLIENT -----------
IndexOutOfRangeException: Index was outside the bounds of the array.
Stack Trace: TMPro.TMP_Text.DrawUnderlineMesh (UnityEngine.Vector3 start, UnityEngine.Vector3 end, System.Int32& index, System.Single startScale, System.Single endScale, System.Single maxScale, System.Single sdfScale, UnityEngine.Color32 underlineColor) (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.GenerateTextMesh () (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at <a692422ec0264b89b898411f4bafe9dc>:0)
TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at <a692422ec0264b89b898411f4bafe9dc>:0)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at <6c742b63882e4028831fefcd3ee9f3da>:0)
UnityEngine.Canvas:SendWillRenderCanvases()

Given how weird some of this looks, I'd hope that verifying the local install would clean things up.

I ran MP a bunch saturday without issues like this, so knowing which factions you have enabled would be useful if the problem persists.

Dismiss

Oct 12, 2023 5:25 pm

developer   ~0067949

Last edited: Oct 12, 2023 5:31 pm

So it appears my implementation of right-click on build menu item to trigger auto-placement just never made any attempt to work other than as host or singleplayer. My expectation would have been that it does nothing for a client in multiplayer, but the way i get a host context may have actually been -succeeding- in which case the client could allocate/place the stuff and likely explode the game.

In any case, i'm working on a proper fix that actually lets it work in multiplayer via game commands, rather than just fully disabling it as originally intended.

Dismiss

Oct 12, 2023 6:32 pm

developer   ~0067950

Fixed by:

Revision: 19788
Author: dismiss
Date: Thursday, October 12, 2023 5:31:08 PM
Message:
Protecting against more null cases in AddDroneGunShotToSim also more debugstages should an exception happen.
----
Modified : /CodeExternal/AIWarExternalCode/src/Sim/Entity/EntitySimLogicImplementation_BaseInfo.cs
Modified : /TotalConversions/ClassicFusion/CFMod/ClassicFusionEntitySimLogicImplementation_BaseInfo.cs
Modified : /TotalConversions/ClassicFusion/GameData/ModdableLogicDLLs/CFMod.dll

Revision: 19787
Author: dismiss
Date: Thursday, October 12, 2023 5:15:16 PM
Message:
removing debug logging "huh setup had a different config"
----
Modified : /CodeExternal/AIWarExternalCode/src/BaseInfo/BaseGame/ExternalFactionBaseInfoRoot.cs

Revision: 19786
Author: dismiss
Date: Thursday, October 12, 2023 5:13:35 PM
Message:
fix to auto-build/place (via right-click or double-click on item in build menu) for clients in a multiplayer game
this is untested in actual MP but it does still work in SP
----
Modified : /CodeExternal/AIWarExternalCode/AIWarExternalCode.csproj
Added : /CodeExternal/AIWarExternalCode/src/GameCommand/AutoPlaceBuildableGameCommands.cs
Modified : /CodeExternal/AIWarExternalCode/src/Helpers/DirectBuild.cs
Modified : /GameData/Configuration/GameCommand/KDL_VanillaEntries.xml

Chris_McElligottPark

Oct 12, 2023 6:33 pm

administrator   ~0067951

One note -- nothing is ever created on a client. So if there is building happening, it will work in MP so long as the client doesn't try to do anything.

Specifically, the host does _everything_ unit-creation-wise, and then it does a "fast blast" command to mirror that over to clients on the appropriate tick.

Clients should generally have enough protection to early-out of attempted creation on their side, as it should be impossible for a creation to even try to happen on a client, but extra safety is always good.

I would suggest opening up a litenetlib connection to yourself at 127.0.0.1 with two copies of the game open to test MP things like that if you want to know. You can launch both from the same executable, although they will both have the same profile name, so you then have to change the profile name on one of them. For faster testing I have a thing that copies over stuff to a secondary folder that I host from, and then I run the client from my main install. Any of the really interesting errors will be on the client, typically.

Issue History

Date Modified Username Field Change
Oct 8, 2023 11:45 pm The Grand Mugwump New Issue
Oct 8, 2023 11:45 pm The Grand Mugwump File Added: ArcenDebugLog.txt
Oct 8, 2023 11:45 pm The Grand Mugwump File Added: ErrorsReportedByEngine.txt
Oct 9, 2023 9:19 am Chris_McElligottPark Note Added: 0067931
Oct 9, 2023 11:58 am BadgerBadger Note Added: 0067932
Oct 12, 2023 5:25 pm Dismiss Note Added: 0067949
Oct 12, 2023 5:31 pm Dismiss Note Edited: 0067949
Oct 12, 2023 5:41 pm Dismiss Assigned To => Dismiss
Oct 12, 2023 5:41 pm Dismiss Status new => assigned
Oct 12, 2023 6:32 pm Dismiss Status assigned => resolved
Oct 12, 2023 6:32 pm Dismiss Resolution open => fixed
Oct 12, 2023 6:32 pm Dismiss Fixed in Version => 5.570 Petawatt
Oct 12, 2023 6:32 pm Dismiss Note Added: 0067950
Oct 12, 2023 6:33 pm Chris_McElligottPark Note Added: 0067951