software-challenge / backend

Server, Client und Spiel-Plugins der Software-Challenge Germany
https://www.software-challenge.de
12 stars 9 forks source link

loadGameFile parameter throws an error #427

Closed jgeramb closed 7 months ago

jgeramb commented 8 months ago

Steps to reproduce

  1. Save a replay of a game.
  2. Start the server using the parameters "--loadGameFile [replay_file_name].xml" and "--turn [turn_number]".
  3. Connect a client to the server.

Expected behavior

The server should load the game file and wait for the second player.

Actual behavior

The server logs an error:

15:24:54.08 WARN   sc.networking.clients.XStreamClient - GameLoaderClient@49c48a06(histsize=25, result=GameResult(winner=Player 1 kann sich nicht mehr bewegen., scores=[Player 1[Siegpunkte=0, Punkte=0, Passagiere=0], Player 2[Siegpunkte=2, Punkte=38, Passagiere=1]])) disconnecting (Cause: LOST_CONNECTION, Exception: java.io.EOFException)
java.io.EOFException: null
        at com.thoughtworks.xstream.XStream$4.readFromStream(XStream.java:2102)
        at com.thoughtworks.xstream.core.util.CustomObjectInputStream.readObjectOverride(CustomObjectInputStream.java:123)
        at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:529)
        at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:496)
        at sc.networking.clients.XStreamClient.receiveThread(XStreamClient.java:103)
        at sc.networking.clients.XStreamClient$1.run(XStreamClient.java:80)
        at java.base/java.lang.Thread.run(Thread.java:1589)
xeruf commented 7 months ago

I'm not getting any errors, when does it occur?

image

jgeramb commented 7 months ago

You need to connect a client to the server. Try the replay I sent to you on Discord.

xeruf commented 7 months ago

ah that info was missing, thanks