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.32k stars 392 forks source link

ConcurrentBattleCalculator#calculate:200 - java.lang.IllegalStateException #11975

Closed tripleabuilderbot closed 4 months ago

tripleabuilderbot commented 11 months ago

User Description

Duplicate of https://github.com/triplea-game/triplea/issues/11966

Map

ww2_path_to_victory

Log Message

java.lang.IllegalStateException: Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA. Territory: Western Germany Attacker: Germans Attacking unit types: armour, Defending unit types: armour

TripleA Version

2.6.14509

Java Version

11.0.19

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.
 Territory: Western Germany Attacker: Germans Attacking unit types: armour, Defending unit types: armour
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:200)
    at games.strategy.triplea.odds.calculator.BattleCalculatorPanel.lambda$updateStats$13(BattleCalculatorPanel.java:589)
    at java.base/java.lang.Thread.run(Thread.java:829)

Exception: java.lang.IllegalStateException Round 10,000 reached in a battle. Something must be wrong. Please report this to TripleA.
 Territory: Western Germany Attacker: Germans Attacking unit types: armour, Defending unit types: armour
java.lang.Exception
    at games.strategy.triplea.delegate.battle.MustFightBattle$29.execute(MustFightBattle.java:1345)
    at games.strategy.triplea.delegate.ExecutionStack.execute(ExecutionStack.java:34)
    at games.strategy.triplea.delegate.battle.MustFightBattle.fight(MustFightBattle.java:715)
    at games.strategy.triplea.odds.calculator.BattleCalculator.calculate(BattleCalculator.java:115)
    at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$calculate$4(ConcurrentBattleCalculator.java:188)
    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)
Cernelius commented 11 months ago

Why is this not being automatically detected as a duplicate?

I think the program should not ask me to make this report and should instead link me to https://github.com/triplea-game/triplea/issues/11966

Is this a problem with the program (failing to auto-detect obvious duplicates so prompting redundant error reports)?

I'm leaving this duplicate open to address this question.

Cernelius commented 11 months ago

I think I understood that this is likely not a duplicate of the other issue. I'm now thinking that the other error has been obtained by actually making the battle for that many combat rounds (likely the AI was in control of both sides). If this is the case, never mind about my previous post.

asvitkine commented 4 months ago

Closing in favor of https://github.com/triplea-game/triplea/issues/12488