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

Hard AI hangs occasionally, and the process does not end properly when force-quit. #8933

Closed zlefin closed 2 months ago

zlefin commented 3 years ago

I have had this issue occur both in 2.5.22294 and in prerelease 2.6.35@0a94d69db1 I am using Windows 10 Home

How can the problem be recreated?

The problem does not occur consistently, it takes multiple tries to get it to occur on my system.

While I have had this issue occur in multiple maps (specifically one of the Globals, and Warcraft War heroes, as well as the one in the instructions below), I'll focus on one for the instructions. Select map World War II v6 1941 Set all players to Hard AI Let the game run.

Sometimes the game will hang, and not make any progress no matter how long I wait. It simply stays at whatever phase it is at, and the game client can become poorly responsive or unresponsive. Other times it runs fine until one side wins, in which case simply accept the winners victory, and start a new game. I estimate the error occurs around 1/4 of the games; so it can take a few tries to get the bug to occur, this takes ~30 minutes on my system, as each game usually ends in a bit under 10 minutes.

When the game hangs, I quit out of it using either the X in the top-right corner to close the window (doesn't always work), or using task manager to force-quit the process, this generally closes the window. But even when I close it, if I look in task manager it shows the process as still being active. It isn't in the list of "apps" in task manager, but in one of the other lists, "background processes" I think. Furthermore, that instance of "triplea" that still shows in the task manager will not go away. I select it in task manager and choose end task, but the task simply will not end, it just stays there. The only way to make it go away has been to reboot the system.

Do you have any ideas for an expected fix?

Attach a Save Game

No, the issue does not occur consistently, and reloading from an autosave shortly before does not reliably cause the problem to reoccur.

Is there anything else we should know?

DanVanAtta commented 3 years ago

The only way to debug this is either:

It's not necessarily too difficult to get set up to run a stack trace. A person can get set up and run a stack trace on a healthy application, then when you see a freeze you would be ready to run the stack trace. If you can get a stack trace, attaching that data into a gist and then linking to that gist here would be excellent.

Here is where you can find more information about obtaining a stack trace:

zlefin commented 3 years ago

Does the triplea clients console log have a way to get the pertinent dump directly? It has buttons for "enumerate threads" and some other stuff. I don't see any way to issue it commands or get it to do other stuff than what it has buttons for. It doesn't seem to take direct commands afaict.

I tried the links you listed but wasn't able to get a stack trace using any of them; it mostly involves stuff I'm not used to doing and do not understand well.

It doesn't help that my keyboard doesn't have a "break" button, and I can't get one to match the stated effect using any of the keyboard combinations listed that are supposed to do it for this keyboard type. Nor does Windows on-screen keyboard have a way to do the break button.

It's a pity the listed process for reproduction is so slow, as that one does reproduce it, it just takes awhile. I'll keep tinkering and see if I can find a way to get the stack trace.

DanVanAtta commented 3 years ago

Does the triplea clients console log have a way to get the pertinent dump directly?

It used to, but unfortunately if the game is locked up then the button to generate the dump would also be locked up and not clickable.

Also, the console has been replaced with a log file.

Typically the easiest way to get a stack trace on windows is to run triplea from a console window and use 'jps' to get the PID, it's not necesarily the most trivial to do.

zlefin commented 3 years ago

Task manager seems to have a section that lists the PID, so I was able to get that from there.

How much text should the stack trace show?

I tried using an older copy of JDK I had installed, when I used the jstack command from there, the results are odd: If I open up a new window of triplea, and use jstack on its PID, then the command seems to work, and generates about 100 lines worth of stuff, but that seems lower than what should be needed. If I use jstack on the PID for the 'phantom process' that remained after the hang, it gives me an "access denied" message in the command prompt.

DanVanAtta commented 3 years ago

The windows PID and java PID may be different. 100'ish lines seems about right.

Please have a look at: https://github.com/triplea-game/triplea/issues/8927, and the "is there anything else we should know" section, that shows a stack trace for one thread. The thread dump will have very similar to that, but perhaps around 8'ish of them give or take a few.

zlefin commented 3 years ago

Ok, was able to get a stack trace, copy-pasting it in from the command prompt.

C:\Program Files\Java\jdk-9.0.4\bin>jstack 7928
2021-03-01 08:58:07
Full thread dump OpenJDK 64-Bit Client VM (11.0.6+10 mixed mode):

Threads class SMR info:
_java_thread_list=0x00000000247b6610, length=23, elements={
0x000000000350d000, 0x000000000cc7b000, 0x000000000cc81000, 0x000000000ccd8000,
0x000000000ccd9000, 0x000000000ccde000, 0x000000000cce3000, 0x000000000cdc3800,
0x000000000d8d8800, 0x000000000dba6800, 0x000000000dba2000, 0x000000000db8e000,
0x0000000016f94800, 0x000000001d432800, 0x000000001d466800, 0x000000001d4fb000,
0x000000001d73e000, 0x000000001d73b000, 0x000000001d73f000, 0x000000001d740000,
0x000000000d8cc800, 0x000000000d8c9000, 0x000000000d8ca800
}

"main" #1 prio=5 os_prio=0 cpu=671.88ms elapsed=445.96s tid=0x000000000350d000 nid=0xfe4 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Reference Handler" #2 daemon prio=10 os_prio=2 cpu=0.00ms elapsed=445.92s tid=0x000000000cc7b000 nid=0x2708 waiting on condition  [0x000000000cf0f000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.6/Native Method)
        at java.lang.ref.Reference.processPendingReferences(java.base@11.0.6/Reference.java:241)
        at java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.6/Reference.java:213)

"Finalizer" #3 daemon prio=8 os_prio=1 cpu=0.00ms elapsed=445.92s tid=0x000000000cc81000 nid=0x2190 in Object.wait()  [0x000000000d04f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:155)
        - waiting to re-lock in wait() <0x00000000aaaad198> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:176)
        at java.lang.ref.Finalizer$FinalizerThread.run(java.base@11.0.6/Finalizer.java:170)

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=445.90s tid=0x000000000ccd8000 nid=0x2094 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 cpu=0.00ms elapsed=445.90s tid=0x000000000ccd9000 nid=0x2114 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread0" #6 daemon prio=9 os_prio=2 cpu=11078.13ms elapsed=445.90s tid=0x000000000ccde000 nid=0x1b84 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #7 daemon prio=9 os_prio=2 cpu=6796.88ms elapsed=445.90s tid=0x000000000cce3000 nid=0x234 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #8 daemon prio=9 os_prio=0 cpu=0.00ms elapsed=445.87s tid=0x000000000cdc3800 nid=0x1338 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #9 daemon prio=8 os_prio=1 cpu=0.00ms elapsed=445.86s tid=0x000000000d8d8800 nid=0x1d44 in Object.wait()  [0x000000000df7f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:155)
        - waiting to re-lock in wait() <0x00000000aab48e50> (a java.lang.ref.ReferenceQueue$Lock)
        at jdk.internal.ref.CleanerImpl.run(java.base@11.0.6/CleanerImpl.java:148)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)
        at jdk.internal.misc.InnocuousThread.run(java.base@11.0.6/InnocuousThread.java:134)

"Java2D Disposer" #10 daemon prio=10 os_prio=2 cpu=46.88ms elapsed=445.69s tid=0x000000000dba6800 nid=0xc7c in Object.wait()  [0x0000000015d1f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:155)
        - waiting to re-lock in wait() <0x00000000aade6d80> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:176)
        at sun.java2d.Disposer.run(java.desktop@11.0.6/Disposer.java:144)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"AWT-Shutdown" #11 prio=5 os_prio=0 cpu=0.00ms elapsed=445.66s tid=0x000000000dba2000 nid=0x22ec in Object.wait()  [0x000000001605e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.Object.wait(java.base@11.0.6/Object.java:328)
        at sun.awt.AWTAutoShutdown.run(java.desktop@11.0.6/AWTAutoShutdown.java:291)
        - waiting to re-lock in wait() <0x00000000aae2bf28> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"AWT-Windows" #12 daemon prio=6 os_prio=0 cpu=6484.38ms elapsed=445.66s tid=0x000000000db8e000 nid=0xe78 runnable  [0x000000001619e000]
   java.lang.Thread.State: RUNNABLE
        at sun.awt.windows.WToolkit.eventLoop(java.desktop@11.0.6/Native Method)
        at sun.awt.windows.WToolkit.run(java.desktop@11.0.6/WToolkit.java:305)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"AWT-EventQueue-0" #15 prio=6 os_prio=0 cpu=18000.00ms elapsed=445.16s tid=0x0000000016f94800 nid=0x26b4 waiting on condition  [0x000000001c7fe000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000aae1a548> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
        at java.awt.EventQueue.getNextEvent(java.desktop@11.0.6/EventQueue.java:566)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@11.0.6/EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@11.0.6/EventDispatchThread.java:124)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@11.0.6/EventDispatchThread.java:113)
        at java.awt.EventDispatchThread.pumpEvents(java.desktop@11.0.6/EventDispatchThread.java:109)
        at java.awt.EventDispatchThread.pumpEvents(java.desktop@11.0.6/EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.run(java.desktop@11.0.6/EventDispatchThread.java:90)

"Trident callback thread" #20 daemon prio=6 os_prio=0 cpu=250.00ms elapsed=444.42s tid=0x000000001d432800 nid=0x88c waiting on condition  [0x000000001cc7f000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000ab78b1e0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
        at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.6/LinkedBlockingQueue.java:433)
        at org.pushingpixels.trident.TimelineEngine$TimelineCallbackThread.run(TimelineEngine.java:196)

"Trident pulse source thread" #21 daemon prio=6 os_prio=0 cpu=93.75ms elapsed=444.42s tid=0x000000001d466800 nid=0xe1c waiting on condition  [0x000000001e98f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(java.base@11.0.6/Native Method)
        at org.pushingpixels.trident.TridentConfig$FixedRatePulseSource.waitUntilNextPulse(TridentConfig.java:67)
        at org.pushingpixels.trident.TimelineEngine$TridentAnimationThread.run(TimelineEngine.java:172)

"TimerQueue" #24 daemon prio=5 os_prio=0 cpu=15.63ms elapsed=444.29s tid=0x000000001d4fb000 nid=0x25cc waiting on condition  [0x000000001f10e000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000ab7d4360> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
        at java.util.concurrent.DelayQueue.take(java.base@11.0.6/DelayQueue.java:217)
        at javax.swing.TimerQueue.run(java.desktop@11.0.6/TimerQueue.java:171)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"D3D Screen Updater" #26 daemon prio=7 os_prio=1 cpu=546.88ms elapsed=444.10s tid=0x000000001d73e000 nid=0x189c in Object.wait()  [0x000000000e6ff000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at sun.java2d.d3d.D3DScreenUpdateManager.run(java.desktop@11.0.6/D3DScreenUpdateManager.java:423)
        - waiting to re-lock in wait() <0x00000000ab7afcf0> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"ForkJoinPool.commonPool-worker-3" #29 daemon prio=6 os_prio=0 cpu=116281.25ms elapsed=435.80s tid=0x000000001d73b000 nid=0x710 runnable  [0x000000001cb3e000]
   java.lang.Thread.State: RUNNABLE
        at java.io.FileDescriptor.close0(java.base@11.0.6/Native Method)
        at java.io.FileDescriptor.close(java.base@11.0.6/FileDescriptor.java:297)
        - locked <0x00000000a6660070> (a java.io.FileDescriptor)
        at java.io.FileInputStream$1.close(java.base@11.0.6/FileInputStream.java:375)
        at java.io.FileDescriptor.closeAll(java.base@11.0.6/FileDescriptor.java:355)
        - locked <0x00000000a6660070> (a java.io.FileDescriptor)
        at java.io.FileInputStream.close(java.base@11.0.6/FileInputStream.java:373)
        at games.strategy.engine.framework.GameDataManager.saveGame(GameDataManager.java:213)
        at games.strategy.engine.framework.GameDataUtils.lambda$cloneGameData$1(GameDataUtils.java:69)
        at games.strategy.engine.framework.GameDataUtils$$Lambda$1716/0x0000000022e8b100.accept(Unknown Source)
        at org.triplea.io.IoUtils.writeToMemory(IoUtils.java:73)
        at games.strategy.engine.framework.GameDataUtils.cloneGameData(GameDataUtils.java:68)
        at games.strategy.triplea.odds.calculator.BattleCalculator.<init>(BattleCalculator.java:41)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$createWorkers$3(ConcurrentBattleCalculator.java:168)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator$$Lambda$1869/0x000000002493c840.apply(Unknown Source)
        at java.util.stream.IntPipeline$1$1.accept(java.base@11.0.6/IntPipeline.java:180)
        at java.util.stream.IntPipeline$9$1.accept(java.base@11.0.6/IntPipeline.java:369)
        at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(java.base@11.0.6/Streams.java:104)
        at java.util.Spliterator$OfInt.forEachRemaining(java.base@11.0.6/Spliterator.java:699)
        at java.util.stream.AbstractPipeline.copyInto(java.base@11.0.6/AbstractPipeline.java:484)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(java.base@11.0.6/AbstractPipeline.java:474)
        at java.util.stream.ReduceOps$ReduceTask.doLeaf(java.base@11.0.6/ReduceOps.java:952)
        at java.util.stream.ReduceOps$ReduceTask.doLeaf(java.base@11.0.6/ReduceOps.java:926)
        at java.util.stream.AbstractTask.compute(java.base@11.0.6/AbstractTask.java:327)
        at java.util.concurrent.CountedCompleter.exec(java.base@11.0.6/CountedCompleter.java:746)
        at java.util.concurrent.ForkJoinTask.doExec(java.base@11.0.6/ForkJoinTask.java:290)
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.base@11.0.6/ForkJoinPool.java:1020)
        at java.util.concurrent.ForkJoinPool.scan(java.base@11.0.6/ForkJoinPool.java:1656)
        at java.util.concurrent.ForkJoinPool.runWorker(java.base@11.0.6/ForkJoinPool.java:1594)
        at java.util.concurrent.ForkJoinWorkerThread.run(java.base@11.0.6/ForkJoinWorkerThread.java:177)

"ForkJoinPool.commonPool-worker-5" #30 daemon prio=6 os_prio=0 cpu=115375.00ms elapsed=435.80s tid=0x000000001d73f000 nid=0x2550 in Object.wait()  [0x000000001ecce000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.util.concurrent.ForkJoinTask.internalWait(java.base@11.0.6/ForkJoinTask.java:311)
        - waiting to re-lock in wait() <0x00000000a6660448> (a java.util.stream.ReduceOps$ReduceTask)
        at java.util.concurrent.ForkJoinPool.awaitJoin(java.base@11.0.6/ForkJoinPool.java:1730)
        at java.util.concurrent.ForkJoinTask.doInvoke(java.base@11.0.6/ForkJoinTask.java:411)
        at java.util.concurrent.ForkJoinTask.invoke(java.base@11.0.6/ForkJoinTask.java:736)
        at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(java.base@11.0.6/ReduceOps.java:919)
        at java.util.stream.AbstractPipeline.evaluate(java.base@11.0.6/AbstractPipeline.java:233)
        at java.util.stream.ReferencePipeline.collect(java.base@11.0.6/ReferencePipeline.java:578)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.createWorkers(ConcurrentBattleCalculator.java:169)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$setGameData$0(ConcurrentBattleCalculator.java:84)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator$$Lambda$1863/0x00000000249388a8.run(Unknown Source)
        at java.util.concurrent.CompletableFuture$AsyncRun.run(java.base@11.0.6/CompletableFuture.java:1736)
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(java.base@11.0.6/CompletableFuture.java:1728)
        at java.util.concurrent.ForkJoinTask.doExec(java.base@11.0.6/ForkJoinTask.java:290)
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.base@11.0.6/ForkJoinPool.java:1020)
        at java.util.concurrent.ForkJoinPool.scan(java.base@11.0.6/ForkJoinPool.java:1656)
        at java.util.concurrent.ForkJoinPool.runWorker(java.base@11.0.6/ForkJoinPool.java:1594)
        at java.util.concurrent.ForkJoinWorkerThread.run(java.base@11.0.6/ForkJoinWorkerThread.java:177)

"ForkJoinPool.commonPool-worker-7" #31 daemon prio=6 os_prio=0 cpu=116906.25ms elapsed=435.80s tid=0x000000001d740000 nid=0x15f0 runnable  [0x0000000021e4e000]
   java.lang.Thread.State: RUNNABLE
        at java.io.FileDescriptor.close0(java.base@11.0.6/Native Method)
        at java.io.FileDescriptor.close(java.base@11.0.6/FileDescriptor.java:297)
        - locked <0x00000000a6660548> (a java.io.FileDescriptor)
        at java.io.FileInputStream$1.close(java.base@11.0.6/FileInputStream.java:375)
        at java.io.FileDescriptor.closeAll(java.base@11.0.6/FileDescriptor.java:355)
        - locked <0x00000000a6660548> (a java.io.FileDescriptor)
        at java.io.FileInputStream.close(java.base@11.0.6/FileInputStream.java:373)
        at games.strategy.engine.framework.GameDataManager.saveGame(GameDataManager.java:213)
        at games.strategy.engine.framework.GameDataUtils.lambda$cloneGameData$1(GameDataUtils.java:69)
        at games.strategy.engine.framework.GameDataUtils$$Lambda$1716/0x0000000022e8b100.accept(Unknown Source)
        at org.triplea.io.IoUtils.writeToMemory(IoUtils.java:73)
        at games.strategy.engine.framework.GameDataUtils.cloneGameData(GameDataUtils.java:68)
        at games.strategy.triplea.odds.calculator.BattleCalculator.<init>(BattleCalculator.java:41)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$createWorkers$3(ConcurrentBattleCalculator.java:168)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator$$Lambda$1869/0x000000002493c840.apply(Unknown Source)
        at java.util.stream.IntPipeline$1$1.accept(java.base@11.0.6/IntPipeline.java:180)
        at java.util.stream.IntPipeline$9$1.accept(java.base@11.0.6/IntPipeline.java:369)
        at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(java.base@11.0.6/Streams.java:104)
        at java.util.Spliterator$OfInt.forEachRemaining(java.base@11.0.6/Spliterator.java:699)
        at java.util.stream.AbstractPipeline.copyInto(java.base@11.0.6/AbstractPipeline.java:484)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(java.base@11.0.6/AbstractPipeline.java:474)
        at java.util.stream.ReduceOps$ReduceTask.doLeaf(java.base@11.0.6/ReduceOps.java:952)
        at java.util.stream.ReduceOps$ReduceTask.doLeaf(java.base@11.0.6/ReduceOps.java:926)
        at java.util.stream.AbstractTask.compute(java.base@11.0.6/AbstractTask.java:327)
        at java.util.concurrent.CountedCompleter.exec(java.base@11.0.6/CountedCompleter.java:746)
        at java.util.concurrent.ForkJoinTask.doExec(java.base@11.0.6/ForkJoinTask.java:290)
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.base@11.0.6/ForkJoinPool.java:1020)
        at java.util.concurrent.ForkJoinPool.scan(java.base@11.0.6/ForkJoinPool.java:1656)
        at java.util.concurrent.ForkJoinPool.runWorker(java.base@11.0.6/ForkJoinPool.java:1594)
        at java.util.concurrent.ForkJoinWorkerThread.run(java.base@11.0.6/ForkJoinWorkerThread.java:177)

"Java Sound Event Dispatcher" #35 daemon prio=6 os_prio=0 cpu=0.00ms elapsed=435.71s tid=0x000000000d8cc800 nid=0x1e74 in Object.wait()  [0x000000002280f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.Object.wait(java.base@11.0.6/Object.java:328)
        at com.sun.media.sound.EventDispatcher.dispatchEvents(java.desktop@11.0.6/EventDispatcher.java:174)
        - waiting to re-lock in wait() <0x00000000ab99d350> (a com.sun.media.sound.EventDispatcher)
        at com.sun.media.sound.EventDispatcher.run(java.desktop@11.0.6/EventDispatcher.java:213)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"Thread-10" #38 prio=6 os_prio=0 cpu=167640.63ms elapsed=435.49s tid=0x000000000d8c9000 nid=0xfe8 waiting on condition  [0x000000002294e000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000ab885d88> (a org.triplea.java.concurrency.CountUpAndDownLatch$Sync)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(java.base@11.0.6/AbstractQueuedSynchronizer.java:885)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(java.base@11.0.6/AbstractQueuedSynchronizer.java:1039)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base@11.0.6/AbstractQueuedSynchronizer.java:1345)
        at org.triplea.java.concurrency.CountUpAndDownLatch.await(CountUpAndDownLatch.java:35)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.awaitLatch(ConcurrentBattleCalculator.java:198)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.calculate(ConcurrentBattleCalculator.java:221)
        - locked <0x00000000ab885e10> (a java.lang.Object)
        at games.strategy.triplea.ai.pro.util.ProOddsCalculator.callBattleCalc(ProOddsCalculator.java:224)
        at games.strategy.triplea.ai.pro.util.ProOddsCalculator.callBattleCalc(ProOddsCalculator.java:200)
        at games.strategy.triplea.ai.pro.util.ProOddsCalculator.calculateBattleResults(ProOddsCalculator.java:133)
        at games.strategy.triplea.ai.pro.util.ProOddsCalculator.calculateBattleResults(ProOddsCalculator.java:116)
        at games.strategy.triplea.ai.pro.ProNonCombatMoveAi.determineIfMoveTerritoriesCanBeHeld(ProNonCombatMoveAi.java:455)
        at games.strategy.triplea.ai.pro.ProNonCombatMoveAi.doNonCombatMove(ProNonCombatMoveAi.java:98)
        at games.strategy.triplea.ai.pro.AbstractProAi.move(AbstractProAi.java:135)
        at games.strategy.triplea.ai.AbstractAi.start(AbstractAi.java:514)
        at games.strategy.engine.framework.ServerGame.waitForPlayerToFinishStep(ServerGame.java:537)
        at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:407)
        at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:297)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:82)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher.lambda$launch$0(LocalLauncher.java:56)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher$$Lambda$1578/0x0000000022d5dca8.run(Unknown Source)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"Thread-588" #926 prio=6 os_prio=0 cpu=78.13ms elapsed=188.97s tid=0x000000000d8ca800 nid=0x16d0 waiting on condition  [0x000000000eb6f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(java.base@11.0.6/Native Method)
        at org.triplea.java.Interruptibles.lambda$sleep$1(Interruptibles.java:108)
        at org.triplea.java.Interruptibles$$Lambda$2302/0x000000001fe94040.run(Unknown Source)
        at org.triplea.java.Interruptibles.lambda$await$0(Interruptibles.java:41)
        at org.triplea.java.Interruptibles$$Lambda$187/0x000000001c49d840.get(Unknown Source)
        at org.triplea.java.Interruptibles.awaitResult(Interruptibles.java:78)
        at org.triplea.java.Interruptibles.await(Interruptibles.java:39)
        at org.triplea.java.Interruptibles.sleep(Interruptibles.java:108)
        at games.strategy.triplea.ui.panels.map.MapPanel$3.lambda$mousePressed$0(MapPanel.java:254)
        at games.strategy.triplea.ui.panels.map.MapPanel$3$$Lambda$2431/0x000000001ffc84a8.run(Unknown Source)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"VM Thread" os_prio=2 cpu=4281.25ms elapsed=445.93s tid=0x000000000cc75800 nid=0x5c0 runnable

"VM Periodic Task Thread" os_prio=2 cpu=15.63ms elapsed=445.87s tid=0x000000000cdc9000 nid=0x1bb0 waiting on condition  

JNI global refs: 120, weak refs: 4850
DanVanAtta commented 3 years ago

nice work @zlefin! Finding how/why those threads are locked up will be a challenge, but it's a solid starting point

zlefin commented 3 years ago

I did some more testing: The bug still occurs even if I fully close and open a new instance of triplea between each test game.

This time, once I got the crash, it was so severe I couldn't even get task manager to open. ctrl-alt-delete just didn't do anything; nor could I open up my desktop nor the start menu. Oddly, other applications that were already open still worked fine (darkest dungeon and a web browser), and I could switch back and forth between them.

DanVanAtta commented 3 years ago

@trevan if you can, I could use help with this. From the stack trace it looks like there is an interaction with the AI battle calculation and EDT thread.

@zlefin I'm not sure if there will be bandwidth to fix this. I suspect this likely was always a problem and some other innocuous change made it more likely to happen.

trevan commented 3 years ago

@DanVanAtta I'll see what I can find.

zlefin commented 3 years ago

Fine if it doesnt' get fixed, so many things to do. The bug only seems to occur with hard AI; it never happened when I used Easy AI or Fast AI, though due to infrequency it's hard to be 100% sure.

Made another stack trace, this time on the Warcraft War Heroes map.

2021-03-07 21:43:46
Full thread dump OpenJDK 64-Bit Client VM (11.0.6+10 mixed mode):

Threads class SMR info:
_java_thread_list=0x000000001ebb7e50, length=29, elements={
0x0000000003d7d000, 0x000000000d4eb000, 0x000000000d4f1000, 0x000000000d548000,
0x000000000d549000, 0x000000000d54e000, 0x000000000d559000, 0x000000000d632800,
0x000000000e15b000, 0x000000000e3ef800, 0x000000000e41e800, 0x00000000177a7800,
0x00000000177d5000, 0x0000000017b45800, 0x000000000e26d000, 0x000000001e1c4800,
0x000000001e1bf800, 0x000000001e1c0000, 0x000000001e638000, 0x000000001e637800,
0x000000001e639000, 0x000000001e635800, 0x000000001e641000, 0x000000001e63a800,
0x000000001e63b800, 0x000000001e63a000, 0x000000001e63c800, 0x000000001e636800,
0x000000001e63f800
}

"main" #1 prio=5 os_prio=0 cpu=1000.00ms elapsed=1819.44s tid=0x0000000003d7d000 nid=0xdbc waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Reference Handler" #2 daemon prio=10 os_prio=2 cpu=15.63ms elapsed=1819.07s tid=0x000000000d4eb000 nid=0x28d8 waiting on condition  [0x000000000d77f000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.6/Native Method)
        at java.lang.ref.Reference.processPendingReferences(java.base@11.0.6/Reference.java:241)
        at java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.6/Reference.java:213)

"Finalizer" #3 daemon prio=8 os_prio=1 cpu=0.00ms elapsed=1819.07s tid=0x000000000d4f1000 nid=0x1db0 in Object.wait()  [0x000000000d8be000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:155)
        - waiting to re-lock in wait() <0x00000000aaaad198> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:176)
        at java.lang.ref.Finalizer$FinalizerThread.run(java.base@11.0.6/Finalizer.java:170)

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=1818.82s tid=0x000000000d548000 nid=0x22f8 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 cpu=0.00ms elapsed=1818.82s tid=0x000000000d549000 nid=0x29bc waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread0" #6 daemon prio=9 os_prio=2 cpu=10390.63ms elapsed=1818.82s tid=0x000000000d54e000 nid=0x2a2c waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #7 daemon prio=9 os_prio=2 cpu=8078.13ms elapsed=1818.82s tid=0x000000000d559000 nid=0xf88 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #8 daemon prio=9 os_prio=0 cpu=0.00ms elapsed=1818.63s tid=0x000000000d632800 nid=0x2598 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #9 daemon prio=8 os_prio=1 cpu=62.50ms elapsed=1818.49s tid=0x000000000e15b000 nid=0x23f8 in Object.wait()  [0x000000000f52e000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:155)
        - waiting to re-lock in wait() <0x00000000aab48c28> (a java.lang.ref.ReferenceQueue$Lock)
        at jdk.internal.ref.CleanerImpl.run(java.base@11.0.6/CleanerImpl.java:148)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)
        at jdk.internal.misc.InnocuousThread.run(java.base@11.0.6/InnocuousThread.java:134)

"Java2D Disposer" #10 daemon prio=10 os_prio=2 cpu=125.00ms elapsed=1817.08s tid=0x000000000e3ef800 nid=0x2658 in Object.wait()  [0x000000001658f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:155)
        - waiting to re-lock in wait() <0x00000000aadce4c0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.6/ReferenceQueue.java:176)
        at sun.java2d.Disposer.run(java.desktop@11.0.6/Disposer.java:144)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"AWT-Windows" #12 daemon prio=6 os_prio=0 cpu=14234.38ms elapsed=1816.89s tid=0x000000000e41e800 nid=0x27b8 runnable  [0x0000000016a0f000]
   java.lang.Thread.State: RUNNABLE
        at sun.awt.windows.WToolkit.eventLoop(java.desktop@11.0.6/Native Method)
        at sun.awt.windows.WToolkit.run(java.desktop@11.0.6/WToolkit.java:305)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"AWT-Shutdown" #16 prio=5 os_prio=0 cpu=0.00ms elapsed=1813.83s tid=0x00000000177a7800 nid=0x2684 in Object.wait()  [0x00000000168cf000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.Object.wait(java.base@11.0.6/Object.java:328)
        at sun.awt.AWTAutoShutdown.run(java.desktop@11.0.6/AWTAutoShutdown.java:291)
        - waiting to re-lock in wait() <0x00000000aae057c8> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"AWT-EventQueue-0" #15 prio=6 os_prio=0 cpu=39296.88ms elapsed=1813.83s tid=0x00000000177d5000 nid=0x23d0 runnable  [0x000000001d11a000]
   java.lang.Thread.State: RUNNABLE
        at java.io.FileDescriptor.close0(java.base@11.0.6/Native Method)
        at java.io.FileDescriptor.close(java.base@11.0.6/FileDescriptor.java:297)
        - locked <0x000000008bba5ef0> (a java.io.FileDescriptor)
        at java.io.FileOutputStream$1.close(java.base@11.0.6/FileOutputStream.java:398)
        at java.io.FileDescriptor.closeAll(java.base@11.0.6/FileDescriptor.java:355)
        - locked <0x000000008bba5ef0> (a java.io.FileDescriptor)
        at java.io.FileOutputStream.close(java.base@11.0.6/FileOutputStream.java:396)
        at java.io.FilterOutputStream.close(java.base@11.0.6/FilterOutputStream.java:188)
        at java.util.zip.DeflaterOutputStream.close(java.base@11.0.6/DeflaterOutputStream.java:241)
        at java.io.ObjectOutputStream$BlockDataOutputStream.close(java.base@11.0.6/ObjectOutputStream.java:1834)
        at java.io.ObjectOutputStream.close(java.base@11.0.6/ObjectOutputStream.java:745)
        at games.strategy.engine.framework.GameDataManager.saveGame(GameDataManager.java:207)
        at games.strategy.engine.framework.GameDataUtils.lambda$cloneGameData$1(GameDataUtils.java:69)
        at games.strategy.engine.framework.GameDataUtils$$Lambda$2139/0x000000002233d100.accept(Unknown Source)
        at org.triplea.io.IoUtils.writeToMemory(IoUtils.java:73)
        at games.strategy.engine.framework.GameDataUtils.cloneGameData(GameDataUtils.java:68)
        at games.strategy.engine.framework.GameDataUtils.cloneGameData(GameDataUtils.java:57)
        at games.strategy.triplea.ui.TripleAFrame.showHistory(TripleAFrame.java:2021)
        at games.strategy.triplea.ui.TripleAFrame.lambda$new$0(TripleAFrame.java:380)
        at games.strategy.triplea.ui.TripleAFrame$$Lambda$1952/0x000000001a45a058.actionPerformed(Unknown Source)
        at org.triplea.swing.SwingAction$1.actionPerformed(SwingAction.java:60)
        at javax.swing.AbstractButton.fireActionPerformed(java.desktop@11.0.6/AbstractButton.java:1967)
        at javax.swing.AbstractButton$Handler.actionPerformed(java.desktop@11.0.6/AbstractButton.java:2308)
        at javax.swing.DefaultButtonModel.fireActionPerformed(java.desktop@11.0.6/DefaultButtonModel.java:405)
        at javax.swing.DefaultButtonModel.setPressed(java.desktop@11.0.6/DefaultButtonModel.java:262)
        at javax.swing.AbstractButton.doClick(java.desktop@11.0.6/AbstractButton.java:369)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(java.desktop@11.0.6/BasicMenuItemUI.java:1020)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(java.desktop@11.0.6/BasicMenuItemUI.java:1064)
        at java.awt.AWTEventMulticaster.mouseReleased(java.desktop@11.0.6/AWTEventMulticaster.java:297)
        at java.awt.Component.processMouseEvent(java.desktop@11.0.6/Component.java:6632)
        at javax.swing.JComponent.processMouseEvent(java.desktop@11.0.6/JComponent.java:3342)
        at java.awt.Component.processEvent(java.desktop@11.0.6/Component.java:6397)
        at java.awt.Container.processEvent(java.desktop@11.0.6/Container.java:2263)
        at java.awt.Component.dispatchEventImpl(java.desktop@11.0.6/Component.java:5008)
        at java.awt.Container.dispatchEventImpl(java.desktop@11.0.6/Container.java:2321)
        at java.awt.Component.dispatchEvent(java.desktop@11.0.6/Component.java:4840)
        at java.awt.LightweightDispatcher.retargetMouseEvent(java.desktop@11.0.6/Container.java:4918)
        at java.awt.LightweightDispatcher.processMouseEvent(java.desktop@11.0.6/Container.java:4547)
        at java.awt.LightweightDispatcher.dispatchEvent(java.desktop@11.0.6/Container.java:4488)
        at java.awt.Container.dispatchEventImpl(java.desktop@11.0.6/Container.java:2307)
        at java.awt.Window.dispatchEventImpl(java.desktop@11.0.6/Window.java:2772)
        at java.awt.Component.dispatchEvent(java.desktop@11.0.6/Component.java:4840)
        at java.awt.EventQueue.dispatchEventImpl(java.desktop@11.0.6/EventQueue.java:772)
        at java.awt.EventQueue$4.run(java.desktop@11.0.6/EventQueue.java:721)
        at java.awt.EventQueue$4.run(java.desktop@11.0.6/EventQueue.java:715)
        at java.security.AccessController.doPrivileged(java.base@11.0.6/Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@11.0.6/ProtectionDomain.java:85)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@11.0.6/ProtectionDomain.java:95)
        at java.awt.EventQueue$5.run(java.desktop@11.0.6/EventQueue.java:745)
        at java.awt.EventQueue$5.run(java.desktop@11.0.6/EventQueue.java:743)
        at java.security.AccessController.doPrivileged(java.base@11.0.6/Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@11.0.6/ProtectionDomain.java:85)
        at java.awt.EventQueue.dispatchEvent(java.desktop@11.0.6/EventQueue.java:742)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@11.0.6/EventDispatchThread.java:203)
        at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@11.0.6/EventDispatchThread.java:124)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@11.0.6/EventDispatchThread.java:113)
        at java.awt.EventDispatchThread.pumpEvents(java.desktop@11.0.6/EventDispatchThread.java:109)
        at java.awt.EventDispatchThread.pumpEvents(java.desktop@11.0.6/EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.run(java.desktop@11.0.6/EventDispatchThread.java:90)

"Trident callback thread" #21 daemon prio=6 os_prio=0 cpu=296.88ms elapsed=1804.97s tid=0x0000000017b45800 nid=0x19ec waiting on condition  [0x000000001f2af000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000ab669418> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
        at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.6/LinkedBlockingQueue.java:433)
        at org.pushingpixels.trident.TimelineEngine$TimelineCallbackThread.run(TimelineEngine.java:196)

"Trident pulse source thread" #22 daemon prio=6 os_prio=0 cpu=203.13ms elapsed=1804.93s tid=0x000000000e26d000 nid=0x12fc waiting on condition  [0x000000001f3ee000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(java.base@11.0.6/Native Method)
        at org.pushingpixels.trident.TridentConfig$FixedRatePulseSource.waitUntilNextPulse(TridentConfig.java:67)
        at org.pushingpixels.trident.TimelineEngine$TridentAnimationThread.run(TimelineEngine.java:172)

"D3D Screen Updater" #25 daemon prio=7 os_prio=1 cpu=1015.63ms elapsed=1803.26s tid=0x000000001e1c4800 nid=0x29c0 in Object.wait()  [0x000000000ec2f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at sun.java2d.d3d.D3DScreenUpdateManager.run(java.desktop@11.0.6/D3DScreenUpdateManager.java:423)
        - waiting to re-lock in wait() <0x00000000ab68ac28> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"TimerQueue" #27 daemon prio=5 os_prio=0 cpu=156.25ms elapsed=1797.75s tid=0x000000001e1bf800 nid=0x1910 waiting on condition  [0x000000000f27e000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000ab92f2a0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
        at java.util.concurrent.DelayQueue.take(java.base@11.0.6/DelayQueue.java:217)
        at javax.swing.TimerQueue.run(java.desktop@11.0.6/TimerQueue.java:171)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"SwingWorker-pool-1-thread-1" #28 daemon prio=5 os_prio=0 cpu=0.00ms elapsed=1786.38s tid=0x000000001e1c0000 nid=0x26e4 waiting on condition  [0x0000000016c3e000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000ab92f4e0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
        at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.6/LinkedBlockingQueue.java:433)
        at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.6/ThreadPoolExecutor.java:1054)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1114)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"SwingWorker-pool-1-thread-2" #35 daemon prio=5 os_prio=0 cpu=3453.13ms elapsed=1776.18s tid=0x000000001e638000 nid=0x28cc waiting on condition  [0x000000001f52e000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000ab92f4e0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.6/AbstractQueuedSynchronizer.java:2081)
        at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.6/LinkedBlockingQueue.java:433)
        at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.6/ThreadPoolExecutor.java:1054)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1114)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"ForkJoinPool.commonPool-worker-3" #38 daemon prio=6 os_prio=0 cpu=215703.13ms elapsed=1712.57s tid=0x000000001e637800 nid=0x18d8 waiting on condition  [0x000000002183e000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.6/Native Method)
        - parking to wait for  <0x00000000b0a15a18> (a java.util.concurrent.ForkJoinPool)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.6/LockSupport.java:194)
        at java.util.concurrent.ForkJoinPool.runWorker(java.base@11.0.6/ForkJoinPool.java:1628)
        at java.util.concurrent.ForkJoinWorkerThread.run(java.base@11.0.6/ForkJoinWorkerThread.java:177)

"ForkJoinPool.commonPool-worker-5" #39 daemon prio=6 os_prio=0 cpu=302765.63ms elapsed=1712.57s tid=0x000000001e639000 nid=0xc80 runnable  [0x000000002197e000]
   java.lang.Thread.State: RUNNABLE
        at java.io.FileDescriptor.close0(java.base@11.0.6/Native Method)
        at java.io.FileDescriptor.close(java.base@11.0.6/FileDescriptor.java:297)
        - locked <0x00000000e5482e48> (a java.io.FileDescriptor)
        at java.io.FileInputStream$1.close(java.base@11.0.6/FileInputStream.java:375)
        at java.io.FileDescriptor.closeAll(java.base@11.0.6/FileDescriptor.java:355)
        - locked <0x00000000e5482e48> (a java.io.FileDescriptor)
        at java.io.FileInputStream.close(java.base@11.0.6/FileInputStream.java:373)
        at games.strategy.engine.framework.GameDataManager.saveGame(GameDataManager.java:213)
        at games.strategy.engine.framework.GameDataUtils.lambda$cloneGameData$1(GameDataUtils.java:69)
        at games.strategy.engine.framework.GameDataUtils$$Lambda$2139/0x000000002233d100.accept(Unknown Source)
        at org.triplea.io.IoUtils.writeToMemory(IoUtils.java:73)
        at games.strategy.engine.framework.GameDataUtils.cloneGameData(GameDataUtils.java:68)
        at games.strategy.triplea.odds.calculator.BattleCalculator.<init>(BattleCalculator.java:41)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$createWorkers$3(ConcurrentBattleCalculator.java:168)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator$$Lambda$2634/0x000000001a44a040.apply(Unknown Source)
        at java.util.stream.IntPipeline$1$1.accept(java.base@11.0.6/IntPipeline.java:180)
        at java.util.stream.IntPipeline$9$1.accept(java.base@11.0.6/IntPipeline.java:369)
        at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(java.base@11.0.6/Streams.java:104)
        at java.util.Spliterator$OfInt.forEachRemaining(java.base@11.0.6/Spliterator.java:699)
        at java.util.stream.AbstractPipeline.copyInto(java.base@11.0.6/AbstractPipeline.java:484)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(java.base@11.0.6/AbstractPipeline.java:474)
        at java.util.stream.ReduceOps$ReduceTask.doLeaf(java.base@11.0.6/ReduceOps.java:952)
        at java.util.stream.ReduceOps$ReduceTask.doLeaf(java.base@11.0.6/ReduceOps.java:926)
        at java.util.stream.AbstractTask.compute(java.base@11.0.6/AbstractTask.java:327)
        at java.util.concurrent.CountedCompleter.exec(java.base@11.0.6/CountedCompleter.java:746)
        at java.util.concurrent.ForkJoinTask.doExec(java.base@11.0.6/ForkJoinTask.java:290)
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.base@11.0.6/ForkJoinPool.java:1020)
        at java.util.concurrent.ForkJoinPool.scan(java.base@11.0.6/ForkJoinPool.java:1656)
        at java.util.concurrent.ForkJoinPool.runWorker(java.base@11.0.6/ForkJoinPool.java:1594)
        at java.util.concurrent.ForkJoinWorkerThread.run(java.base@11.0.6/ForkJoinWorkerThread.java:177)

"ForkJoinPool.commonPool-worker-7" #40 daemon prio=6 os_prio=0 cpu=203578.13ms elapsed=1712.57s tid=0x000000001e635800 nid=0x190c runnable  [0x0000000021abe000]
   java.lang.Thread.State: RUNNABLE
        at java.io.FileDescriptor.close0(java.base@11.0.6/Native Method)
        at java.io.FileDescriptor.close(java.base@11.0.6/FileDescriptor.java:297)
        - locked <0x00000000e5489050> (a java.io.FileDescriptor)
        at java.io.FileInputStream$1.close(java.base@11.0.6/FileInputStream.java:375)
        at java.io.FileDescriptor.closeAll(java.base@11.0.6/FileDescriptor.java:355)
        - locked <0x00000000e5489050> (a java.io.FileDescriptor)
        at java.io.FileInputStream.close(java.base@11.0.6/FileInputStream.java:373)
        at games.strategy.engine.framework.GameDataManager.saveGame(GameDataManager.java:213)
        at games.strategy.engine.framework.GameDataUtils.lambda$cloneGameData$1(GameDataUtils.java:69)
        at games.strategy.engine.framework.GameDataUtils$$Lambda$2139/0x000000002233d100.accept(Unknown Source)
        at org.triplea.io.IoUtils.writeToMemory(IoUtils.java:73)
        at games.strategy.engine.framework.GameDataUtils.cloneGameData(GameDataUtils.java:68)
        at games.strategy.triplea.odds.calculator.BattleCalculator.<init>(BattleCalculator.java:41)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$createWorkers$3(ConcurrentBattleCalculator.java:168)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator$$Lambda$2634/0x000000001a44a040.apply(Unknown Source)
        at java.util.stream.IntPipeline$1$1.accept(java.base@11.0.6/IntPipeline.java:180)
        at java.util.stream.IntPipeline$9$1.accept(java.base@11.0.6/IntPipeline.java:369)
        at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(java.base@11.0.6/Streams.java:104)
        at java.util.Spliterator$OfInt.forEachRemaining(java.base@11.0.6/Spliterator.java:699)
        at java.util.stream.AbstractPipeline.copyInto(java.base@11.0.6/AbstractPipeline.java:484)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(java.base@11.0.6/AbstractPipeline.java:474)
        at java.util.stream.ReduceOps$ReduceTask.doLeaf(java.base@11.0.6/ReduceOps.java:952)
        at java.util.stream.ReduceOps$ReduceTask.doLeaf(java.base@11.0.6/ReduceOps.java:926)
        at java.util.stream.AbstractTask.compute(java.base@11.0.6/AbstractTask.java:327)
        at java.util.concurrent.CountedCompleter.exec(java.base@11.0.6/CountedCompleter.java:746)
        at java.util.concurrent.ForkJoinTask.doExec(java.base@11.0.6/ForkJoinTask.java:290)
        at java.util.concurrent.ForkJoinTask.doInvoke(java.base@11.0.6/ForkJoinTask.java:408)
        at java.util.concurrent.ForkJoinTask.invoke(java.base@11.0.6/ForkJoinTask.java:736)
        at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(java.base@11.0.6/ReduceOps.java:919)
        at java.util.stream.AbstractPipeline.evaluate(java.base@11.0.6/AbstractPipeline.java:233)
        at java.util.stream.ReferencePipeline.collect(java.base@11.0.6/ReferencePipeline.java:578)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.createWorkers(ConcurrentBattleCalculator.java:169)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator.lambda$setGameData$0(ConcurrentBattleCalculator.java:84)
        at games.strategy.triplea.odds.calculator.ConcurrentBattleCalculator$$Lambda$2622/0x00000000228630a8.run(Unknown Source)
        at java.util.concurrent.CompletableFuture$AsyncRun.run(java.base@11.0.6/CompletableFuture.java:1736)
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(java.base@11.0.6/CompletableFuture.java:1728)
        at java.util.concurrent.ForkJoinTask.doExec(java.base@11.0.6/ForkJoinTask.java:290)
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(java.base@11.0.6/ForkJoinPool.java:1020)
        at java.util.concurrent.ForkJoinPool.scan(java.base@11.0.6/ForkJoinPool.java:1656)
        at java.util.concurrent.ForkJoinPool.runWorker(java.base@11.0.6/ForkJoinPool.java:1594)
        at java.util.concurrent.ForkJoinWorkerThread.run(java.base@11.0.6/ForkJoinWorkerThread.java:177)

"Java Sound Event Dispatcher" #44 daemon prio=6 os_prio=0 cpu=78.13ms elapsed=1711.53s tid=0x000000001e641000 nid=0xff8 in Object.wait()  [0x00000000221cf000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.6/Native Method)
        - waiting on <no object reference available>
        at java.lang.Object.wait(java.base@11.0.6/Object.java:328)
        at com.sun.media.sound.EventDispatcher.dispatchEvents(java.desktop@11.0.6/EventDispatcher.java:174)
        - waiting to re-lock in wait() <0x00000000b0a16468> (a com.sun.media.sound.EventDispatcher)
        at com.sun.media.sound.EventDispatcher.run(java.desktop@11.0.6/EventDispatcher.java:213)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"Thread-10" #54 prio=6 os_prio=0 cpu=588390.63ms elapsed=1705.98s tid=0x000000001e63a800 nid=0x29d4 runnable  [0x0000000022f0e000]
   java.lang.Thread.State: RUNNABLE
        at java.io.FileDescriptor.close0(java.base@11.0.6/Native Method)
        at java.io.FileDescriptor.close(java.base@11.0.6/FileDescriptor.java:297)
        - locked <0x00000000e46e55c0> (a java.io.FileDescriptor)
        at java.io.FileOutputStream$1.close(java.base@11.0.6/FileOutputStream.java:398)
        at java.io.FileDescriptor.closeAll(java.base@11.0.6/FileDescriptor.java:355)
        - locked <0x00000000e46e55c0> (a java.io.FileDescriptor)
        at java.io.FileOutputStream.close(java.base@11.0.6/FileOutputStream.java:396)
        at java.io.FilterOutputStream.close(java.base@11.0.6/FilterOutputStream.java:188)
        at java.util.zip.DeflaterOutputStream.close(java.base@11.0.6/DeflaterOutputStream.java:241)
        at java.io.ObjectOutputStream$BlockDataOutputStream.close(java.base@11.0.6/ObjectOutputStream.java:1834)
        at java.io.ObjectOutputStream.close(java.base@11.0.6/ObjectOutputStream.java:745)
        at games.strategy.engine.framework.GameDataManager.saveGame(GameDataManager.java:207)
        at games.strategy.engine.framework.GameDataManager.saveGame(GameDataManager.java:177)
        at games.strategy.engine.framework.save.game.GameDataWriter.writeToOutputStream(GameDataWriter.java:68)
        at games.strategy.engine.framework.save.game.GameDataWriter.writeToFile(GameDataWriter.java:38)
        at games.strategy.engine.framework.ServerGame.saveGame(ServerGame.java:380)
        at games.strategy.engine.framework.ServerGame.autoSaveAfter(ServerGame.java:441)
        at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:421)
        at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:297)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:82)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher.lambda$launch$0(LocalLauncher.java:56)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher$$Lambda$2251/0x000000002283d0a8.run(Unknown Source)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"pool-4-thread-487" #1672 prio=5 os_prio=0 cpu=0.00ms elapsed=238.45s tid=0x000000001e63b800 nid=0x6d4 runnable  [0x000000001a42d000]
   java.lang.Thread.State: RUNNABLE
        at java.io.RandomAccessFile.read0(java.base@11.0.6/Native Method)
        at java.io.RandomAccessFile.read(java.base@11.0.6/RandomAccessFile.java:366)
        at javax.imageio.stream.FileCacheImageInputStream.read(java.desktop@11.0.6/FileCacheImageInputStream.java:166)
        at javax.imageio.stream.ImageInputStreamImpl.readByte(java.desktop@11.0.6/ImageInputStreamImpl.java:212)
        at com.sun.imageio.plugins.wbmp.WBMPImageReaderSpi.canDecodeInput(java.desktop@11.0.6/WBMPImageReaderSpi.java:89)
        at javax.imageio.ImageIO$CanDecodeInputFilter.filter(java.desktop@11.0.6/ImageIO.java:571)
        at javax.imageio.spi.FilterIterator.advance(java.desktop@11.0.6/ServiceRegistry.java:876)
        at javax.imageio.spi.FilterIterator.<init>(java.desktop@11.0.6/ServiceRegistry.java:870)
        at javax.imageio.spi.ServiceRegistry.getServiceProviders(java.desktop@11.0.6/ServiceRegistry.java:518)
        at javax.imageio.ImageIO.getImageReaders(java.desktop@11.0.6/ImageIO.java:652)
        at javax.imageio.ImageIO.read(java.desktop@11.0.6/ImageIO.java:1458)
        at javax.imageio.ImageIO.read(java.desktop@11.0.6/ImageIO.java:1420)
        at games.strategy.triplea.image.TileImageFactory.loadUnblendedImage(TileImageFactory.java:255)
        at games.strategy.triplea.image.TileImageFactory.loadImage(TileImageFactory.java:189)
        at games.strategy.triplea.image.TileImageFactory.getImage(TileImageFactory.java:160)
        at games.strategy.triplea.image.TileImageFactory.getBaseTile(TileImageFactory.java:137)
        at games.strategy.triplea.ui.screen.drawable.BaseMapDrawable.getImage(BaseMapDrawable.java:17)
        at games.strategy.triplea.ui.screen.drawable.MapTileDrawable.draw(MapTileDrawable.java:39)
        at games.strategy.triplea.ui.screen.Tile.draw(Tile.java:69)
        - locked <0x00000000b0d33898> (a java.lang.Object)
        at games.strategy.triplea.ui.screen.Tile.drawImage(Tile.java:54)
        at games.strategy.triplea.ui.panels.map.MapPanel.lambda$paint$7(MapPanel.java:742)
        at games.strategy.triplea.ui.panels.map.MapPanel$$Lambda$2255/0x000000002283b8a8.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1128)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"pool-4-thread-488" #1673 prio=5 os_prio=0 cpu=0.00ms elapsed=238.45s tid=0x000000001e63a000 nid=0x2a9c runnable  [0x0000000021bfe000]
   java.lang.Thread.State: RUNNABLE
        at java.io.RandomAccessFile.read0(java.base@11.0.6/Native Method)
        at java.io.RandomAccessFile.read(java.base@11.0.6/RandomAccessFile.java:366)
        at javax.imageio.stream.FileCacheImageInputStream.read(java.desktop@11.0.6/FileCacheImageInputStream.java:166)
        at javax.imageio.stream.ImageInputStreamImpl.readByte(java.desktop@11.0.6/ImageInputStreamImpl.java:212)
        at com.sun.imageio.plugins.wbmp.WBMPImageReaderSpi.canDecodeInput(java.desktop@11.0.6/WBMPImageReaderSpi.java:89)
        at javax.imageio.ImageIO$CanDecodeInputFilter.filter(java.desktop@11.0.6/ImageIO.java:571)
        at javax.imageio.spi.FilterIterator.advance(java.desktop@11.0.6/ServiceRegistry.java:876)
        at javax.imageio.spi.FilterIterator.<init>(java.desktop@11.0.6/ServiceRegistry.java:870)
        at javax.imageio.spi.ServiceRegistry.getServiceProviders(java.desktop@11.0.6/ServiceRegistry.java:518)
        at javax.imageio.ImageIO.getImageReaders(java.desktop@11.0.6/ImageIO.java:652)
        at javax.imageio.ImageIO.read(java.desktop@11.0.6/ImageIO.java:1458)
        at javax.imageio.ImageIO.read(java.desktop@11.0.6/ImageIO.java:1420)
        at games.strategy.triplea.image.TileImageFactory.loadUnblendedImage(TileImageFactory.java:255)
        at games.strategy.triplea.image.TileImageFactory.loadImage(TileImageFactory.java:189)
        at games.strategy.triplea.image.TileImageFactory.getImage(TileImageFactory.java:160)
        at games.strategy.triplea.image.TileImageFactory.getBaseTile(TileImageFactory.java:137)
        at games.strategy.triplea.ui.screen.drawable.BaseMapDrawable.getImage(BaseMapDrawable.java:17)
        at games.strategy.triplea.ui.screen.drawable.MapTileDrawable.draw(MapTileDrawable.java:39)
        at games.strategy.triplea.ui.screen.Tile.draw(Tile.java:69)
        - locked <0x00000000b0d1fab0> (a java.lang.Object)
        at games.strategy.triplea.ui.screen.Tile.drawImage(Tile.java:54)
        at games.strategy.triplea.ui.panels.map.MapPanel.lambda$paint$7(MapPanel.java:742)
        at games.strategy.triplea.ui.panels.map.MapPanel$$Lambda$2255/0x000000002283b8a8.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1128)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"pool-4-thread-489" #1674 prio=5 os_prio=0 cpu=15.63ms elapsed=238.45s tid=0x000000001e63c800 nid=0x2924 runnable  [0x000000002260e000]
   java.lang.Thread.State: RUNNABLE
        at java.io.RandomAccessFile.read0(java.base@11.0.6/Native Method)
        at java.io.RandomAccessFile.read(java.base@11.0.6/RandomAccessFile.java:366)
        at javax.imageio.stream.FileCacheImageInputStream.read(java.desktop@11.0.6/FileCacheImageInputStream.java:166)
        at javax.imageio.stream.ImageInputStreamImpl.readByte(java.desktop@11.0.6/ImageInputStreamImpl.java:212)
        at com.sun.imageio.plugins.wbmp.WBMPImageReaderSpi.canDecodeInput(java.desktop@11.0.6/WBMPImageReaderSpi.java:89)
        at javax.imageio.ImageIO$CanDecodeInputFilter.filter(java.desktop@11.0.6/ImageIO.java:571)
        at javax.imageio.spi.FilterIterator.advance(java.desktop@11.0.6/ServiceRegistry.java:876)
        at javax.imageio.spi.FilterIterator.<init>(java.desktop@11.0.6/ServiceRegistry.java:870)
        at javax.imageio.spi.ServiceRegistry.getServiceProviders(java.desktop@11.0.6/ServiceRegistry.java:518)
        at javax.imageio.ImageIO.getImageReaders(java.desktop@11.0.6/ImageIO.java:652)
        at javax.imageio.ImageIO.read(java.desktop@11.0.6/ImageIO.java:1458)
        at javax.imageio.ImageIO.read(java.desktop@11.0.6/ImageIO.java:1420)
        at games.strategy.triplea.image.TileImageFactory.loadUnblendedImage(TileImageFactory.java:255)
        at games.strategy.triplea.image.TileImageFactory.loadImage(TileImageFactory.java:189)
        at games.strategy.triplea.image.TileImageFactory.getImage(TileImageFactory.java:160)
        at games.strategy.triplea.image.TileImageFactory.getBaseTile(TileImageFactory.java:137)
        at games.strategy.triplea.ui.screen.drawable.BaseMapDrawable.getImage(BaseMapDrawable.java:17)
        at games.strategy.triplea.ui.screen.drawable.MapTileDrawable.draw(MapTileDrawable.java:39)
        at games.strategy.triplea.ui.screen.Tile.draw(Tile.java:69)
        - locked <0x00000000b0d24e38> (a java.lang.Object)
        at games.strategy.triplea.ui.screen.Tile.drawImage(Tile.java:54)
        at games.strategy.triplea.ui.panels.map.MapPanel.lambda$paint$7(MapPanel.java:742)
        at games.strategy.triplea.ui.panels.map.MapPanel$$Lambda$2255/0x000000002283b8a8.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1128)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"pool-4-thread-490" #1675 prio=5 os_prio=0 cpu=15.63ms elapsed=238.45s tid=0x000000001e636800 nid=0x2644 runnable  [0x0000000022d4d000]
   java.lang.Thread.State: RUNNABLE
        at java.io.RandomAccessFile.read0(java.base@11.0.6/Native Method)
        at java.io.RandomAccessFile.read(java.base@11.0.6/RandomAccessFile.java:366)
        at javax.imageio.stream.FileCacheImageInputStream.read(java.desktop@11.0.6/FileCacheImageInputStream.java:166)
        at javax.imageio.stream.ImageInputStreamImpl.readByte(java.desktop@11.0.6/ImageInputStreamImpl.java:212)
        at com.sun.imageio.plugins.wbmp.WBMPImageReaderSpi.canDecodeInput(java.desktop@11.0.6/WBMPImageReaderSpi.java:89)
        at javax.imageio.ImageIO$CanDecodeInputFilter.filter(java.desktop@11.0.6/ImageIO.java:571)
        at javax.imageio.spi.FilterIterator.advance(java.desktop@11.0.6/ServiceRegistry.java:876)
        at javax.imageio.spi.FilterIterator.<init>(java.desktop@11.0.6/ServiceRegistry.java:870)
        at javax.imageio.spi.ServiceRegistry.getServiceProviders(java.desktop@11.0.6/ServiceRegistry.java:518)
        at javax.imageio.ImageIO.getImageReaders(java.desktop@11.0.6/ImageIO.java:652)
        at javax.imageio.ImageIO.read(java.desktop@11.0.6/ImageIO.java:1458)
        at javax.imageio.ImageIO.read(java.desktop@11.0.6/ImageIO.java:1420)
        at games.strategy.triplea.image.TileImageFactory.loadUnblendedImage(TileImageFactory.java:255)
        at games.strategy.triplea.image.TileImageFactory.loadImage(TileImageFactory.java:189)
        at games.strategy.triplea.image.TileImageFactory.getImage(TileImageFactory.java:160)
        at games.strategy.triplea.image.TileImageFactory.getBaseTile(TileImageFactory.java:137)
        at games.strategy.triplea.ui.screen.drawable.BaseMapDrawable.getImage(BaseMapDrawable.java:17)
        at games.strategy.triplea.ui.screen.drawable.MapTileDrawable.draw(MapTileDrawable.java:39)
        at games.strategy.triplea.ui.screen.Tile.draw(Tile.java:69)
        - locked <0x00000000b0d24ce8> (a java.lang.Object)
        at games.strategy.triplea.ui.screen.Tile.drawImage(Tile.java:54)
        at games.strategy.triplea.ui.panels.map.MapPanel.lambda$paint$7(MapPanel.java:742)
        at games.strategy.triplea.ui.panels.map.MapPanel$$Lambda$2255/0x000000002283b8a8.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.6/ThreadPoolExecutor.java:1128)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.6/ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"Thread-939" #1676 prio=6 os_prio=0 cpu=0.00ms elapsed=237.88s tid=0x000000001e63f800 nid=0x15b4 waiting on condition  [0x00000000257cf000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(java.base@11.0.6/Native Method)
        at org.triplea.java.Interruptibles.lambda$sleep$1(Interruptibles.java:108)
        at org.triplea.java.Interruptibles$$Lambda$2573/0x0000000025607440.run(Unknown Source)
        at org.triplea.java.Interruptibles.lambda$await$0(Interruptibles.java:41)
        at org.triplea.java.Interruptibles$$Lambda$187/0x000000001cdbd840.get(Unknown Source)
        at org.triplea.java.Interruptibles.awaitResult(Interruptibles.java:78)
        at org.triplea.java.Interruptibles.await(Interruptibles.java:39)
        at org.triplea.java.Interruptibles.sleep(Interruptibles.java:108)
        at games.strategy.triplea.ui.panels.map.MapPanel$3.lambda$mousePressed$0(MapPanel.java:254)
        at games.strategy.triplea.ui.panels.map.MapPanel$3$$Lambda$3159/0x0000000022bacca8.run(Unknown Source)
        at java.lang.Thread.run(java.base@11.0.6/Thread.java:834)

"VM Thread" os_prio=2 cpu=87046.88ms elapsed=1819.18s tid=0x000000000d4e5800 nid=0x2794 runnable

"VM Periodic Task Thread" os_prio=2 cpu=140.63ms elapsed=1818.63s tid=0x000000000d638000 nid=0x257c waiting on condition

JNI global refs: 127, weak refs: 12164
trevan commented 3 years ago

@zlefin , does this ever happen in the first game turn? What about second, third, etc turn? If you have the AI logs open, what is the last log that is shown?

zlefin commented 3 years ago

@trevan I'm not sure if it ever happens in the first game turn, I think it might have, but it tends not to. It's happened on a number of different turns iirc. Due to the bugs' infrequency the overall sample size is small; I think it tends to happen during the noncombat movement phase, but not necessarily.

I tried keeping the AI logs open, but it doesn't seem like it would help, as the logs don't autoscroll to the bottom or keep a file log, and when the bug happens, the game hangs so I can't scroll the log window down to see what's most recent. I'll try running some more tests and see if I Can get it to output something useful on the "fine" detail setting, as that is sparse enough that maybe it won't fill multiple pages by the time the bug happens.

zlefin commented 3 years ago

Wasn't able to capture the logs due to the hanging freezing my computer, as well as problems with this git page;
The bug occurred in a Global game on round 10, France's turn, during the Combat move phase. There were ~10 lines of text in the "fine" ai log. France had no Capital at the time, so there was no purchase units phase for them.

I'll edit update this one with additional information as I generate more info while trying to get ai logs.

WaW, British 1st turn crash, of the usual hanging variety that doesn't force-quit properly. All nations were ai-controlled. 4 lines then the line about opening the log. "fine" log setting. Purchase Options Purchase Categories Starting Combat move phase. Removing territories that can't be conquered. Showing Hard AI settings window

I'm not sure if I had the hard AI debug log already open or not. Sometimes when the issue happens, I think the client doesn't fully freeze until some actions are taken. The AI won't do anything no matter how long you wait, but other parts of it show a basic level of responsiveness (ie menus show and light up when you mouseover them).

new behavior noticed: (which may or may not have been present before) Looking at the TripleA.exe in the task manager, if I use End Task, the task remains, but its memory used is set to 0. Then the memory used goes up by about 10 MB/sec until it reaches ~560 mb; exact number varies as I tried it a few times.

possibly related: on one or two rare occasion I've had issues when playing on bots wherein I experience a similar-seeming hang. It happened when loading a battle-calc window, lending credence to the hypothesis that the issue involves the game data copying in battle-calc

asvitkine commented 2 years ago

@zlefin can you check if this happens with the latest prerelease? There's been a lot of changes to Hard AI and battle calculator since the report.

asvitkine commented 2 months ago

@zlefin friendly ping

asvitkine commented 2 months ago

Actually, I'm going to optimistically close this, because I know for certain that the code in 2.6 has been changed from the above. Particularly, the logic to clone the game state and save games has been rewritten. So I think there's a good chance this is fixed. But please comment/re-open if you're still seeing this with the 2.6 release.