software-challenge / gui

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

Human frequently gets a wrongly colored piece #43

Closed anarchuser closed 3 years ago

anarchuser commented 3 years ago

Version: 21.0.6 7ec4e7b Platform: Windows (reproduced on Linux) Game: Computer vs. Human

Notes:

image

anarchuser commented 3 years ago

It's possible this is related to #36 GUI and Server being out of sync suggests that the internal state of the GUI isn't getting cleared properly.

xeruf commented 3 years ago

Same issue encountered: image

Log:

``` 10:50:38 DEBUG sc.gui.controller.AppController - Requested View change from START -> GAME_CREATION 10:50:40 DEBUG sc.gui.controller.AppController - Requested View change from GAME_CREATION -> GAME 10:50:41 DEBUG sc.gui.view.PiecesFragment - Color: RED 10:50:41 DEBUG sc.gui.model.BoardModel - Blocksize changed 16.0 -> 0.0 10:50:41 DEBUG sc.gui.controller.ClientController - creating and observing 10:50:41 INFO sc.networking.clients.LobbyClient - Creating TCP Network for localhost:13050 10:50:41 INFO sc.server.network.NewClientListener - A Client connected... 10:50:41 INFO sc.networking.clients.LobbyClient - Creating TCP Network for localhost:13050 10:50:41 INFO sc.networking.clients.LobbyClient - Creating TCP Network for localhost:13050 10:50:41 INFO sc.server.network.ClientManager - Delegating new client to ClientManager... 10:50:41 INFO sc.server.network.ClientManager - Delegation done 10:50:41 INFO sc.server.network.NewClientListener - Added Client sc.server.network.Client@26786261 to ReadyQueue. 10:50:41 INFO sc.server.network.NewClientListener - A Client connected... 10:50:41 INFO sc.server.network.NewClientListener - Added Client sc.server.network.Client@49e35ba5 to ReadyQueue. 10:50:41 INFO sc.server.network.ClientManager - Delegating new client to ClientManager... 10:50:41 INFO sc.server.network.ClientManager - Delegation done 10:50:41 INFO sc.server.network.NewClientListener - A Client connected... 10:50:41 INFO sc.server.network.NewClientListener - Added Client sc.server.network.Client@14d511fc to ReadyQueue. 10:50:41 INFO sc.server.network.ClientManager - Delegating new client to ClientManager... 10:50:41 INFO sc.server.network.ClientManager - Delegation done 10:50:41 DEBUG sc.gui.model.BoardModel - Blocksize changed 0.0 -> 24.0 10:50:41 INFO sc.server.network.Client - Client authenticated as administrator 10:50:41 INFO sc.server.gaming.GameRoomManager - Created new game of type swc_2021_blokus 10:50:41 WARN sc.server.gaming.GameRoom - Dropped unnecessary PAUSE toggle from false to false. 10:50:41 DEBUG sc.gui.LobbyManager - lobby: game was prepared 10:50:41 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:41 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:41 DEBUG sc.gui.controller.ClientController - no controlling client yet 10:50:41 INFO sc.server.gaming.ReservationManager - Reservation 3f02ee8e-16a3-419d-b8f2-be9af620169b was redeemed. 10:50:41 INFO sc.server.gaming.GameRoom - Game isn't ready yet. 10:50:41 INFO sc.server.gaming.ReservationManager - Reservation 7c22c302-120c-49ab-90be-d995161a43c0 was redeemed. 10:50:41 INFO sc.server.gaming.GameRoom - Updating Status to ACTIVE (was: CREATED) 10:50:41 DEBUG sc.gui.LobbyManager - lobby: 22da4b1e-012f-4faa-a8e9-a0e565b69dee game was observed 10:50:41 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:41 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:41 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:41 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/0 -> BLUE (Start Piece: PENTO_V) Security framework of XStream not explicitly initialized, using predefined black list on your own risk. 10:50:41 INFO sc.server.gaming.GameRoom - Started the game. 10:50:41 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 10:50:41 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:41 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:41 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:41 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/1 -> YELLOW (Start Piece: PENTO_V) 10:50:41 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:41 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:41 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/1 -> YELLOW (Start Piece: PENTO_V) 10:50:41 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 10:50:41 DEBUG sc.gui.controller.GameController - New game state 10:50:42 DEBUG sc.gui.controller.GameController - New game state 10:50:42 DEBUG sc.gui.controller.GameController - New game state 10:50:42 DEBUG sc.gui.controller.GameController - Human move request 10:50:42 DEBUG sc.gui.controller.GameController - Number of possible moves: 9 10:50:42 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 10:50:42 DEBUG sc.gui.view.PiecesFragment - Color: YELLOW Clicked on pane 17, 0 10:50:44 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 17, 0 10:50:44 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:44 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:44 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:44 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/2 -> RED (Start Piece: PENTO_V) 10:50:44 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:44 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:44 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/2 -> RED (Start Piece: PENTO_V) 10:50:44 DEBUG sc.gui.controller.GameController - New game state 10:50:44 DEBUG sc.gui.controller.GameController - New game state 10:50:44 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 10:50:44 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:44 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:44 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:44 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/3 -> GREEN (Start Piece: PENTO_V) 10:50:44 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:44 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:44 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/3 -> GREEN (Start Piece: PENTO_V) 10:50:44 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 10:50:44 DEBUG sc.gui.controller.GameController - New game state 10:50:44 DEBUG sc.gui.controller.GameController - New game state 10:50:44 DEBUG sc.gui.controller.GameController - Human move request 10:50:44 DEBUG sc.gui.controller.GameController - Number of possible moves: 3 10:50:44 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 10:50:44 DEBUG sc.gui.view.PiecesFragment - Color: GREEN Clicked on pane 17, 17 10:50:49 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 17, 17 10:50:49 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:49 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:49 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:49 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/4 -> BLUE 10:50:49 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:49 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:49 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/4 -> BLUE 10:50:49 DEBUG sc.gui.controller.GameController - New game state 10:50:49 DEBUG sc.gui.controller.GameController - New game state 10:50:49 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 10:50:49 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:49 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:49 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:49 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/5 -> YELLOW 10:50:49 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:49 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:49 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/5 -> YELLOW 10:50:49 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 10:50:49 DEBUG sc.gui.controller.GameController - New game state 10:50:49 DEBUG sc.gui.controller.GameController - New game state 10:50:49 DEBUG sc.gui.controller.GameController - Human move request 10:50:49 DEBUG sc.gui.controller.GameController - Number of possible moves: 185 10:50:49 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 10:50:49 DEBUG sc.gui.view.PiecesFragment - Color: YELLOW Clicked on pane 17, 3 10:50:51 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 17, 3 10:50:51 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:51 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:51 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:51 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/6 -> RED 10:50:51 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:51 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:51 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/6 -> RED 10:50:51 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 10:50:51 DEBUG sc.gui.controller.GameController - New game state 10:50:51 DEBUG sc.gui.controller.GameController - New game state 10:50:51 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:51 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:51 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:51 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/7 -> GREEN 10:50:51 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:51 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:51 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/7 -> GREEN 10:50:51 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 10:50:52 DEBUG sc.gui.controller.GameController - New game state 10:50:52 DEBUG sc.gui.controller.GameController - New game state 10:50:52 DEBUG sc.gui.controller.GameController - Human move request 10:50:52 DEBUG sc.gui.controller.GameController - Number of possible moves: 185 10:50:52 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 10:50:52 DEBUG sc.gui.view.PiecesFragment - Color: GREEN 10:50:53 DEBUG sc.gui.view.UndeployedPiecesFragment - Clicked on GREEN PENTO_L 10:50:53 DEBUG sc.gui.view.PiecesFragment - Color: GREEN Clicked on pane 16, 15 10:50:55 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 16, 15 10:50:55 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:55 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:55 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:55 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/8 -> BLUE 10:50:55 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:55 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:55 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/8 -> BLUE 10:50:55 DEBUG sc.gui.controller.GameController - New game state 10:50:55 DEBUG sc.gui.controller.GameController - New game state 10:50:55 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 10:50:55 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:55 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:55 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:55 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/9 -> YELLOW 10:50:55 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:55 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:55 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/9 -> YELLOW 10:50:55 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 10:50:55 DEBUG sc.gui.controller.GameController - New game state 10:50:55 DEBUG sc.gui.controller.GameController - New game state 10:50:55 DEBUG sc.gui.controller.GameController - Human move request 10:50:55 DEBUG sc.gui.controller.GameController - Number of possible moves: 248 10:50:55 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 10:50:55 DEBUG sc.gui.view.PiecesFragment - Color: YELLOW 10:50:58 DEBUG sc.gui.view.UndeployedPiecesFragment - Clicked on YELLOW MONO 10:50:58 DEBUG sc.gui.view.PiecesFragment - Color: YELLOW Clicked on pane 19, 2 10:50:59 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 19, 2 10:50:59 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:50:59 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:59 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:59 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/10 -> RED 10:50:59 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:50:59 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:50:59 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/10 -> RED 10:51:00 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 10:51:00 DEBUG sc.gui.controller.GameController - New game state 10:51:00 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 10:51:00 DEBUG sc.gui.LobbyManager - lobby: new state for 22da4b1e-012f-4faa-a8e9-a0e565b69dee 10:51:00 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:51:00 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:51:00 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/11 -> GREEN 10:51:00 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 10:51:00 DEBUG sc.gui.controller.ClientController - ClientController got new update 10:51:00 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/11 -> GREEN 10:51:00 DEBUG sc.gui.controller.GameController - New game state 10:51:00 DEBUG sc.gui.controller.GameController - Human move request 10:51:00 DEBUG sc.gui.controller.GameController - Number of possible moves: 183 10:51:00 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 10:51:00 DEBUG sc.gui.controller.GameController - New game state 10:51:00 DEBUG sc.gui.controller.GameController - New game state Clicked on pane 16, 5 10:51:09 DEBUG sc.gui.controller.BoardController - Set-Move seems invalid from GUI at 16, 5 Clicked on pane 13, 11 10:51:13 DEBUG sc.gui.controller.BoardController - Set-Move seems invalid from GUI at 13, 11 Clicked on pane 15, 8 10:51:15 DEBUG sc.gui.controller.BoardController - Set-Move seems invalid from GUI at 15, 8 ```

xeruf commented 3 years ago

Again: image

Log:

``` 15:11:49 DEBUG sc.gui.controller.AppController - Requested View change from START -> GAME_CREATION 15:11:53 DEBUG sc.gui.controller.AppController - Requested View change from GAME_CREATION -> GAME 15:11:54 DEBUG sc.gui.view.PiecesFragment - Color: RED 15:11:54 DEBUG sc.gui.model.BoardModel - Blocksize changed 16.0 -> 0.0 15:11:54 DEBUG sc.gui.controller.ClientController - creating and observing 15:11:54 INFO sc.networking.clients.LobbyClient - Creating TCP Network for localhost:13050 15:11:54 INFO sc.server.network.NewClientListener - A Client connected... 15:11:54 DEBUG sc.gui.model.BoardModel - Blocksize changed 0.0 -> 24.0 15:11:54 INFO sc.networking.clients.LobbyClient - Creating TCP Network for localhost:13050 15:11:54 INFO sc.server.network.NewClientListener - Added Client sc.server.network.Client@34926085 to ReadyQueue. 15:11:54 INFO sc.server.network.ClientManager - Delegating new client to ClientManager... 15:11:54 INFO sc.server.network.ClientManager - Delegation done 15:11:54 INFO sc.server.network.NewClientListener - A Client connected... 15:11:54 INFO sc.server.network.NewClientListener - Added Client sc.server.network.Client@454aafaa to ReadyQueue. 15:11:54 INFO sc.server.network.ClientManager - Delegating new client to ClientManager... 15:11:54 INFO sc.server.network.ClientManager - Delegation done 15:11:54 INFO sc.networking.clients.LobbyClient - Creating TCP Network for localhost:13050 15:11:54 INFO sc.server.network.NewClientListener - A Client connected... 15:11:54 INFO sc.server.network.NewClientListener - Added Client sc.server.network.Client@7389f566 to ReadyQueue. 15:11:54 INFO sc.server.network.ClientManager - Delegating new client to ClientManager... 15:11:54 INFO sc.server.network.ClientManager - Delegation done Security framework of XStream not explicitly initialized, using predefined black list on your own risk. 15:11:54 INFO sc.server.network.Client - Client authenticated as administrator 15:11:54 INFO sc.server.gaming.GameRoomManager - Created new game of type swc_2021_blokus 15:11:54 WARN sc.server.gaming.GameRoom - Dropped unnecessary PAUSE toggle from false to false. 15:11:54 DEBUG sc.gui.LobbyManager - lobby: game was prepared 15:11:54 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:11:54 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:11:54 DEBUG sc.gui.controller.ClientController - no controlling client yet 15:11:54 INFO sc.server.gaming.ReservationManager - Reservation 89bfa2df-65a7-4d74-a784-2fe585412ecc was redeemed. 15:11:54 INFO sc.server.gaming.GameRoom - Game isn't ready yet. 15:11:54 INFO sc.server.gaming.ReservationManager - Reservation c1062668-d9d1-4ed7-a3f0-d21455072bfd was redeemed. 15:11:54 INFO sc.server.gaming.GameRoom - Updating Status to ACTIVE (was: CREATED) 15:11:54 DEBUG sc.gui.LobbyManager - lobby: ec1183bb-777b-453c-b9cc-a03f4cd4ab14 game was observed 15:11:54 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 15:11:54 INFO sc.server.gaming.GameRoom - Started the game. 15:11:54 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:11:54 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:11:54 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:11:54 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/1 -> YELLOW (Start Piece: PENTO_R) 15:11:54 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 15:11:54 DEBUG sc.gui.controller.GameController - New game state 15:11:54 DEBUG sc.gui.controller.GameController - Human move request 15:11:54 DEBUG sc.gui.controller.GameController - Number of possible moves: 6 15:11:54 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 15:11:54 DEBUG sc.gui.view.PiecesFragment - Color: YELLOW Clicked on pane 0, 17 15:11:57 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 0, 17 15:11:57 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:11:57 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:11:57 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:11:57 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/2 -> RED (Start Piece: PENTO_R) 15:11:57 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:11:57 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:11:57 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/2 -> RED (Start Piece: PENTO_R) 15:11:57 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 15:11:57 DEBUG sc.gui.controller.GameController - New game state 15:11:57 DEBUG sc.gui.controller.GameController - New game state 15:11:57 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:11:57 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:11:57 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:11:57 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/3 -> GREEN (Start Piece: PENTO_R) 15:11:57 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:11:57 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:11:57 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/3 -> GREEN (Start Piece: PENTO_R) 15:11:57 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 15:11:57 DEBUG sc.gui.controller.GameController - New game state 15:11:57 DEBUG sc.gui.controller.GameController - New game state 15:11:57 DEBUG sc.gui.controller.GameController - Human move request 15:11:57 DEBUG sc.gui.controller.GameController - Number of possible moves: 2 15:11:57 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 15:11:57 DEBUG sc.gui.view.PiecesFragment - Color: GREEN Clicked on pane 17, 0 15:12:06 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 17, 0 15:12:06 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:12:06 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:06 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:06 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/4 -> BLUE 15:12:06 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:06 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:06 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/4 -> BLUE 15:12:06 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 15:12:06 DEBUG sc.gui.controller.GameController - New game state 15:12:06 DEBUG sc.gui.controller.GameController - New game state 15:12:06 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:12:06 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:06 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:06 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/5 -> YELLOW 15:12:06 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:06 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:06 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/5 -> YELLOW 15:12:06 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 15:12:06 DEBUG sc.gui.controller.GameController - New game state 15:12:06 DEBUG sc.gui.controller.GameController - New game state 15:12:06 DEBUG sc.gui.controller.GameController - Human move request 15:12:06 DEBUG sc.gui.controller.GameController - Number of possible moves: 237 15:12:06 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 15:12:06 DEBUG sc.gui.view.PiecesFragment - Color: YELLOW Clicked on pane 2, 14 15:12:08 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 2, 14 15:12:08 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:12:08 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:08 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:08 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/6 -> RED 15:12:08 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:08 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:08 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/6 -> RED 15:12:08 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 15:12:08 DEBUG sc.gui.controller.GameController - New game state 15:12:08 DEBUG sc.gui.controller.GameController - New game state 15:12:08 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:12:08 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:08 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:08 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/7 -> GREEN 15:12:08 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:08 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:08 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/7 -> GREEN 15:12:08 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 15:12:08 DEBUG sc.gui.controller.GameController - New game state 15:12:08 DEBUG sc.gui.controller.GameController - New game state 15:12:08 DEBUG sc.gui.controller.GameController - Human move request 15:12:08 DEBUG sc.gui.controller.GameController - Number of possible moves: 237 15:12:08 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 15:12:08 DEBUG sc.gui.view.PiecesFragment - Color: GREEN 15:12:11 DEBUG sc.gui.view.UndeployedPiecesFragment - Clicked on GREEN PENTO_P 15:12:11 DEBUG sc.gui.view.PiecesFragment - Color: GREEN Clicked on pane 16, 3 15:12:12 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 16, 3 15:12:12 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 15:12:12 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:12:12 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:12 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:12 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/8 -> BLUE 15:12:12 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:12 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:12 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/8 -> BLUE 15:12:12 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:12:12 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:12 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:12 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/9 -> YELLOW 15:12:12 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:12 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:12 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/9 -> YELLOW 15:12:12 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 15:12:12 DEBUG sc.gui.controller.GameController - New game state 15:12:12 DEBUG sc.gui.controller.GameController - New game state 15:12:12 DEBUG sc.gui.controller.GameController - New game state 15:12:12 DEBUG sc.gui.controller.GameController - New game state 15:12:12 DEBUG sc.gui.controller.GameController - Human move request 15:12:12 DEBUG sc.gui.controller.GameController - Number of possible moves: 290 15:12:12 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 15:12:12 DEBUG sc.gui.view.PiecesFragment - Color: YELLOW Clicked on pane 4, 12 15:12:14 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 4, 12 15:12:14 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:12:14 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:14 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:14 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/10 -> RED 15:12:14 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:14 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:14 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/10 -> RED 15:12:14 DEBUG s.g.c.client.InternalGameHandler - Player One got new action request! 15:12:14 DEBUG sc.gui.controller.GameController - New game state 15:12:14 DEBUG s.g.c.client.InternalGameHandler - Player Two got new action request! 15:12:14 DEBUG sc.gui.LobbyManager - lobby: new state for ec1183bb-777b-453c-b9cc-a03f4cd4ab14 15:12:14 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:14 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:14 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/11 -> GREEN 15:12:14 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 15:12:14 DEBUG sc.gui.controller.ClientController - ClientController got new update 15:12:14 DEBUG sc.gui.controller.ClientController - gamestate is GameState 3/11 -> GREEN 15:12:14 DEBUG sc.gui.controller.GameController - New game state 15:12:14 DEBUG sc.gui.controller.GameController - Human move request 15:12:14 DEBUG sc.gui.controller.GameController - Number of possible moves: 313 15:12:14 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard... 15:12:14 DEBUG sc.gui.controller.GameController - New game state 15:12:14 DEBUG sc.gui.controller.GameController - New game state Clicked on pane 8, 10 15:12:16 DEBUG sc.gui.controller.BoardController - Set-Move seems invalid from GUI at 8, 10 ```

xeruf commented 3 years ago

Seems to be the same issue:

http://wollw.de/pus/sc21/pus_client-Mensch.mp4 Kai: Unser Client, manuel gestartet gegen Mensch: Von einem bestimmten Moment an bekommt der Mensch nicht mehr die aktuelle Farbe zur Auswahl und kann deshalb nicht mehr setzen. Dieser Problem tritt nicht auf, wenn der Beispiel-Computerspieler gegen Mensch spielt.

http://wollw.de/pus/sc21/server_log.txt http://wollw.de/pus/sc21/server_err_log.txt

xeruf commented 3 years ago

Can't reproduce with latest backend (https://github.com/CAU-Kiel-Tech-Inf/backend/commit/727d7c97ad82ca6d29a4d2317408b77a12a5be24) and GUI 21.2.1

Was able to reproduce it again with GUI 21.2.1, but only once over multiple iterations

SKoschnicke commented 3 years ago

image

Human vs. manually started client (ruby client)

With GUI 21.2.1 and backend 727d7c9

Reproduced on first try, so seems to be still there.

xeruf commented 3 years ago

ah I see, may be only with a manually started client

xeruf commented 3 years ago

A log:

14:15:13 INFO  sc.server.network.NewClientListener - A Client connected...
14:15:13 INFO  sc.server.network.ClientManager - Delegating new client to ClientManager...
14:15:13 INFO  sc.server.network.NewClientListener - Added Client Client@70a93d15 to ReadyQueue.
14:15:13 INFO  sc.server.network.ClientManager - Delegation done
14:15:13 INFO  sc.server.gaming.GameRoomManager - Created new game of type swc_2021_blokus
14:15:13 WARN  sc.server.gaming.GameRoom - PAUSE is already false, dropping request
14:15:13 INFO  sc.server.gaming.GameRoomManager - Pause is set to false
14:15:13 INFO  sc.server.gaming.GameRoom - Game not ready yet: Game(players=[Team 1(Unknown)], gameState=GameState 1/0 -> Farbe Blau (Start Piece: PENTO_V))
14:15:13 DEBUG sc.gui.LobbyManager - LobbyManager started room caced53c-52a9-4bbd-bf4f-334fc6063fc1
14:15:13 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:13 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:13 DEBUG sc.gui.controller.ClientController - no controlling client yet
14:15:13 DEBUG sc.gui.LobbyManager - lobby: caced53c-52a9-4bbd-bf4f-334fc6063fc1 game was joined ({caced53c-52a9-4bbd-bf4f-334fc6063fc1=1})
14:15:13 DEBUG sc.gui.LobbyManager - lobby: caced53c-52a9-4bbd-bf4f-334fc6063fc1 game was observed
14:15:13 INFO  sc.server.gaming.GameRoom - Updating Status to ACTIVE (was: CREATED)
14:15:13 DEBUG sc.gui.LobbyManager - lobby: new state for caced53c-52a9-4bbd-bf4f-334fc6063fc1
14:15:13 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:13 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:13 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/0 -> Farbe Blau (Start Piece: PENTO_V)
14:15:13 INFO  sc.server.gaming.GameRoom - Started Game(players=[Team 1(Unknown), Team 2(Unknown)], gameState=GameState 1/0 -> Farbe Blau (Start Piece: PENTO_V))
14:15:13 DEBUG sc.gui.LobbyManager - lobby: caced53c-52a9-4bbd-bf4f-334fc6063fc1 game was joined ({caced53c-52a9-4bbd-bf4f-334fc6063fc1=2})
14:15:13 DEBUG sc.gui.controller.AppController - Requested View change from GAME_LOADING -> GAME
14:15:13 INFO  sc.framework.plugins.AbstractGame - Time needed for move: 25
14:15:13 DEBUG sc.gui.LobbyManager - lobby: new state for caced53c-52a9-4bbd-bf4f-334fc6063fc1
14:15:13 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:13 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:13 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/1 -> Farbe Gelb (Start Piece: PENTO_V)
14:15:13 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:13 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:13 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/1 -> Farbe Gelb (Start Piece: PENTO_V)
14:15:13 DEBUG s.g.c.client.InternalGameHandler - Player Team 2 got new action request!
14:15:13 DEBUG sc.gui.model.BoardModel - Blocksize changed 16.0 -> 0.0
14:15:14 DEBUG sc.gui.controller.GameController - New game state
14:15:14 DEBUG sc.gui.controller.GameController - New game state
14:15:14 DEBUG sc.gui.controller.GameController - Human move request for Farbe Gelb
14:15:14 DEBUG sc.gui.controller.GameController - Number of possible moves: 9
14:15:14 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard...
14:15:14 DEBUG sc.gui.model.BoardModel - Blocksize changed 0.0 -> 30.725
Clicked on pane 17, 17
14:15:16 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 17, 17
14:15:16 INFO  sc.framework.plugins.AbstractGame - Time needed for move: 2710
14:15:16 DEBUG sc.gui.LobbyManager - lobby: new state for caced53c-52a9-4bbd-bf4f-334fc6063fc1
14:15:16 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:16 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:16 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/2 -> Farbe Rot (Start Piece: PENTO_V)
14:15:16 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:16 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:16 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/2 -> Farbe Rot (Start Piece: PENTO_V)
14:15:16 DEBUG sc.gui.controller.GameController - New game state
14:15:16 DEBUG sc.gui.controller.GameController - New game state
14:15:16 INFO  sc.framework.plugins.AbstractGame - Time needed for move: 4
14:15:16 DEBUG sc.gui.LobbyManager - lobby: new state for caced53c-52a9-4bbd-bf4f-334fc6063fc1
14:15:16 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:16 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:16 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/3 -> Farbe Grün (Start Piece: PENTO_V)
14:15:16 DEBUG sc.gui.controller.GameController - New game state
14:15:16 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:16 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:16 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/3 -> Farbe Grün (Start Piece: PENTO_V)
14:15:16 DEBUG sc.gui.controller.GameController - New game state
14:15:16 DEBUG s.g.c.client.InternalGameHandler - Player Team 2 got new action request!
14:15:16 DEBUG sc.gui.controller.GameController - Human move request for Farbe Grün
14:15:16 DEBUG sc.gui.controller.GameController - Number of possible moves: 3
14:15:16 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard...
Clicked on pane 17, 0
14:15:17 DEBUG sc.gui.controller.BoardController - Set-Move seems valid from GUI at 17, 0
14:15:17 INFO  sc.framework.plugins.AbstractGame - Time needed for move: 1540
14:15:17 DEBUG sc.gui.LobbyManager - lobby: new state for caced53c-52a9-4bbd-bf4f-334fc6063fc1
14:15:17 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:17 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:17 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/4 -> Farbe Blau 
14:15:17 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:17 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:17 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/4 -> Farbe Blau 
14:15:17 DEBUG sc.gui.controller.GameController - New game state
14:15:17 DEBUG sc.gui.controller.GameController - New game state
14:15:17 INFO  sc.framework.plugins.AbstractGame - Time needed for move: 36
14:15:18 DEBUG sc.gui.LobbyManager - lobby: new state for caced53c-52a9-4bbd-bf4f-334fc6063fc1
14:15:18 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:18 DEBUG s.g.c.client.InternalGameHandler - Player Team 2 got new action request!
14:15:18 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:18 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/5 -> Farbe Gelb 
14:15:18 DEBUG sc.gui.controller.ClientController - game listener: onUpdate
14:15:18 DEBUG sc.gui.controller.ClientController - ClientController got new update
14:15:18 DEBUG sc.gui.controller.ClientController - gamestate is GameState 2/5 -> Farbe Gelb 
14:15:18 DEBUG sc.gui.controller.GameController - Human move request for Farbe Gelb
14:15:18 DEBUG sc.gui.controller.GameController - Number of possible moves: 185
14:15:18 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard...
14:15:18 DEBUG sc.gui.controller.GameController - New game state
14:15:18 DEBUG sc.gui.controller.GameController - New game state
image

(Don't mind the game end message)

xeruf commented 3 years ago

Interesting debug output:

8:36:47 DEBUG sc.gui.controller.GameController - Human move request for Farbe Gelb
18:36:47 DEBUG sc.gui.controller.GameController - Number of possible moves: 379
18:36:47 DEBUG sc.gui.controller.BoardController - Calculating isPlaceableBoard...
18:36:47 DEBUG sc.gui.controller.GameController - New game state
18:36:47 DEBUG sc.gui.view.UndeployedPiecesFragment - Current color Farbe Gelb can place []
18:36:47 DEBUG sc.gui.controller.GameController - New game state
Clicked on pane 4, 1
MartinRe63 commented 3 years ago

I've the same issue very easy - Want to understand the game playing human vs. human. The first 5 moves are fine, but with the 6th move I can not select a yellow color. The gui still offers a blue piece to play. image

MartinRe63 commented 3 years ago

I keep my fingers cross, that the changes done will solve this. Hope the merge is done soon and will check on the new release. thx. Martin.

xeruf commented 3 years ago

Damn, still occurs in latest master :/

xeruf commented 3 years ago

Ah I see - it seems to happen if a NewGameState is received after a HumanMoveRequest in GameController, since that clears validPieces

MartinRe63 commented 3 years ago

Hallo,

yesterday evening at about 17:00 I've loaded the current master. compile and build was working well. Tried a game human against human. Want to check how the game mechanic works.

First I found that after the start it's required to press the start button. If I choose a new game from the menu it's requesting to press the start button, but no button is visible.

Second I was not able to leave the first phase where the piece is fix. The last try in the log shows a situation, where it worked well for the first 2 moves only. With the third move it's reqesting a red piece, but a yellow piece is still selectable.

The comment given above might be right. The timing seems to be different during the processing.

With yellow it's working fine: 12:46:55 DEBUG sc.gui.view.UndeployedPiecesFragment - Current color YELLOW can place [PENTO_W]

Red is not working: 12:47:07 DEBUG sc.gui.view.UndeployedPiecesFragment - Current color RED can place []

The full log: game_server.log

OS = Windows 10 Jopenjdk version "14.0.1" 2020-04-14 OpenJDK Runtime Environment (build 14.0.1+7) OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

xeruf commented 3 years ago

@MartinRe63 thank you :) if you're eager to try the latest developments, please check out if anything improved in https://github.com/CAU-Kiel-Tech-Inf/gui/pull/64

MartinRe63 commented 3 years ago

Sorry. I cloned the latest development but nothing changed. The start of the game is still "not" deterministic. When I start from scratch I got a start button - When I start via new game there is no start button visible at all - also the start button seems to have no function. I can put pieces on the board allthough I've not used the start button. It's also total random, if the status information and the pieces are in sync. The status might say - yellow to move, but the piece I can put on the board is still blue. Sometimes I'm able to use "Anhalten" and "Weiter" to get the right piece color, but mostly not. With this I was able in maximum to play until the 5th move and to put a blue item to the board - but I was not able to decide which item to choose. Latest with the 6th move I was blocked because the color of the selected piece was not changing any more. Also I observed in the very first beginning, that the selected item was also showing active within the list of pieces, but very quick it got inactive (picture 1 + picture 2). When I flip the item it's flipping within 2 controls. I found your changes in the boardcontroler, so I'm sure I've compiled and build the gui with your changes. I would assume that the wrong start button behavior and the other issues are of the same root cause. Seems to me that the controls in the board controler didn't get a change event or are not getting visible or enabled or active or the full screen is not refreshed or something like that.

A view right after the start (one of the blue item control is highlighted): image

After pressing the start button at 08:21:42 the state in the state info didn't change - No message blue to move - I'm able to put a blue item on the board but that is all (the blue item control is not highlighted any more)

image

Afterwards it's not switching to yellow. The item to move is still blue - the move counter shows 1/1 image

Anhalten + Weiter enabled to move a yellow piece, but now it's red to move but still a yellow piece image

The following picture show's the last state I can reach. The piece under the mouse cursor is black now - There is no change after "Anhalten + Weiter".

image

xeruf commented 3 years ago

@MartinRe63 thanks for the details, it looks like the issues are deeper than anticipated. Do you have logs from that?

MartinRe63 commented 3 years ago

Gameserver log enclosed --- I made the pictures during my last run. You can cluster the logs by time. In between 2 blocks I've made the pictures.

I've started at about 8:18 today

Actions - Select for the first player also "Human Player" - Press "Erstellen" Try to play the game with 2 humans at the same screen :)

game_server.log

xeruf commented 3 years ago

Thanks, unfortunately I can't guarantee that this will be fixed anytime soon, though I will try to find the issue within the next week.

However, thanks to your report I have adjusted the behavior of the start/pause-button, it should behave much more sensibly in 21.3.0 (see https://github.com/CAU-Kiel-Tech-Inf/gui/commit/1ed88ce8535ebced0000eb5239bbcb4683a0602e).

MartinRe63 commented 3 years ago

Hi Xerus,

I have here another test and the log information. To my understanding the order of the events is not garanteed. Within the first

move A the order of the events is

  1. New Game State
  2. Human Move Request

with move B

  1. New Game State
  2. Human Move Request
  3. New Game State

with move C

  1. Human Move Request
  2. New Game State
  3. New Game State

The consequence to my understanding is, that the UndeployedPiecesFragment is not changed to red [PENTO_S]. I would assume the "new Game State" event should occure before the "Human Move Request" event.

Conclusion - It seems to me, that a fifo princip is not garanteed for events with the windows implementation. To my understaning the language java itself has no specified concept for the sort order of the event handling. It might also be dependent on the event handling of the operating system.

Therefore the state machine of the game need to ensure, that the event "human move request" cannot not happen before the "new game state event". Game developer cannot assume, that events raised first will also be handled first.

I hope my analysis would help to solve the issue - by the way - this issue also will happen, when I play machine against human. It's taking a little longer before it will happen. I assume this is a timing question.

Without a well working gui it would be a challenge for a lot of students to develop their game engines. Good luck for you to find the bug.

Thx. Martin.

A 22:06:03 DEBUG sc.gui.LobbyManager - lobby: new state for 9abd0131-bb99-4329-9b91-5c692fa465bc A1 22:06:03 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 22:06:03 DEBUG sc.gui.controller.ClientController - ClientController got new update 22:06:03 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/0 -> Farbe Blau (Start Piece: PENTO_S) 22:06:03 DEBUG s.g.c.client.InternalGameHandler - Player Team 1 got new action request! 22:06:03 INFO sc.server.gaming.GameRoom - Started Game(players=[Team 1(Spieler 1), Team 2(Spieler 2)], gameState=GameState 1/0 -> Farbe Blau (Start Piece: PENTO_S)) 22:06:16 DEBUG sc.gui.model.BoardModel - Blocksize changed 16.0 -> 0.0 22:06:19 DEBUG sc.gui.controller.GameController - New game state 22:06:21 DEBUG sc.gui.controller.GameController - Human move request for Farbe Blau - 16 possible moves 22:06:21 DEBUG sc.gui.controller.BoardController - Calculating where pieces can be hovered and placed on the board... 22:06:22 DEBUG sc.gui.view.UndeployedPiecesFragment - Current color BLUE can place [PENTO_S] 22:06:22 DEBUG sc.gui.model.BoardModel - Blocksize changed 0.0 -> 27.5 22:06:25 DEBUG sc.gui.model.BoardModel - Blocksize changed 27.5 -> 24.6 22:06:38 DEBUG sc.gui.view.BoardView - Right-click, flipping piece 22:06:51 DEBUG sc.gui.controller.BoardController - Set-Move from GUI at [0,0] seems valid 22:06:51 INFO sc.framework.plugins.AbstractGame - Time needed for move:47745 B 22:06:51 DEBUG sc.gui.LobbyManager - lobby: new state for 9abd0131-bb99-4329-9b91-5c692fa465bc B1 22:06:51 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 22:06:51 DEBUG sc.gui.controller.ClientController - ClientController got new update 22:06:51 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/1 -> Farbe Gelb (Start Piece: PENTO_S) B2 22:06:51 DEBUG sc.gui.controller.ClientController - game listener: onUpdate B1A 22:06:51 DEBUG sc.gui.controller.GameController - New game state 22:06:51 DEBUG s.g.c.client.InternalGameHandler - Player Team 2 got new action request! 22:06:51 DEBUG sc.gui.controller.ClientController - ClientController got new update 22:06:51 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/1 -> Farbe Gelb (Start Piece: PENTO_S) ? 22:06:51 DEBUG sc.gui.controller.GameController - Human move request for Farbe Gelb - 12 possible moves 22:06:51 DEBUG sc.gui.controller.BoardController - Calculating where pieces can be hovered and placed on the board... 22:06:51 DEBUG sc.gui.view.UndeployedPiecesFragment - Current color YELLOW can place [PENTO_S] B2A 22:06:51 DEBUG sc.gui.controller.GameController - New game state 22:06:51 DEBUG sc.gui.view.UndeployedPiecesFragment - Current color YELLOW can place [] 22:07:03 DEBUG sc.gui.view.GameView - Key pressed ALT 22:07:03 DEBUG sc.gui.view.GameView - Unrecognized key-input 22:18:24 DEBUG sc.gui.controller.BoardController - Set-Move from GUI at [16,0] seems valid 22:18:24 INFO sc.framework.plugins.AbstractGame - Time needed for move:692351 C 22:18:24 DEBUG sc.gui.LobbyManager - lobby: new state for 9abd0131-bb99-4329-9b91-5c692fa465bc C1 22:18:24 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 22:18:24 DEBUG s.g.c.client.InternalGameHandler - Player Team 1 got new action request! 22:18:24 DEBUG sc.gui.controller.ClientController - ClientController got new update 22:18:24 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/2 -> Farbe Rot (Start Piece: PENTO_S) C2 22:18:24 DEBUG sc.gui.controller.ClientController - game listener: onUpdate 22:18:24 DEBUG sc.gui.controller.ClientController - ClientController got new update 22:18:24 DEBUG sc.gui.controller.ClientController - gamestate is GameState 1/2 -> Farbe Rot (Start Piece: PENTO_S) ? 22:18:24 DEBUG sc.gui.controller.GameController - Human move request for Farbe Rot - 8 possible moves 22:18:24 DEBUG sc.gui.controller.BoardController - Calculating where pieces can be hovered and placed on the board... C1A 22:18:24 DEBUG sc.gui.controller.GameController - New game state 22:18:24 DEBUG sc.gui.view.UndeployedPiecesFragment - Current color RED can place [] C2A 22:18:24 DEBUG sc.gui.controller.GameController - New game state 22:18:27 DEBUG sc.gui.view.GameView - Key pressed ALT 22:18:27 DEBUG sc.gui.view.GameView - Unrecognized key-input

MartinRe63 commented 3 years ago

The issues I do have are timing issues. I'm running the game at a network drive. After moving the game to a local drive the issue disappeared. Recommendation -> Don't use this game on network drives. At least store the log file at a local drive. If possible game developer to ensure, that the event "humanMoveRequest" will only be raised after a new game state is handled. Might well be that in other settings the same issue might occur again. I tried to change the source code myself, but I'm not sure how to synchronize the event handling.

xeruf commented 3 years ago

Don't worry, I am re-implementing it in a way that the order doesn't matter anymore.

xeruf commented 3 years ago

Please test this - it's the build from #64 which should finally fix this issue :) https://github.com/CAU-Kiel-Tech-Inf/gui/suites/2130680881/artifacts/43516929