-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly handle invalid cvar replications without blocking netmessage #408
Conversation
entirely and restore ns_server_name replication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't work in testing.
In particular, with this PR I could join a random just fine but hosting a (Windows) dedi an having someone on v1.12.0
join did not work. They got stuck in loading screen with no error message or anything in logs.
To reproduce:
- Host dedi with this PR
- Have someone on
v1.12.0
join said dedi server - They should now be stuck in eternal loading screen.
EDIT: Relevant sections from log from client that couldn't join. They had to kill Northstar via taskmanager
[23:32:36] [NORTHSTAR] [info] Requesting server list from https://northstar.tf
[23:32:36] [NORTHSTAR] [info] Got 144 servers
[23:32:38] [NORTHSTAR] [info] Attempting to register the local server to the master server.
[23:32:41] [SCRIPT UI] [info] trying to authenticate with server Temp Testing server with password
[23:32:42] [NORTHSTAR] [info] Attempting authentication with server of id "d1af1dec8e680450ced0c08edf6f9782"
[23:32:42] [SCRIPT UI] [info] Showing user info for UID 0 on hardware
[23:32:42] [SCRIPT UI] [info] Showing user info for UID 0 on hardware
[23:32:42] [SCRIPT UI] [info] Showing user info for UID 0 on hardware
[23:32:42] [SCRIPT UI] [info] UICodeCallback_LevelShutdown: mp_lobby
[23:32:42] [SCRIPT UI] [info] Hiding all matchmaking elems due to UpdateMatchmakingStatus thread ending
[23:32:42] [SCRIPT UI] [info] menu_ServerBrowserMenu menu closed
[23:32:42] [SCRIPT UI] [info] menu_LobbyMenu menu closed
[23:32:42] [SCRIPT UI] [info] menu_MainMenu menu opened
[23:32:42] [SCRIPT UI] [info] =========== Show: MainMenuPanel ===========
[23:32:42] [SCRIPT UI] [info] SAVEGAME try is valid savegame
[23:32:42] [SCRIPT UI] [info] SAVEGAME is valid savegame
[23:32:42] [NORTHSTAR] [info] DestroyVM CLIENT 0x2035401e400
[23:32:42] [SCRIPT UI] [info] UICodeCallback_LevelLoadingStarted:
[23:32:42] [NORTHSTAR] [info] HostState: GameShutdown
[23:32:42] [NORTHSTAR] [info] Player eRaid_oPlaiN disconnected: "Game Shutting Down"
[23:32:42] [NORTHSTAR] [info] Player eRaid_oPlaiN disconnected: "Game Shutting Down"
[23:32:42] [NORTHSTAR] [warning] attempted to write pdata of size 0!
[23:32:42] [NATIVE SV] [info] CVScriptGameSystem::LevelShutdownPreEntity()
[23:32:42] [NORTHSTAR] [info] DestroyVM SERVER 0x2034a3d4600
[23:32:43] [RPAK_FSYS] [info] LoadPakAsync mp_forwardbase_kodai_loadscreen.rpak 209
[23:32:43] [RPAK_FSYS] [info] LoadStreamPak: pc_all.starpak
[23:32:43] [SCRIPT UI] [info] UICodeCallback_UpdateLoadingLevelName: mp_forwardbase_kodai
[23:32:43] [FILESYSTM] [info] MountVPK vpk/client_mp_forwardbase_kodai.bsp
[23:32:43] [NORTHSTAR] [info] Set playlist to tdm
[23:32:43] [NORTHSTAR] [info]
R2
Map: mp_forwardbase_kodai
Players: 2 (0 bots) / 16 humans
Build: 6968
Server Number: 2
[23:32:43] [SCRIPT UI] [info] UICodeCallback_UpdateLoadingLevelName: mp_forwardbase_kodai
[23:32:43] [RPAK_FSYS] [info] LoadPakAsync mp_forwardbase_kodai.rpak 210
[23:32:43] [RPAK_FSYS] [info] LoadStreamPak: pc_all.starpak
[23:32:43] [RPAK_FSYS] [info] LoadStreamPak: pc_all(04).starpak
[23:32:43] [RPAK_FSYS] [info] LoadStreamPak: pc_all(06).starpak
[23:32:47] [NORTHSTAR] [error] ExploitFixes.cpp: NET_SetConVar (client): Blocked dangerous/invalid msg: Invalid flags (0x4), var is ns_server_desc
[23:32:48] [NORTHSTAR] [error] Failed reading masterserver response: got fastify error response
[23:32:48] [NORTHSTAR] [error] {"error":{"enum":"NO_GAMESERVER_RESPONSE","msg":"Couldn't reach game server: failed to connect to auth port: request timed out"},"request_id":"cfdeh193ngoqhtcdte2g","success":false}
[23:33:55] [NORTHSTAR] [info] HostState: GameShutdown
[23:33:55] [NORTHSTAR] [warning] ServerAuthenticationManager::StopPlayerAuthServer was called while m_bRunningPlayerAuthThread is false
[23:33:55] [NATIVE SV] [info] CVScriptGameSystem::LevelShutdownPreEntity()
[23:33:55] [NORTHSTAR] [info] Set playlist to tdm
[23:33:55] [SCRIPT UI] [info] UICodeCallback_LevelLoadingFinished: (false)
[23:33:55] [SCRIPT UI] [info] UICodeCallback_ActivateMenus: menu_MainMenu
[23:33:55] [SCRIPT UI] [info] UICodeCallback_ActivateMenus: menu_MainMenu
[23:33:55] [NORTHSTAR] [info] DestroyVM UI 0x2034abc0300
Also, going back to v1.12.0
on dedi and retrying client joining worked just fine so issue seems to be with PR.
re-requesting review as previous testing didn't properly test pr |
Will take another look once I'm back in a few days. If anyone else is able to do it earlier, feel free to do so and leave a review. ^^ Either way with this merged we'd probably have to version gate again to prevent breakage. so not sure when the best time to merge/release it is. |
(closing was miss-click, sorry >.<) |
Uh what was the best way to test this again? ^^" Given that it breaks compat with older clients? EDIT: New convar (or mod existing) on both client and server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, Gecko's testing should still also be valid I think?
Dunno if this can be merged, but it can't be updated to main because of branch protection rules. |
Thanks for the heads-up. I got enough perms so I updated it now ^^ |
Also sorta issue with this PR is that it's incompatible with previous versions so it requires a version gate. |
Resolves the merge conflicts for #408
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was running this branch with a friend for a week or so with no issues :)
hopefully this will get merged soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retested rn and no breaking change to older servers which is awesome :D
No clue why it broke when I tested before.
Code review was done by others earlier before already.
…R2Northstar#408) Properly handle invalid cvar replications without blocking netmessage entirely and restore `ns_server_name` replication
Reimplements
ns_server_name
andns_server_desc
replication without causing issues on clients that do not have the change locally, and prevents bad replicated cvars from breaking client connect