Opened 9 years ago
Last modified 6 years ago
#3199 closed defect
Clicking "not ready" just before the host starts the game causes a network fsm error — at Version 9
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 22 |
Component: | Network | Keywords: | |
Cc: | Patch: |
Description (last modified by )
Sometimes I noticed this error while the game loads:
ERROR: Net client: Error running FSM update (type=7 state=6)
Searching for this error message revealed that it occurs in source/network/NetClient.cpp in the function CNetClient::HandleMessage when updating the finite state machine:
// Update FSM bool ok = Update(message->GetType(), message); if (!ok) LOGERROR("Net client: Error running FSM update (type=%d state=%d)", (int)message->GetType(), (int)GetCurrState()); return ok;
As this annotated excerpt from source/network/NetMessages.h shows, NetMessageType 7 is NMT_READY:
enum NetMessageType { NMT_CONNECT_COMPLETE = -256, // Connection is complete NMT_CONNECTION_LOST, NMT_INVALID = 0, // Invalid message NMT_SERVER_HANDSHAKE = 1, // Handshake stage NMT_CLIENT_HANDSHAKE = 2, NMT_SERVER_HANDSHAKE_RESPONSE = 3, NMT_AUTHENTICATE = 4, // Authentication stage NMT_AUTHENTICATE_RESULT = 5, NMT_CHAT = 6, // Common chat message NMT_READY = 7, NMT_GAME_SETUP = 8, NMT_PLAYER_ASSIGNMENT = 9, NMT_FILE_TRANSFER_REQUEST = 10, NMT_FILE_TRANSFER_RESPONSE = 11, NMT_FILE_TRANSFER_DATA = 12, NMT_FILE_TRANSFER_ACK = 13, NMT_JOIN_SYNC_START = 14, NMT_REJOINED = 15, NMT_LOADED_GAME = 16, NMT_GAME_START = 17, NMT_END_COMMAND_BATCH = 18, NMT_SYNC_CHECK = 19, // OOS-detection hash checking NMT_SYNC_ERROR= 20, // OOS-detection error NMT_SIMULATION_COMMAND = 21, NMT_LAST = 22 // Last message in the list };
and source/network/NetClient.h indicates that state=6 means that the game is loading.
// NetClient session FSM states enum { NCS_UNCONNECTED = 0, NCS_CONNECT = 1, NCS_HANDSHAKE = 2 , NCS_AUTHENTICATE = 3, NCS_INITIAL_GAMESETUP = 4, NCS_PREGAME = 5, NCS_LOADING = 6, NCS_JOIN_SYNCING = 7, NCS_INGAME = 8 };
I.e. the host receives a not-ready message while the game has already been started.
It is not easily reproducable because of the timing, but after doing this research I could reproduce it by accident in a real game. (Clicked not-ready just before the host started. It didn't have any effect besides throwing this error)
This error occurs for ALL clients (another player in the game had received the same error in the same game), which means that the ready message is being broadcasted. Maybe the message is even broadcasted while the fsm of the host is already in the NCS_LOADING state. If so, don't broadcast ready messages while loading in order to fix the error.
Change History (9)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
And this one when the game was started. Everyone except one client had finished the loading screen and started chatting. That one person must have been disconnected while loading the game. In the chat it was displayed that he disconnected.
This error appeared:
ERROR: Net client: Error running FSM update (type=20 state=6)
As far as I can see NCS_LOADING = 6 and type 20 = NMT_SYNC_ERROR OOS-detection error.
comment:3 by , 9 years ago
Description: | modified (diff) |
---|
This one happened again, in a real match this time:
ERROR: Net server: Error running FSM update (type=17 state=3)
According to the error, a player was trying to reconnect while the game was loading. He was never seen again. I think it might be caused by a faulty player assignment (two players being assigned to the same slot and disconnecting one of them). Don't have hard facts on that yet though.
comment:5 by , 8 years ago
Occasionally experiencing this on svn (r18174) (not sure if it applies to a20 too). Not sure if it was the client or server (looks like handshake being received while not being connected / disconnected)
ERROR: Net server: Error running FSM update (type=2 state=0)
comment:7 by , 7 years ago
(type=2 state=0)
occurs when someone with an outdated protocol version tries to join, moved to #4524
comment:9 by , 6 years ago
Description: | modified (diff) |
---|
Got this one with alpha 23:
ERROR: Net server: Error running FSM update (type=25 state=5)
I also got this one when quitting the host while loading the game (No clients besides the host, i.e. 1 player + 1 unassigned playerslot).