From d725cf79da57bf29d315da4b66f4e30fa7cd0c64 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 14 Jun 2023 21:44:52 -0700 Subject: [PATCH] fixed a server crash bug when an individual player leaves the game without disconnecting --- .efrocachemap | 40 +++++++++---------- CHANGELOG.md | 4 +- src/assets/ba_data/python/baenv.py | 2 +- .../connection/connection_to_client.cc | 2 +- src/ballistica/shared/ballistica.cc | 2 +- 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 6ef65213..8cc23b4c 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4072,26 +4072,26 @@ "build/assets/workspace/ninjafightplug.py": "https://files.ballistica.net/cache/ba1/18/4b/787a9267e17be3c49966072581a5", "build/assets/workspace/onslaughtplug.py": "https://files.ballistica.net/cache/ba1/20/f6/4ce9bc3c1f3732f6adf8237fbe9b", "build/assets/workspace/runaroundplug.py": "https://files.ballistica.net/cache/ba1/a5/30/9058181df0b1255bf6950cbc7813", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/ee/18/9800461f15bf9c26f944db820f99", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/79/98/1815c0c800b700ed814bd54d8539", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/13/81/55bf1fe1ba4c370f11aa830249c1", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/e7/42/9c5f3781dbd7c4233aa58a6dbd79", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/b4/7d/1ead7a1f7b02a444ad74614cf2d8", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/c4/2c/e911ea2fc275f68e3b3dc20285eb", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/34/7f/41ff25e05c51145e9e42f685c8d0", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/61/37/522fbda4977bc99c41e3db4e3d6d", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/47/1e/0222483e6e14c525df20e52d6925", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/69/e1/f004dd0825cfe195f7dd91c94c52", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/c8/f0/689033ddbd7b4295b012876230bc", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/92/82/fde09a67a64139dbe062886a3e51", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/c3/93/1b4cb190dc47b92076397b516d05", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/c8/23/d67002d921117eb97815b640963c", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/1b/39/88e5e58c2a55a6add3c725b13e38", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/4e/64/47f68fce72d99f078a8910f2d2df", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/ad/0d/140004fa81f86dc7a13d5918d3ea", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/7c/0f/6fd3c70161a02ab59850d6133ceb", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/ce/2f/f0aac3452c8af1863014e8cc48b4", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/e4/f3/36997cd6a2014ec238273cf357c2", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/1e/dc/97e852e2bd553825887ae9852756", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/54/0c/cf1fc5786cd44bf50ef116e053c2", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/15/b2/0fd773bb3bf55249e87360edcb61", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/19/43/2aa331c03048ce000662de5713f1", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/1a/bc/48fb516727c8774640794b5c345c", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/de/da/6b4057aa7f583ef6a1f79bbdbdd6", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/13/6d/0d13fe395db109730e9f48c84e53", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7a/b4/98a5e5ed423107e3aca585cea6a9", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/36/f2/6127c27e229de21395fbe6ca3dbe", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/fe/bb/67e0a6b2b9b5f65b1521df2e977b", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/2a/62/a298f381499bbb60131db027c0bd", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/a8/ed/6ac901d41db9709042e0e1ec0c31", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/93/c5/dc0b4a2031435986ddf853e1f36f", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/1b/39/6acfd7fcd05139612ea277ce315e", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/53/b3/d8df1a3269ea4c7a9254b3f6d5e7", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/bc/46/d6c92388b06f42c7df1e20df72d9", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/4f/0f/6344b046dfee6ed0ba404fd102bd", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/88/a9/b49c302ced5e4d7463597a4bddab", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/0e/be/e62bb97312b709ba28e1a3017e20", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/91/3f/5594522e68d039e3113ebd61e458", "build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/d9/56/b0a16db98621500b473844ec39d6", "build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/57/f9/f304c67d9958574b6b35de2ad13d", "build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/04/55/a41ad832c081ff421039827d16c1", diff --git a/CHANGELOG.md b/CHANGELOG.md index c52595fe..896a997e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.20 (build 21110, api 8, 2023-06-14) +### 1.7.20 (build 21112, api 8, 2023-06-14) - This seems like a good time for a `refactoring` release in anticipation of changes coming in 1.8. Basically this means that a lot of things will be @@ -327,6 +327,8 @@ This should fix the issue where 1.7.20 servers would have 100ms of lag by default. Server performance should now be equal to or better than 1.7.19. Please holler if not. +- (build 21111) Fixed a server crash when an individual client player leaves the + game but doesn't disconnect from the server. ### 1.7.19 (build 20997, api 7, 2023-01-19) diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 3406bb1e..af04bb4f 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -28,7 +28,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21110 +TARGET_BALLISTICA_BUILD = 21112 TARGET_BALLISTICA_VERSION = '1.7.20' _g_env_config: EnvConfig | None = None diff --git a/src/ballistica/scene_v1/connection/connection_to_client.cc b/src/ballistica/scene_v1/connection/connection_to_client.cc index 5bb9ba75..2fcda718 100644 --- a/src/ballistica/scene_v1/connection/connection_to_client.cc +++ b/src/ballistica/scene_v1/connection/connection_to_client.cc @@ -616,7 +616,7 @@ void ConnectionToClient::HandleMessagePacket( dynamic_cast(&cid->delegate())) { if (Player* player = cid_delegate->GetPlayer()) { HostSession* host_session = player->GetHostSession(); - if (host_session) { + if (!host_session) { throw Exception("Player's host-session not found"); } host_session->RemovePlayer(player); diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index d77a3826..cf23ce19 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21110; +const int kEngineBuildNumber = 21112; const char* kEngineVersion = "1.7.20"; auto MonolithicMain(const core::CoreConfig& core_config) -> int {