View Issue Details

IDProjectCategoryLast Update
0023961AI War 2Crash/ExceptionOct 13, 2020 12:39 am
ReporterMetrekec Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version2.611 AI Defensive Huddle 
Fixed in Version2.612 Divide By Zero Hotfix 
Summary0023961: Divide By zero exception popup spam
DescriptionHappened soon after game start and starting to attack a planet, errors trigger after loading save.
TagsNo tags attached.

Activities

Metrekec

Oct 12, 2020 9:28 pm

reporter  

divideByZero.save (317,406 bytes)
ArcenDebugLog.txt (544,163 bytes)

BadgerBadger

Oct 12, 2020 9:29 pm

manager   ~0059186

10/12/2020 9:26:47 PM AI special faction error DoPerSecondLogic_Stage3Main, debug stage: 900 System.DivideByZeroException: Attempted to divide by zero.
  at Arcen.Universal.FInt.op_Division (Arcen.Universal.FInt one, System.Int32 divisor) [0x00001] in <08210dd2277c4b53aa40bf35114036f0>:0
  at Arcen.AIW2.External.SpecialFaction_AI.ReinforceListOfPlanets (System.Collections.Generic.List`1[T] planetList, Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context, Arcen.Universal.FInt& totalBudget, Arcen.Universal.FInt& subBudget, System.Int32[]& strengthAddedByPlanetIndex, System.Boolean logReinforcementEventDetails, System.String PlanetListName) [0x00081] in <cf661f0ca03b45d592c5f7521a5294f8>:0
  at Arcen.AIW2.External.SpecialFaction_AI.TryToSpendBudget_Reinforcement (Arcen.AIW2.Core.ArcenSimContext Context, Arcen.AIW2.Core.Faction faction) [0x00236] in <cf661f0ca03b45d592c5f7521a5294f8>:0

BadgerBadger

Oct 12, 2020 9:37 pm

manager   ~0059187

I note there's no bailout in ReinforceListOfPlanets for the "PlanetList is empty" case

Chris_McElligottPark

Oct 12, 2020 9:53 pm

administrator   ~0059189

Thanks!

* Fixed a bug in the most recent version where if there were no planets valid to reinforce in a category, it could have a divide by zero exception.

Asteroid

Oct 12, 2020 10:40 pm

reporter   ~0059190

I'm still getting Divide by Zero spam on 2.612, seems like the hotfix wasn't successful.
Looks like same stack trace to me:
10/12/2020 10:36:00 PM AI special faction error DoPerSecondLogic_Stage3Main, debug stage: 900 System.DivideByZeroException: Attempted to divide by zero.
  at Arcen.Universal.FInt.op_Division (Arcen.Universal.FInt one, System.Int32 divisor) [0x00001] in <08210dd2277c4b53aa40bf35114036f0>:0
  at Arcen.AIW2.External.SpecialFaction_AI.ReinforceListOfPlanets (System.Collections.Generic.List`1[T] planetList, Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context, Arcen.Universal.FInt& totalBudget, Arcen.Universal.FInt& subBudget, System.Int32[]& strengthAddedByPlanetIndex, System.Boolean logReinforcementEventDetails, System.String PlanetListName) [0x00081] in <cf661f0ca03b45d592c5f7521a5294f8>:0
  at Arcen.AIW2.External.SpecialFaction_AI.TryToSpendBudget_Reinforcement (Arcen.AIW2.Core.ArcenSimContext Context, Arcen.AIW2.Core.Faction faction) [0x00236] in <cf661f0ca03b45d592c5f7521a5294f8>:0
  at Arcen.AIW2.External.SpecialFaction_AI.TryToSpendBudget (Arcen.AIW2.Core.ArcenSimContext Context, Arcen.AIW2.Core.Faction faction, Arcen.AIW2.External.AIBudgetType budget) [0x00031] in <cf661f0ca03b45d592c5f7521a5294f8>:0
  at Arcen.AIW2.External.SpecialFaction_AI.DoPerSecondLogic_Stage3Main_OnMainThreadAndPartOfSim (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context) [0x005be] in <cf661f0ca03b45d592c5f7521a5294f8>:0
B002.save (302,788 bytes)

Chris_McElligottPark

Oct 12, 2020 10:48 pm

administrator   ~0059191

This is very strange. It seems like it did not completely compile, or did not push the compiled version. I load up your save and it works fine. And the only line that could divide by zero looks to be the one I fixed. So I did a hard force recompile and am pushing it again. Fingers crossed. I did not update the version number. Will let you know when it's ready to download, but I have to sign off for the night right after.

Chris_McElligottPark

Oct 12, 2020 10:55 pm

administrator   ~0059192

Okay, restarting steam should force the un-numbered update which should fix it. Thanks for the catch!

Asteroid

Oct 13, 2020 12:39 am

reporter   ~0059193

The resubmit to Steam seems to have done the trick, no more error spam in the log. Thank you. I didn't even have to restart Steam, it prompted me for an update.

Issue History

Date Modified Username Field Change
Oct 12, 2020 9:28 pm Metrekec New Issue
Oct 12, 2020 9:28 pm Metrekec File Added: divideByZero.save
Oct 12, 2020 9:28 pm Metrekec File Added: divideByZero.savemet
Oct 12, 2020 9:28 pm Metrekec File Added: ArcenDebugLog.txt
Oct 12, 2020 9:29 pm BadgerBadger Note Added: 0059186
Oct 12, 2020 9:31 pm Metrekec Product Version => 2.611 AI Defensive Huddle
Oct 12, 2020 9:37 pm BadgerBadger Note Added: 0059187
Oct 12, 2020 9:53 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Oct 12, 2020 9:53 pm Chris_McElligottPark Status new => resolved
Oct 12, 2020 9:53 pm Chris_McElligottPark Resolution open => fixed
Oct 12, 2020 9:53 pm Chris_McElligottPark Fixed in Version => 2.612 Divide By Zero Hotfix
Oct 12, 2020 9:53 pm Chris_McElligottPark Note Added: 0059189
Oct 12, 2020 10:40 pm Asteroid File Added: B002.save
Oct 12, 2020 10:40 pm Asteroid Note Added: 0059190
Oct 12, 2020 10:42 pm Asteroid Status resolved => new
Oct 12, 2020 10:42 pm Asteroid Resolution fixed => reopened
Oct 12, 2020 10:48 pm Chris_McElligottPark Note Added: 0059191
Oct 12, 2020 10:55 pm Chris_McElligottPark Note Added: 0059192
Oct 12, 2020 10:56 pm Chris_McElligottPark Status new => resolved
Oct 13, 2020 12:39 am Asteroid Note Added: 0059193
Oct 13, 2020 12:39 am Asteroid Resolution reopened => fixed