Repository: triplea-game/triplea

Issue #6514: 2.0.19463: HistoryWriter#startEvent:123 - IllegalStateException
Created: 2020-05-22T14:35:43Z
User Description
Trying out an all AI game of Iron War. During 3rd round this error happened. Actually two times during this round, but with other countries / players named. Dont know what it is about. The game kept playin with its all AI players. //FrostionAAA
Log Message
Not in a step, but trying to add event: Filler event for child: USSR win. Current history node is: null
TripleA Version
2.0.19463
Java Version
11.0.6
Operating System
Windows 10
Exception
java.lang.IllegalStateException: Not in a step, but trying to add event: Filler event for child: USSR win. Current history node is: null
Stack Trace
java.lang.IllegalStateException: Not in a step, but trying to add event: Filler event for child: USSR win. Current history node is: null
	at games.strategy.engine.history.HistoryWriter.startEvent(HistoryWriter.java:123)
	at games.strategy.engine.history.HistoryWriter.addChildToEvent(HistoryWriter.java:154)
	at games.strategy.engine.framework.ServerGame$1.addChildToEvent(ServerGame.java:122)
	at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeSingle(EndPoint.java:136)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.lambda$invokeMultiple$0(EndPoint.java:120)
	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$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeMultiple(EndPoint.java:121)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeLocal(EndPoint.java:111)
	at games.strategy.engine.message.unifiedmessenger.UnifiedMessenger.invoke(UnifiedMessenger.java:152)
	at games.strategy.engine.message.UnifiedInvocationHandler.invoke(UnifiedInvocationHandler.java:48)
	at com.sun.proxy.$Proxy17.addChildToEvent(Unknown Source)
	at games.strategy.engine.history.DelegateHistoryWriter.lambda$addChildToEvent$2(DelegateHistoryWriter.java:49)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at games.strategy.engine.history.DelegateHistoryWriter.addChildToEvent(DelegateHistoryWriter.java:49)
	at games.strategy.triplea.delegate.GameDelegateHistoryWriter.addChildToEvent(GameDelegateHistoryWriter.java:59)
	at games.strategy.triplea.delegate.battle.MustFightBattle.defenderWins(MustFightBattle.java:2508)
	at games.strategy.triplea.delegate.battle.MustFightBattle$22.execute(MustFightBattle.java:1942)
	at games.strategy.triplea.delegate.ExecutionStack.execute(ExecutionStack.java:34)
	at games.strategy.triplea.delegate.battle.MustFightBattle.fight(MustFightBattle.java:649)
	at games.strategy.triplea.delegate.battle.BattleDelegate.fightBattle(BattleDelegate.java:242)
	at jdk.internal.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at games.strategy.engine.delegate.DelegateExecutionManager$1.invoke(DelegateExecutionManager.java:120)
	at com.sun.proxy.$Proxy15.fightBattle(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeSingle(EndPoint.java:136)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.lambda$invokeMultiple$0(EndPoint.java:120)
	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$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeMultiple(EndPoint.java:121)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeLocal(EndPoint.java:111)
	at games.strategy.engine.message.unifiedmessenger.UnifiedMessenger.invokeAndWait(UnifiedMessenger.java:96)
	at games.strategy.engine.message.UnifiedInvocationHandler.invoke(UnifiedInvocationHandler.java:56)
	at com.sun.proxy.$Proxy15.fightBattle(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at games.strategy.engine.player.DefaultPlayerBridge$GameOverInvocationHandler.invoke(DefaultPlayerBridge.java:152)
	at com.sun.proxy.$Proxy15.fightBattle(Unknown Source)
	at games.strategy.triplea.ai.AbstractAi.battle(AbstractAi.java:609)
	at games.strategy.triplea.ai.AbstractAi.start(AbstractAi.java:517)
	at games.strategy.engine.framework.ServerGame.waitForPlayerToFinishStep(ServerGame.java:538)
	at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:408)
	at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:297)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:61)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:34)
	at games.strategy.engine.framework.startup.launcher.AbstractLauncher.lambda$launch$0(AbstractLauncher.java:16)
	at java.base/java.lang.Thread.run(Thread.java:834)

Duplicate issue #6942: 2.0.20234: HistoryWriter#startEvent:123 - IllegalStateException
Created: 2020-06-30T05:23:50Z
Log Message
Remote method call exception: Not in a step, but trying to add event: Recording Battle Statistics. Current history node is: null
TripleA Version
2.0.20234
Java Version
11.0.6
Operating System
Mac OS X
Exception
java.lang.IllegalStateException: Not in a step, but trying to add event: Recording Battle Statistics. Current history node is: null
Stack Trace
java.lang.IllegalStateException: Not in a step, but trying to add event: Recording Battle Statistics. Current history node is: null
	at games.strategy.engine.history.HistoryWriter.startEvent(HistoryWriter.java:123)
	at games.strategy.engine.framework.ServerGame$1.startHistoryEvent(ServerGame.java:113)
	at jdk.internal.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeSingle(EndPoint.java:136)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.lambda$invokeMultiple$0(EndPoint.java:120)
	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$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeMultiple(EndPoint.java:121)
	at games.strategy.engine.message.unifiedmessenger.EndPoint.invokeLocal(EndPoint.java:111)
	at games.strategy.engine.message.unifiedmessenger.UnifiedMessenger.invoke(UnifiedMessenger.java:152)
	at games.strategy.engine.message.UnifiedInvocationHandler.invoke(UnifiedInvocationHandler.java:48)
	at com.sun.proxy.$Proxy10.startHistoryEvent(Unknown Source)
	at games.strategy.engine.history.DelegateHistoryWriter.lambda$startEvent$1(DelegateHistoryWriter.java:38)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at games.strategy.engine.history.DelegateHistoryWriter.startEvent(DelegateHistoryWriter.java:38)
	at games.strategy.triplea.delegate.GameDelegateHistoryWriter.startEvent(GameDelegateHistoryWriter.java:41)
	at games.strategy.triplea.delegate.battle.BattleTracker.sendBattleRecordsToGameData(BattleTracker.java:1312)
	at games.strategy.triplea.delegate.battle.BattleDelegate.end(BattleDelegate.java:130)
	at games.strategy.engine.framework.ServerGame.endStep(ServerGame.java:455)
	at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:424)
	at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:297)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:61)
	at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:34)
	at games.strategy.engine.framework.startup.launcher.AbstractLauncher.lambda$launch$0(AbstractLauncher.java:16)
	at java.base/java.lang.Thread.run(Thread.java:834)

Closing comment (2020-07-01T08:36:18Z): Duplicate of #6514