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.36k stars 398 forks source link

GameDataManager#loadGame:62 - java.io.EOFException #12851

Open tripleabuilderbot opened 3 months ago

tripleabuilderbot commented 3 months ago

User Description

I was trying to open an autosave file for a Europe 1940 game I was playing against myself (local game). It has always worked in the pass. However, now I get an "EOF Exception". I am unable to play the file. This is not an issue with other autosave files.

Log Message

Error loading game data

TripleA Version

2.7.14859

Java Version

11.0.19

Operating System

Mac OS X

Heap Size

2048M

Stack Trace

Exception: java.io.EOFException 
java.lang.Exception
    at java.base/java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:269)
    at java.base/java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:259)
    at java.base/java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165)
    at java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:80)
    at java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:92)
    at games.strategy.engine.framework.GameDataManager.loadGame(GameDataManager.java:62)
    at games.strategy.engine.framework.GameDataManager.loadGame(GameDataManager.java:47)
    at games.strategy.engine.framework.startup.ui.panels.main.game.selector.GameSelectorModel.loadSave(GameSelectorModel.java:77)
    at games.strategy.engine.framework.startup.ui.panels.main.game.selector.GameSelectorPanel.lambda$loadSaveFile$6(GameSelectorPanel.java:340)
    at games.strategy.engine.framework.ui.background.TaskRunner$1.doInBackground(TaskRunner.java:80)
    at games.strategy.engine.framework.ui.background.TaskRunner$1.doInBackground(TaskRunner.java:76)
    at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
frigoref commented 3 months ago

Autosave file need.