software-challenge / gui

Software-Challenge GUI since 2020/21
https://software-challenge.de
10 stars 3 forks source link

NullPointerException beim Start des vierten Spiels in Folge #98

Closed SKoschnicke closed 1 year ago

SKoschnicke commented 1 year ago

Was ist passiert?

Ich wollte das vierte Spiel starten (1. Mal Mensch vs. Computer, 2. und 3. Mal Computer vs. Computer) und bekam beim Klick auf den Spiel Starten Button die untenstehende Fehlermeldung.

Dein Betriebssystem?

Linux

Logs

17:19:55 DEBUG               sc.gui.model.GameModel - Resetting GameModel
17:19:55 DEBUG      sc.gui.controller.AppController - Requested View change from GAME -> GAME_CREATION
17:19:57 DEBUG      sc.gui.controller.AppController - Requested View change from GAME_CREATION -> GAME_LOADING
17:19:57 INFO   sc.networking.clients.XStreamClient - Creating TCP Network for localhost:13050
17:19:57 INFO   sc.server.network.NewClientListener - Connecting a Client at Socket[addr=/127.0.0.1,port=34994,localport=13050]...
17:19:57 INFO   sc.server.network.NewClientListener - Added Client Client@3432aef4 to ReadyQueue.
17:19:57 INFO       sc.server.network.ClientManager - Delegating new client to ClientManager...
17:19:57 INFO       sc.server.network.ClientManager - Delegation done
17:19:57 INFO   sc.networking.clients.XStreamClient - Creating TCP Network for localhost:13050
17:19:57 INFO   sc.server.network.NewClientListener - Connecting a Client at Socket[addr=/127.0.0.1,port=35002,localport=13050]...
17:19:57 DEBUG                  sc.gui.LobbyManager - Starting new game (paused: true, players: [Player(name=Spieler 1, client=sc.gui.controller.client.GuiClient@37775c6 type Beispiel-Computerspieler on localhost:13050), Player(name=Spieler 2, client=sc.gui.controller.client.GuiClient@2e4b8608 type Beispiel-Computerspieler on localhost:13050)])
17:19:57 INFO   sc.server.network.NewClientListener - Added Client Client@725c8d59 to ReadyQueue.
17:19:57 INFO       sc.server.network.ClientManager - Delegating new client to ClientManager...
17:19:57 INFO       sc.server.network.ClientManager - Delegation done
17:19:57 INFO             sc.server.gaming.GameRoom - Toggling PAUSE from false to true for Game(players=[], gameState=GameState 0, ONE ist dran [1:C6S1, 2:C6S1])
Security framework of XStream not explicitly initialized, using predefined black list on your own risk.
Security framework of XStream not explicitly initialized, using predefined black list on your own risk.
17:19:57 INFO   sc.server.gaming.ReservationManager - Reservation 8ca51970-60a6-4fb8-a662-c018b38716cf was redeemed.
Security framework of XStream not explicitly initialized, using predefined black list on your own risk.
17:19:57 INFO             sc.server.gaming.GameRoom - Game not ready yet: Game(PAUSED, players=[ONE(Spieler 1), TWO(Spieler 2)], gameState=GameState 0, ONE ist dran [1:C6S1, 2:C6S1])
17:19:57 INFO   sc.server.gaming.ReservationManager - Reservation 817ca8e3-0528-4086-b78b-e5ae40ff6402 was redeemed.
Security framework of XStream not explicitly initialized, using predefined black list on your own risk.
17:19:57 INFO             sc.server.gaming.GameRoom - Starting Game(PAUSED, players=[ONE(Spieler 1), TWO(Spieler 2)], gameState=GameState 0, ONE ist dran [1:C6S1, 2:C6S1])
17:19:57 INFO             sc.server.gaming.GameRoom - Updating Status to ACTIVE (was: CREATED)
17:19:57 DEBUG               sc.gui.model.GameModel - New state: GameState 0, ONE ist dran [1:C6S1, 2:C6S1]
Oct 04, 2023 5:19:57 PM javafx.beans.binding.Bindings$2 computeValue
WARNING: Exception while evaluating binding
java.lang.NullPointerException
    at sc.gui.view.MississippiBoard.getGridSize(MississippiBoard.kt:50)
    at sc.gui.view.MississippiBoard.access$getGridSize(MississippiBoard.kt:40)
    at sc.gui.view.MississippiBoard$1$1.invoke(MississippiBoard.kt:86)
    at sc.gui.view.MississippiBoard$1$1.invoke(MississippiBoard.kt:86)
    at tornadofx.PropertiesKt$doubleBinding$1.call(Properties.kt:665)
    at tornadofx.PropertiesKt$doubleBinding$1.call(Properties.kt)
    at javafx.beans.binding.Bindings$2.computeValue(Bindings.java:197)
    at javafx.beans.binding.DoubleBinding.get(DoubleBinding.java:207)
    at javafx.beans.property.DoublePropertyBase.get(DoublePropertyBase.java:134)
    at javafx.beans.binding.DoubleExpression.getValue(DoubleExpression.java:75)
    at javafx.beans.binding.DoubleExpression.getValue(DoubleExpression.java:44)
    at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:355)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.DoublePropertyBase.fireValueChangedEvent(DoublePropertyBase.java:107)
    at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:114)
    at javafx.beans.property.DoublePropertyBase$Listener.invalidated(DoublePropertyBase.java:261)
    at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.binding.DoubleBinding.invalidate(DoubleBinding.java:226)
    at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
    at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.binding.BooleanBinding.invalidate(BooleanBinding.java:174)
    at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
    at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.binding.IntegerBinding.invalidate(IntegerBinding.java:176)
    at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
    at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:106)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
    at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
    at sc.gui.model.GameModel$1.invoke(GameModel.kt:55)
    at sc.gui.model.GameModel$1.invoke(GameModel.kt:51)
    at tornadofx.FXEventRegistration$action$1.invoke(EventBus.kt:42)
    at tornadofx.FXEventRegistration$action$1.invoke(EventBus.kt:33)
    at tornadofx.EventBus$fire$1.invoke(EventBus.kt:126)
    at tornadofx.EventBus$fire$3.run(EventBus.kt:147)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:290)
    at java.base/java.lang.Thread.run(Thread.java:829)

Oct 04, 2023 5:19:57 PM javafx.beans.binding.Bindings$2 computeValue
WARNING: Exception while evaluating binding
java.lang.NullPointerException
    at sc.gui.view.MississippiBoard.getGridSize(MississippiBoard.kt:50)
    at sc.gui.view.MississippiBoard.access$getGridSize(MississippiBoard.kt:40)
    at sc.gui.view.MississippiBoard$1$1.invoke(MississippiBoard.kt:86)
    at sc.gui.view.MississippiBoard$1$1.invoke(MississippiBoard.kt:86)
    at tornadofx.PropertiesKt$doubleBinding$1.call(Properties.kt:665)
    at tornadofx.PropertiesKt$doubleBinding$1.call(Properties.kt)
    at javafx.beans.binding.Bindings$2.computeValue(Bindings.java:197)
    at javafx.beans.binding.DoubleBinding.get(DoubleBinding.java:207)
    at javafx.beans.property.DoublePropertyBase.get(DoublePropertyBase.java:134)
    at javafx.beans.binding.DoubleExpression.getValue(DoubleExpression.java:75)
    at javafx.beans.binding.DoubleExpression.getValue(DoubleExpression.java:44)
    at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:355)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.DoublePropertyBase.fireValueChangedEvent(DoublePropertyBase.java:107)
    at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:114)
    at javafx.beans.property.DoublePropertyBase$Listener.invalidated(DoublePropertyBase.java:261)
    at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.binding.DoubleBinding.invalidate(DoubleBinding.java:226)
    at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
    at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:106)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
    at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
    at sc.gui.model.GameModel$1.invoke(GameModel.kt:55)
    at sc.gui.model.GameModel$1.invoke(GameModel.kt:51)
    at tornadofx.FXEventRegistration$action$1.invoke(EventBus.kt:42)
    at tornadofx.FXEventRegistration$action$1.invoke(EventBus.kt:33)
    at tornadofx.EventBus$fire$1.invoke(EventBus.kt:126)
    at tornadofx.EventBus$fire$3.run(EventBus.kt:147)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:290)
    at java.base/java.lang.Thread.run(Thread.java:829)

Oct 04, 2023 5:19:57 PM javafx.beans.binding.Bindings$6 computeValue
WARNING: Exception while evaluating binding
java.lang.NullPointerException
    at sc.gui.view.MississippiBoard.getGridSize(MississippiBoard.kt:50)
    at sc.gui.view.MississippiBoard.lambda$4$lambda$3$lambda$2(MississippiBoard.kt:90)
    at javafx.beans.binding.Bindings$6.computeValue(Bindings.java:358)
    at javafx.beans.binding.ObjectBinding.get(ObjectBinding.java:157)
    at javafx.beans.binding.ObjectExpression.getValue(ObjectExpression.java:49)
    at javafx.beans.property.ObjectPropertyBase.get(ObjectPropertyBase.java:133)
    at javafx.scene.Node$MiscProperties$6.invalidated(Node.java:6913)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
    at javafx.beans.property.ObjectPropertyBase$Listener.invalidated(ObjectPropertyBase.java:234)
    at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:176)
    at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
    at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:106)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
    at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
    at sc.gui.model.GameModel$1.invoke(GameModel.kt:55)
    at sc.gui.model.GameModel$1.invoke(GameModel.kt:51)
    at tornadofx.FXEventRegistration$action$1.invoke(EventBus.kt:42)
    at tornadofx.FXEventRegistration$action$1.invoke(EventBus.kt:33)
    at tornadofx.EventBus$fire$1.invoke(EventBus.kt:126)
    at tornadofx.EventBus$fire$3.run(EventBus.kt:147)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:290)
    at java.base/java.lang.Thread.run(Thread.java:829)

Oct 04, 2023 5:19:57 PM tornadofx.DefaultErrorHandler uncaughtException
SEVERE: Uncaught error
java.lang.NullPointerException
    at sc.gui.view.MississippiBoard.getGridSize(MississippiBoard.kt:50)
    at sc.gui.view.MississippiBoard._init_$lambda$9(MississippiBoard.kt:149)
    at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:360)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:106)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
    at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
    at sc.gui.model.GameModel$1.invoke(GameModel.kt:55)
    at sc.gui.model.GameModel$1.invoke(GameModel.kt:51)
    at tornadofx.FXEventRegistration$action$1.invoke(EventBus.kt:42)
    at tornadofx.FXEventRegistration$action$1.invoke(EventBus.kt:33)
    at tornadofx.EventBus$fire$1.invoke(EventBus.kt:126)
    at tornadofx.EventBus$fire$3.run(EventBus.kt:147)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:290)
    at java.base/java.lang.Thread.run(Thread.java:829)

17:19:57 DEBUG              sc.gui.view.ControlView - GameControlState START
17:19:57 DEBUG      sc.gui.controller.AppController - Requested View change from GAME_LOADING -> GAME
SKoschnicke commented 1 year ago

Version 24.1.5

GUI sieht jetzt so aus (+ Fehlermodal) 2023-10-04_17-24

xeruf commented 1 year ago

ja irgendwie gibt's bei den javafx Sachen manchmal concurrency issues, ist nicht ganz einfach das aufzuklären ^^