Overflow in simulation run count
Check for arithmetic overflows in run count and similar counters during simulation, and their effects. Sample crash on the r415 cluster with 40x8 threads:
(3.5 h)e.modest: info: All connections established (320 total threads).
Simulating ("TransientMin": -149892 runs done on 320 threads) for RED=5...
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at Modest.Modularity.OperationState.get_Progress () [0x00074] in <8d9dd85338ae40ce995532f28d214897>:0
at Modest.Simulation.PropertyJob`1[T].get_Progress () [0x00000] in <5f3645e9f43d452bbc7a708563f25465>:0
at Modest.Simulation.Master+<>c__26`1[T].<Run>b__26_5 (Modest.Simulation.PropertyJob`1[T] pj) [0x00000] in <5f3645e9f43d452bbc7a708563f25465>:0
at System.Linq.Enumerable.Average[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00038] in <7c00a79d928d450295295fabd909b8b7>:0
at Modest.Simulation.Master+<>c__DisplayClass26_0`1[T].<Run>b__4 () [0x00000] in <5f3645e9f43d452bbc7a708563f25465>:0
at Modest.Modularity.OperationState.get_Progress () [0x0001b] in <8d9dd85338ae40ce995532f28d214897>:0
at Modest.Modularity.OperationState.get_Progress () [0x00053] in <8d9dd85338ae40ce995532f28d214897>:0
at Modest.Modularity.OperationState.get_Progress () [0x00053] in <8d9dd85338ae40ce995532f28d214897>:0
at Modest.Modularity.OperationState.get_Progress () [0x00053] in <8d9dd85338ae40ce995532f28d214897>:0
at Modest.Modularity.OperationState.get_Progress () [0x00053] in <8d9dd85338ae40ce995532f28d214897>:0
at Modest.Modularity.OperationState.get_Progress () [0x00053] in <8d9dd85338ae40ce995532f28d214897>:0
at Modest.CommandLine.ConsoleOutputHandler.OperationStatePropertyChangedHandler (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0004d] in <b86590b9a0654760a5456eed791767cb>:0
at Modest.Modularity.OperationState.OnStatusOrProgressChanged (System.Object state) [0x00017] in <8d9dd85338ae40ce995532f28d214897>:0
at System.Threading.Timer+Scheduler.TimerCB (System.Object o) [0x00007] in <cc0368638257483f94f364ec47500332>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <cc0368638257483f94f364ec47500332>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <cc0368638257483f94f364ec47500332>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <cc0368638257483f94f364ec47500332>:0