View Issue Details

IDProjectCategoryLast Update
0023472AI War 2Crash/ExceptionAug 29, 2020 5:01 pm
ReporterApthorpe Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version2.106 Immortals and Unresponsiveness 
Fixed in Version2.130 Civilian Industries 
Summary0023472: Error overwriting a save - "Tried to write Int16 PosExceptNeg1..."
DescriptionGot an error while trying to overwrite a save.

Here's a relevant portion: "Tried to write Int16 PosExceptNeg1, but passed value was: -30164, which is out of range! Value set to -1 so your save would work. (Unknown field being saved)"

ADDED:
-Tested it a little more and it also occurred in the same session when I create a new save in the same campaign.
-The save still seems to load properly (I quite the client and reloaded the game before doing so).
-When I load the save and immediately save again, I don't receive an error.
TagsNo tags attached.

Relationships

related to 0023610 resolvedChris_McElligottPark Error message on saving. (Save still works fine.) 
related to 0023593 resolvedChris_McElligottPark Occasional Exception 
related to 0023493 resolvedChris_McElligottPark Tried to write Int16 PosExceptNeg1, but passed value was: -31018 

Activities

Apthorpe

Jul 26, 2020 5:07 am

reporter   ~0057850

This is the save I was overwriting which originally brought up the error.

Apthorpe

Jul 26, 2020 3:01 pm

reporter   ~0057851

The autosave is at 3h 30m, while san.save is at 3h 35m.
ArcenDebugLog.txt (581,569 bytes)
san.save (425,125 bytes)
san.savemet (87 bytes)
Autosave.12600.save (407,626 bytes)

Chris_McElligottPark

Aug 29, 2020 4:13 pm

administrator   ~0058264

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   ~0058274

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
Jul 26, 2020 4:54 am Apthorpe New Issue
Jul 26, 2020 4:54 am Apthorpe File Added: ArcenDebugLog.txt
Jul 26, 2020 4:58 am Apthorpe Description Updated
Jul 26, 2020 5:07 am Apthorpe File Added: ni.save
Jul 26, 2020 5:07 am Apthorpe File Added: ni.savemet
Jul 26, 2020 5:07 am Apthorpe Note Added: 0057850
Jul 26, 2020 2:58 pm Apthorpe File Deleted: ArcenDebugLog.txt
Jul 26, 2020 2:58 pm Apthorpe File Deleted: ni.savemet
Jul 26, 2020 2:58 pm Apthorpe File Deleted: ni.save
Jul 26, 2020 3:01 pm Apthorpe File Added: ArcenDebugLog.txt
Jul 26, 2020 3:01 pm Apthorpe File Added: san.save
Jul 26, 2020 3:01 pm Apthorpe File Added: san.savemet
Jul 26, 2020 3:01 pm Apthorpe File Added: Autosave.12600.save
Jul 26, 2020 3:01 pm Apthorpe File Added: Autosave.12600.savemet
Jul 26, 2020 3:01 pm Apthorpe Note Added: 0057851
Aug 1, 2020 7:23 pm Lord Of Nothing Relationship added related to 0023493
Aug 29, 2020 4:13 pm Chris_McElligottPark Note Added: 0058264
Aug 29, 2020 4:13 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Aug 29, 2020 4:13 pm Chris_McElligottPark Status new => assigned
Aug 29, 2020 4:13 pm Chris_McElligottPark Relationship added related to 0023610
Aug 29, 2020 4:13 pm Chris_McElligottPark Relationship added related to 0023593
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: 0058274