View Issue Details

IDProjectCategoryLast Update
0023493AI War 2Crash/ExceptionAug 29, 2020 5:01 pm
ReporterGreatYng Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version2.112 Steam Networking Complete 
Fixed in Version2.130 Civilian Industries 
Summary0023493: Tried to write Int16 PosExceptNeg1, but passed value was: -31018
DescriptionI have seen this error appear three times during my campaign so far, and in the DebugLog the excerpt below always show up three times directly in a row in under a second. I made a save after each time it happened.
Upon examination of the time-stamps I observed that the first two times the exception occurred right after an autosave, and the third time right after a manual save. I have not been able to reproduce the error consistently.


8/1/2020 9:47:21 PM
Tried to write Int16 PosExceptNeg1, but passed value was: -31018, which is out of range! Value set to -1 so your save would work. (Unknown field being saved)

  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 <962635688e3a489ca7657c9f9fd5fc8c>:0
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, Arcen.Universal.Verbosity Verbosity) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0
  at Arcen.Universal.ArcenSerializationBuffer.AddInt16 (Arcen.Universal.ReadStyle RStyle, System.Int16 Item, System.String FieldNameForErrors) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0
  at Arcen.AIW2.Core.SpeedGroup.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0
  at Arcen.AIW2.Core.Faction.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0
  at Arcen.AIW2.Core.World_AIW2.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0
  at Arcen.Universal.World.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0
  at Arcen.Universal.World.SaveWorldToDisk (System.String SaveName, System.Collections.Generic.List`1[T] SavegameMetadata) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0
  at Arcen.AIW2.External.GameCommand_SaveGame.Execute (Arcen.AIW2.Core.GameCommand command, Arcen.AIW2.Core.ArcenSimContext context) [0x00000] in <0e0833827bb1463c8819ebf57b8833dd>:0
  at Arcen.AIW2.Core.GameCommand.Execute (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0
  at Arcen.AIW2.Core.World_AIW2.OnClient_ExecuteGameCommandsReceivedFromServer (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0
  at Arcen.AIW2.External.SimPlannerImplementation.DoActualSimStep (System.Boolean& stalledWaitingOnConnections, System.Boolean& mayUpdateVisuals) [0x00000] in <0e0833827bb1463c8819ebf57b8833dd>:0
  at Arcen.AIW2.Core.Engine_AIW2.ProcessSimStep (System.Boolean& stalledWaitingOnConnections) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0
  at Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0
  at Arcen.AIW2.Core.ArcenGameControllerBase.BaseUpdate () [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0
  at ArcenGameController.Update () [0x00000] in <342846c60ad043638e2ec80b42611e65>:0
TagsNo tags attached.

Relationships

related to 0023466 resolvedChris_McElligottPark Error upon saving 
related to 0023472 resolvedChris_McElligottPark Error overwriting a save - "Tried to write Int16 PosExceptNeg1..." 
related to 0023610 resolvedChris_McElligottPark Error message on saving. (Save still works fine.) 
related to 0023593 resolvedChris_McElligottPark Occasional Exception 

Activities

GreatYng

Aug 1, 2020 5:05 pm

reporter  

PosExceptNeg1.txt (8,993 bytes)   
8/1/2020 9:47:21 PM
Tried to write Int16 PosExceptNeg1, but passed value was: -31018, which is out of range!  Value set to -1 so your save would work.   (Unknown field being saved)

  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 <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, Arcen.Universal.Verbosity Verbosity) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenSerializationBuffer.AddInt16 (Arcen.Universal.ReadStyle RStyle, System.Int16 Item, System.String FieldNameForErrors) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.Core.SpeedGroup.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.Faction.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.World_AIW2.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.Universal.World.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.World.SaveWorldToDisk (System.String SaveName, System.Collections.Generic.List`1[T] SavegameMetadata) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.External.GameCommand_SaveGame.Execute (Arcen.AIW2.Core.GameCommand command, Arcen.AIW2.Core.ArcenSimContext context) [0x00000] in <0e0833827bb1463c8819ebf57b8833dd>:0 
  at Arcen.AIW2.Core.GameCommand.Execute (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.World_AIW2.OnClient_ExecuteGameCommandsReceivedFromServer (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.External.SimPlannerImplementation.DoActualSimStep (System.Boolean& stalledWaitingOnConnections, System.Boolean& mayUpdateVisuals) [0x00000] in <0e0833827bb1463c8819ebf57b8833dd>:0 
  at Arcen.AIW2.Core.Engine_AIW2.ProcessSimStep (System.Boolean& stalledWaitingOnConnections) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.Core.ArcenGameControllerBase.BaseUpdate () [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at ArcenGameController.Update () [0x00000] in <342846c60ad043638e2ec80b42611e65>:0 

8/1/2020 9:47:21 PM
Tried to write Int16 PosExceptNeg1, but passed value was: -31018, which is out of range!  Value set to -1 so your save would work.   (Unknown field being saved)

  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 <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, Arcen.Universal.Verbosity Verbosity) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenSerializationBuffer.AddInt16 (Arcen.Universal.ReadStyle RStyle, System.Int16 Item, System.String FieldNameForErrors) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.Core.SpeedGroup.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.Faction.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.World_AIW2.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.Universal.World.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.World.SaveWorldToDisk (System.String SaveName, System.Collections.Generic.List`1[T] SavegameMetadata) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.External.GameCommand_SaveGame.Execute (Arcen.AIW2.Core.GameCommand command, Arcen.AIW2.Core.ArcenSimContext context) [0x00000] in <0e0833827bb1463c8819ebf57b8833dd>:0 
  at Arcen.AIW2.Core.GameCommand.Execute (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.World_AIW2.OnClient_ExecuteGameCommandsReceivedFromServer (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.External.SimPlannerImplementation.DoActualSimStep (System.Boolean& stalledWaitingOnConnections, System.Boolean& mayUpdateVisuals) [0x00000] in <0e0833827bb1463c8819ebf57b8833dd>:0 
  at Arcen.AIW2.Core.Engine_AIW2.ProcessSimStep (System.Boolean& stalledWaitingOnConnections) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.Core.ArcenGameControllerBase.BaseUpdate () [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at ArcenGameController.Update () [0x00000] in <342846c60ad043638e2ec80b42611e65>:0 

8/1/2020 9:47:21 PM
Tried to write Int16 PosExceptNeg1, but passed value was: -31018, which is out of range!  Value set to -1 so your save would work.   (Unknown field being saved)

  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 <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.DebugLogDestination Destination, Arcen.Universal.Verbosity Verbosity) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenDebugging.ArcenDebugLog (System.String Message, Arcen.Universal.Verbosity Verbosity) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.ArcenSerializationBuffer.AddInt16 (Arcen.Universal.ReadStyle RStyle, System.Int16 Item, System.String FieldNameForErrors) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.Core.SpeedGroup.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.Faction.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.World_AIW2.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.Universal.World.SerializeTo (Arcen.Universal.ArcenSerializationBuffer Buffer) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.Universal.World.SaveWorldToDisk (System.String SaveName, System.Collections.Generic.List`1[T] SavegameMetadata) [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.External.GameCommand_SaveGame.Execute (Arcen.AIW2.Core.GameCommand command, Arcen.AIW2.Core.ArcenSimContext context) [0x00000] in <0e0833827bb1463c8819ebf57b8833dd>:0 
  at Arcen.AIW2.Core.GameCommand.Execute (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.Core.World_AIW2.OnClient_ExecuteGameCommandsReceivedFromServer (Arcen.AIW2.Core.ArcenSimContext Context) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.AIW2.External.SimPlannerImplementation.DoActualSimStep (System.Boolean& stalledWaitingOnConnections, System.Boolean& mayUpdateVisuals) [0x00000] in <0e0833827bb1463c8819ebf57b8833dd>:0 
  at Arcen.AIW2.Core.Engine_AIW2.ProcessSimStep (System.Boolean& stalledWaitingOnConnections) [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () [0x00000] in <962635688e3a489ca7657c9f9fd5fc8c>:0 
  at Arcen.AIW2.Core.ArcenGameControllerBase.BaseUpdate () [0x00000] in <a35b5794e88a44c2ba8a8fbeeaed2b45>:0 
  at ArcenGameController.Update () [0x00000] in <342846c60ad043638e2ec80b42611e65>:0 
PosExceptNeg1.txt (8,993 bytes)   

Chris_McElligottPark

Aug 29, 2020 4:11 pm

administrator   ~0058263

Sweet! Someone else hit this in 0023610, and now I can tell that it was the OverrideSpeedLimit field since we have the extra logging in there.

Chris_McElligottPark

Aug 29, 2020 5:01 pm

administrator   ~0058276

Thanks!

* It is now possible that your logs will wind up having the message "BUG: overriding speed limit for group X to [a negative number below -1]. Overflow? Setting to -1 instead."
** If this is frequent, it may slow down your game, but the stack traces will let us know where we are going wrong and causing this to happen.
** We fixed one area where MAYBE this could be caused, but probably that was not possible in the place we fixed it. Most likely the problem is in something that is calling GameCommand_CreateSpeedGroup with a command.RelatedIntegers[0] that is greater than the 32767.
*** With that in mind, anything that is larger than that being passed into that method is now automatically corrected down to 32766. This may lead to some turbo speed groups, not sure, but at least they won't be erroring... and that IS what the calling code is asking for, so maybe it's intentional?
** At the same time, in some other places in the code where it was checking to apply the speed only if it was "not -1", it is now checking to apply the speed limit if it is "greater than 0." This seems more like the correct intent, and hopefully won't break anything.
** And beyond that, prior to serialization, any speed groups with an OverrideSpeedLimit less than -1 will automatically just set their value to -1 silently and thus avoid popup errors that could be really annoying in savegames for folks. This has been an issue on and off since July 24th, apparently.

Issue History

Date Modified Username Field Change
Aug 1, 2020 5:05 pm GreatYng New Issue
Aug 1, 2020 5:05 pm GreatYng File Added: PosExceptNeg1.txt
Aug 1, 2020 7:20 pm Lord Of Nothing Relationship added related to 0023466
Aug 1, 2020 7:23 pm Lord Of Nothing Relationship added related to 0023472
Aug 29, 2020 4:11 pm Chris_McElligottPark Note Added: 0058263
Aug 29, 2020 4:11 pm Chris_McElligottPark Relationship added related to 0023610
Aug 29, 2020 4:11 pm Chris_McElligottPark Relationship added related to 0023593
Aug 29, 2020 4:11 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Aug 29, 2020 4:11 pm Chris_McElligottPark Status new => assigned
Aug 29, 2020 5:01 pm Chris_McElligottPark Status assigned => resolved
Aug 29, 2020 5:01 pm Chris_McElligottPark Resolution open => fixed
Aug 29, 2020 5:01 pm Chris_McElligottPark Fixed in Version => 2.130 Civilian Industries
Aug 29, 2020 5:01 pm Chris_McElligottPark Note Added: 0058276