triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.35k stars 399 forks source link

2.6+de55cc6: MustFightBattle#execute:1317 - java.lang.IllegalStateException #11082

Closed tripleabuilderbot closed 1 year ago

tripleabuilderbot commented 2 years ago

User Description

Error msg does not match really, this happened on the British turn (round two), but the Brits have no submarines on the map!

Map

world_war_ii_global

Log Message

Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA. Attacking unit types: submarine, Defending unit types: fighter,transport

TripleA Version

2.6+de55cc6

Java Version

11.0.9.1

Operating System

Windows 10

Stack Trace

Exception: java.lang.IllegalStateException Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA.
 Attacking unit types: submarine, Defending unit types: fighter,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.ForkJoinTask.doInvoke(ForkJoinTask.java:408)
    at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736)
    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.callBattleCalc(ProOddsCalculator.java:216)
    at games.strategy.triplea.ai.pro.util.ProOddsCalculator.estimateAttackBattleResults(ProOddsCalculator.java:61)
    at games.strategy.triplea.ai.pro.util.ProBattleUtils.territoryHasLocalNavalSuperiority(ProBattleUtils.java:422)
    at games.strategy.triplea.ai.pro.ProPurchaseAi.purchaseSeaAndAmphibUnits(ProPurchaseAi.java:1837)
    at games.strategy.triplea.ai.pro.ProPurchaseAi.purchase(ProPurchaseAi.java:354)
    at games.strategy.triplea.ai.pro.AbstractProAi.purchase(AbstractProAi.java:254)
    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)
asvitkine commented 1 year ago

Closed as dupe of https://github.com/triplea-game/triplea/issues/10936.