Repository: triplea-game/triplea

Issue #10936: 2.6+93c2e16: ConcurrentBattleCalculator#calculate:196 - java.lang.IllegalStateException
Created: 2022-08-06T01:13:17Z
User Description
Game: Global 40 House Rules with Canada
Engine Version: 2.6+93c2e16
Java Version: 11.0.9.1
Platform:  PC with Windows 11
Game Round: 24
Player: Hard AI - Anzac
Phase: Anzac Purchase Units
Map
global_40_house_rules
Log Message
java.lang.IllegalStateException: Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA.
Attacking unit types: bomberA0C5, Defending unit types: submarine,transport
TripleA Version
2.6+93c2e16
Java Version
11.0.9.1
Operating System
Windows 10
Stack Trace
Exception: java.lang.IllegalStateException java.lang.IllegalStateException: Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA.
 Attacking unit types: bomberA0C5, Defending unit types: submarine,transport
java.lang.Exception
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:600)
	at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678)
	at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:737)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.calculate(ConcurrentBattleCalculator.java:196)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.callBattleCalc(ProOddsCalculator.java:250)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.callBattleCalc(ProOddsCalculator.java:226)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.calculateBattleResults(ProOddsCalculator.java:159)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.calculateBattleResults(ProOddsCalculator.java:143)
	at games.strategy.triplea.ai.pro.ProNonCombatMoveAi.determineIfMoveTerritoriesCanBeHeld(ProNonCombatMoveAi.java:412)
	at games.strategy.triplea.ai.pro.ProNonCombatMoveAi.doNonCombatMove(ProNonCombatMoveAi.java:109)
	at games.strategy.triplea.ai.pro.ProNonCombatMoveAi.simulateNonCombatMove(ProNonCombatMoveAi.java:77)
	at games.strategy.triplea.ai.pro.AbstractProAi.purchase(AbstractProAi.java:215)
	at games.strategy.triplea.ai.AbstractAi.start(AbstractAi.java:508)
	at games.strategy.engine.framework.ServerGame.waitForPlayerToFinishStep(ServerGame.java:593)
	at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:450)
	at games.strategy.engine.framework.ServerGame.runNextStep(ServerGame.java:345)
	at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:312)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:92)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.lambda$launch$0(LocalLauncher.java:60)
	at java.base/java.lang.Thread.run(Thread.java:834)


Exception: java.lang.IllegalStateException Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA.
 Attacking unit types: bomberA0C5, Defending unit types: submarine,transport
java.lang.Exception
	at games.strategy.triplea.delegate.battle.MustFightBattle$29.execute(MustFightBattle.java:1317)
	at games.strategy.triplea.delegate.ExecutionStack.execute(ExecutionStack.java:34)
	at games.strategy.triplea.delegate.battle.MustFightBattle.fight(MustFightBattle.java:712)
	at games.strategy.triplea.odds.calculator.BattleCalculator.calculate(BattleCalculator.java:124)
	at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$calculate$4(ConcurrentBattleCalculator.java:184)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:952)
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:926)
	at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Duplicate issue #10913: 2.6+e82634a: ConcurrentBattleCalculator#calculate:196 - java.lang.IllegalStateException
Created: 2022-07-29T15:45:08Z
User Description
Playing Global 40 House Rules with Canada.
Round 10, start of Anzac (AI Hard) turn.
After this error I saved the game and exited game.  When I  loaded the saved game I got the same error.
FYI, Allies are combination of Human and AI Hard, Axis is AI Hard.
I'm not sure how to upload the saved game here.
My Forum name is Raybeat
Map
global_40_house_rules
Log Message
java.lang.IllegalStateException: Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA.
Attacking unit types: bomberA0C5, Defending unit types: submarine,transport
TripleA Version
2.6+e82634a
Java Version
11.0.9.1
Operating System
Windows 10
Stack Trace
Exception: java.lang.IllegalStateException java.lang.IllegalStateException: Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA.
 Attacking unit types: bomberA0C5, Defending unit types: submarine,transport
java.lang.Exception
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:600)
	at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678)
	at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:737)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.calculate(ConcurrentBattleCalculator.java:196)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.callBattleCalc(ProOddsCalculator.java:250)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.callBattleCalc(ProOddsCalculator.java:226)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.calculateBattleResults(ProOddsCalculator.java:159)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.calculateBattleResults(ProOddsCalculator.java:143)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.calculateBattleResults(ProOddsCalculator.java:124)
	at games.strategy.triplea.ai.pro.util.ProOddsCalculator.calculateBattleResults(ProOddsCalculator.java:134)
	at games.strategy.triplea.ai.pro.ProNonCombatMoveAi.moveUnitsToBestTerritories(ProNonCombatMoveAi.java:1766)
	at games.strategy.triplea.ai.pro.ProNonCombatMoveAi.doNonCombatMove(ProNonCombatMoveAi.java:160)
	at games.strategy.triplea.ai.pro.ProNonCombatMoveAi.simulateNonCombatMove(ProNonCombatMoveAi.java:77)
	at games.strategy.triplea.ai.pro.AbstractProAi.purchase(AbstractProAi.java:215)
	at games.strategy.triplea.ai.AbstractAi.start(AbstractAi.java:508)
	at games.strategy.engine.framework.ServerGame.waitForPlayerToFinishStep(ServerGame.java:593)
	at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:450)
	at games.strategy.engine.framework.ServerGame.setUpGameForRunningSteps(ServerGame.java:331)
	at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:310)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:92)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.lambda$launch$0(LocalLauncher.java:60)
	at java.base/java.lang.Thread.run(Thread.java:834)


Exception: java.lang.IllegalStateException Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA.
 Attacking unit types: bomberA0C5, Defending unit types: submarine,transport
java.lang.Exception
	at games.strategy.triplea.delegate.battle.MustFightBattle$29.execute(MustFightBattle.java:1317)
	at games.strategy.triplea.delegate.ExecutionStack.execute(ExecutionStack.java:34)
	at games.strategy.triplea.delegate.battle.MustFightBattle.fight(MustFightBattle.java:712)
	at games.strategy.triplea.odds.calculator.BattleCalculator.calculate(BattleCalculator.java:124)
	at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$calculate$4(ConcurrentBattleCalculator.java:184)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:952)
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:926)
	at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Closing comment (2022-10-24T23:18:51Z): Duplicate of #10936