View Issue Details

IDProjectCategoryLast Update
0019258AI War 2Crash/ExceptionOct 24, 2017 9:34 am
ReporterBadgerBadger Assigned Tokeith.lamothe  
Status resolvedResolutionfixed 
Product Version0.528 
Fixed in Version0.600 Tutorial Engine 
Summary0019258: immediate game crash: resource bar division by zero
DescriptionI had just started a new game when it immediately crashed thusly:
10/22/2017 3:55:09 PM Successfully opened host socket
10/22/2017 3:55:11 PM
Error occurred in sim planning context executionContext
System.DivideByZeroException: Division by zero
  at Arcen.Universal.FInt.op_Division (FInt one, FInt other) [0x00011] in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\ArcenMath\FInt.cs:129
  at Arcen.AIW2.External.Window_ResourceBar+tMetal_MiddleLine.GetTextToShow (Arcen.Universal.ArcenDoubleCharacterBuffer Buffer) [0x00000] in <filename unknown>:0
  at Arcen.Universal.ArcenUI_Text.OnSimStableUpdate () [0x000a1] in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\ArcenUI\ArcenUI_Text.cs:103
  at Arcen.Universal.ArcenUI_Window.OnSimStableUpdate () [0x00071] in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\ArcenUI\ArcenUI_Window.cs:109
  at Arcen.Universal.ArcenUI.OnSimStableUpdate () [0x00033] in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\ArcenUI\ArcenUI.cs:202
  at Arcen.AIW2.Core.SimExecution.Execute () [0x000aa] in C:\vcprojs\arcengames_aiw_ultra\ArcenAIW2Core\src\Logic\Sim\SimExecution\SimExecution.cs:41
  at Arcen.AIW2.Core.ArcenSimPlanningContext.InnerRun () [0x0002d] in C:\vcprojs\arcengames_aiw_ultra\ArcenAIW2Core\src\Logic\Sim\SimPlanningLoop.cs:82

   at System.Environment.get_StackTrace() in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Environment.cs:line 227
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, DebugLogDestination Destination, Boolean IncludeStackTrace, Verbosity Verbosity) in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:line 140
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, DebugLogDestination Destination, Verbosity Verbosity) in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:line 109
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, Verbosity Verbosity) in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:line 88
   at Arcen.AIW2.Core.ArcenSimPlanningContext.InnerRun() in C:\vcprojs\arcengames_aiw_ultra\ArcenAIW2Core\src\Logic\Sim\SimPlanningLoop.cs:line 86
   at Arcen.AIW2.Core.ArcenExecutionContext.InnerRun() in C:\vcprojs\arcengames_aiw_ultra\ArcenAIW2Core\src\Logic\Sim\SimPlanningLoop.cs:line 223

TagsNo tags attached.

Activities

BadgerBadger

Oct 22, 2017 3:58 pm

manager   ~0046517

I think the crash had to be on
                        Buffer.Add( ( netIncome / World_AIW2.Instance.SimulationProfile.SecondsPerFrameSim ).GetNearestIntPreferringHigher() );
That doesn't look like something that should ever be zero, but perhaps there's some sort of race condition?

BadgerBadger

Oct 23, 2017 1:06 pm

manager   ~0046522

I've hit this a few more times, it might be correlated with Pausing the game.

I added a printout and it's definitely the line I mentioned above:
10/23/2017 1:05:16 PM tMetal_MiddleLine: secondsPerFrameSim is 0
10/23/2017 1:05:16 PM
Error occurred in sim planning context executionContext
System.DivideByZeroException: Division by zero
  at Arcen.Universal.FInt.op_Division (FInt one, FInt other) [0x00011] in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\ArcenMath\FInt.cs:129
  at Arcen.AIW2.External.Window_ResourceBar+tMetal_MiddleLine.GetTextToShow (Arcen.Universal.ArcenDoubleCharacterBuffer Buffer) [0x00000] in <filename unknown>:0
  at Arcen.Universal.ArcenUI_Text.OnSimStableUpdate () [0x000a1] in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\ArcenUI\ArcenUI_Text.cs:103
  at Arcen.Universal.ArcenUI_Window.OnSimStableUpdate () [0x00071] in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\ArcenUI\ArcenUI_Window.cs:109
  at Arcen.Universal.ArcenUI.OnSimStableUpdate () [0x00033] in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\ArcenUI\ArcenUI.cs:202
  at Arcen.AIW2.Core.SimExecution.Execute () [0x000aa] in C:\vcprojs\arcengames_aiw_ultra\ArcenAIW2Core\src\Logic\Sim\SimExecution\SimExecution.cs:41
  at Arcen.AIW2.Core.ArcenSimPlanningContext.InnerRun () [0x0002d] in C:\vcprojs\arcengames_aiw_ultra\ArcenAIW2Core\src\Logic\Sim\SimPlanningLoop.cs:82

   at System.Environment.get_StackTrace() in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Environment.cs:line 227
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, DebugLogDestination Destination, Boolean IncludeStackTrace, Verbosity Verbosity) in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:line 140
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, DebugLogDestination Destination, Verbosity Verbosity) in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:line 109
   at Arcen.Universal.ArcenDebugging.ArcenDebugLog(System.String Message, Verbosity Verbosity) in C:\vcprojs\arcengames_aiw_ultra\ArcenUniversal\src\UtilityLibraries\ArcenDebugging.cs:line 88
   at Arcen.AIW2.Core.ArcenSimPlanningContext.InnerRun() in C:\vcprojs\arcengames_aiw_ultra\ArcenAIW2Core\src\Logic\Sim\SimPlanningLoop.cs:line 86
   at Arcen.AIW2.Core.ArcenExecutionContext.InnerRun() in C:\vcprojs\arcengames_aiw_ultra\ArcenAIW2Core\src\Logic\Sim\SimPlanningLoop.cs:line 223

keith.lamothe

Oct 24, 2017 9:34 am

administrator   ~0046524

Whoops, thanks. For 0.529:

* Fixed a problem with the new UI display code where pausing could lead to divide-by-zero errors (since it led to sim steps of zero-game-time).

Issue History

Date Modified Username Field Change
Oct 22, 2017 3:56 pm BadgerBadger New Issue
Oct 22, 2017 3:58 pm BadgerBadger Note Added: 0046517
Oct 23, 2017 1:06 pm BadgerBadger Note Added: 0046522
Oct 24, 2017 9:34 am keith.lamothe Assigned To => keith.lamothe
Oct 24, 2017 9:34 am keith.lamothe Status new => resolved
Oct 24, 2017 9:34 am keith.lamothe Resolution open => fixed
Oct 24, 2017 9:34 am keith.lamothe Fixed in Version => 0.600 Tutorial Engine
Oct 24, 2017 9:34 am keith.lamothe Note Added: 0046524