From 0cad87ae1d36a92784c09bd122b1fa3d6730d21c Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 1 Dec 2022 14:40:46 -0800 Subject: [PATCH] minor bug fixes and polishing --- .efrocachemap | 108 ++++++++--------- CHANGELOG.md | 3 +- assets/.asset_manifest_public.json | 2 + assets/Makefile | 2 + assets/src/ba_data/python/ba/_accountv2.py | 30 +++-- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- assets/src/ba_data/python/ba/_login.py | 12 +- .../python/bastd/ui/account/settings.py | 9 +- .../src/ba_data/python/bastd/ui/v2upgrade.py | 111 ++++++++++++++++++ src/ballistica/ballistica.cc | 2 +- src/ballistica/core/thread.cc | 37 ++++-- src/ballistica/core/thread.h | 3 +- 12 files changed, 236 insertions(+), 85 deletions(-) create mode 100644 assets/src/ba_data/python/bastd/ui/v2upgrade.py diff --git a/.efrocachemap b/.efrocachemap index 8f0e8722..a7a574be 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -420,39 +420,39 @@ "assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/60/ad/38269b7f1c7dc20cb9a506cd0681", "assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/72/85/d6fc4d16b7081d91fba2850b5b10", "assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/e9/ae/1d674d0c086eaa0bd1c3b1db0505", - "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/c1/58/545feb14ab42361ee0eacce7a1e7", + "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/46/74/5bd691984b02c1fe036445eb5361", "assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/b0/05/e530acaba539f040ce61e22561dc", "assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/61/03/89070ca765e06da3a419a579f503", - "assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/05/87/d3e03edbc59eb7e7da7ef8b17134", - "assets/build/ba_data/data/languages/chinesetraditional.json": "https://files.ballistica.net/cache/ba1/12/12/b39bec3a244399223b45f084e0b2", + "assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/d3/84/5e7df03070af059070ad1bd93cee", + "assets/build/ba_data/data/languages/chinesetraditional.json": "https://files.ballistica.net/cache/ba1/c2/a4/993d5f0f30d0670d7053466929b6", "assets/build/ba_data/data/languages/croatian.json": "https://files.ballistica.net/cache/ba1/c9/73/01a1343af814131b1ee96af0b687", "assets/build/ba_data/data/languages/czech.json": "https://files.ballistica.net/cache/ba1/cb/df/f2d54d3146a159c678a47d3ff01b", "assets/build/ba_data/data/languages/danish.json": "https://files.ballistica.net/cache/ba1/6a/fa/fcf4a804beaff927b0f12c179eaa", "assets/build/ba_data/data/languages/dutch.json": "https://files.ballistica.net/cache/ba1/68/93/da8e9874f41a786edf52ba4ccaad", - "assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/52/2a/3e6272799aba12af878dfd2eea15", + "assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/91/8c/67fb1ca2b8f256f133950b41ba2c", "assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/ac/f5/c0922a99e40dfc9f5e026d43b533", "assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/86/26/060476f46994c035ae0d52640657", "assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/c7/cf/35a6ebc876c7476b72547a914d07", "assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/06/58/071d6f7bbb5e93a3e074dbd323ae", - "assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/e7/f2/9cf56bec9e4312c7b547e42477ea", + "assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/45/e1/32cc8660b71d3d6b5fe1faff694d", "assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/ae/89/47486b987d14f58b6cf2d665ce4b", "assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/9f/df/469e166c6a0d42bca4baae3a6cb6", "assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/b2/81/53c8cd7617d649403e539c3a6171", - "assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/ae/64/97ed10eed5f31b33864d90368330", + "assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/18/36/799b6271fe8cb0e73b2eabb7f400", "assets/build/ba_data/data/languages/italian.json": "https://files.ballistica.net/cache/ba1/5f/b2/b9301d67bef699a092a4c04dd522", "assets/build/ba_data/data/languages/korean.json": "https://files.ballistica.net/cache/ba1/7c/38/d4a44c481757d355836f292ede48", "assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/cd/ed/4d6d0778d256ccc0ff2e27b970c6", "assets/build/ba_data/data/languages/polish.json": "https://files.ballistica.net/cache/ba1/67/93/372c2a2428a830056e9ba22bbf95", - "assets/build/ba_data/data/languages/portuguese.json": "https://files.ballistica.net/cache/ba1/01/6f/516598d76c29b2fa45ff351426dc", + "assets/build/ba_data/data/languages/portuguese.json": "https://files.ballistica.net/cache/ba1/c5/d4/f933bd3d80ded2b6ac2ea1af6eb2", "assets/build/ba_data/data/languages/romanian.json": "https://files.ballistica.net/cache/ba1/d7/06/9d70642d0a4d1e3b1c2149d7a17c", - "assets/build/ba_data/data/languages/russian.json": "https://files.ballistica.net/cache/ba1/05/fb/a05a110238d0da5f902d06e5daa7", + "assets/build/ba_data/data/languages/russian.json": "https://files.ballistica.net/cache/ba1/6e/c3/df824198c6fe2da6ace053d30641", "assets/build/ba_data/data/languages/serbian.json": "https://files.ballistica.net/cache/ba1/4e/91/6f2a9a3ce733908e91377a6ddb9a", "assets/build/ba_data/data/languages/slovak.json": "https://files.ballistica.net/cache/ba1/20/a9/163d189884edf802636bf291e432", - "assets/build/ba_data/data/languages/spanish.json": "https://files.ballistica.net/cache/ba1/c9/48/63093604be4e04447974b9e6337d", + "assets/build/ba_data/data/languages/spanish.json": "https://files.ballistica.net/cache/ba1/6d/b7/dfc80f923378a408010cf4ee627a", "assets/build/ba_data/data/languages/swedish.json": "https://files.ballistica.net/cache/ba1/91/0a/35c4baf539d5951fc03a794c0e0b", "assets/build/ba_data/data/languages/tamil.json": "https://files.ballistica.net/cache/ba1/2b/25/aa93983666b88d1c584f06b742b0", "assets/build/ba_data/data/languages/thai.json": "https://files.ballistica.net/cache/ba1/f7/df/7ba5f99c5c2c4c86fc0503fcf0b7", - "assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/bb/f5/0eb74375f3c9ea827b73c67f4a25", + "assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/b5/e8/606f6d3dc1f4bffc96128abaef03", "assets/build/ba_data/data/languages/ukrainian.json": "https://files.ballistica.net/cache/ba1/1b/83/844f9e6f4e9e47a2d788d3faa9d2", "assets/build/ba_data/data/languages/venetian.json": "https://files.ballistica.net/cache/ba1/17/15/973f4101bf2264173bd1c1729426", "assets/build/ba_data/data/languages/vietnamese.json": "https://files.ballistica.net/cache/ba1/1f/ae/abe3f105b3c4b51f6b7942773305", @@ -4003,50 +4003,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/1c/77/ac670a5118abdf8a7687af0e159b", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/08/44/a5f87c9250077aaa171cea27db18", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/e1/938043bce1342a4166964c55931f", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/29/dd/0468d50927fc6b2e407328f91956", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/49/f4/cc2b8ad8725827b569272148f6b7", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/26/12/e5cb20be2bab9833b1f1d848d9fb", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f1/bd/c86f032265760dc16606f3778a2d", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/58/f6/9864b4ab5bbad1f1610d03028f1b", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fb/a3/d547e96bd36ce3d3d4b8af9b782d", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/af/74/f32e207555fe7a4c24c798aa295d", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cb/d4/b160011cc796371010241a38b859", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/05/bd94b7d8854b18bf603823d08589", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/16/f8/80de6f8f602cac3a65cff1362011", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/30/34/4e940a7f4b569deb69a65e275334", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fb/95/e848148af57de2607e4961612a29", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9a/4d/5fe0983397557b61673124ec7237", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2b/aa/6c86d675fbd55004e7a494a5d194", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/87/1b/f28c7759ca1664903bcb58f47c48", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/31/c0/21f4c6d231bd31d38c0015c5949a", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/93/60/22f3159334837527f5349657be51", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/df/2f/a371987b1d72aecf0197de973f8d", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c1/71/ff78dcc2d1079c1befb3909f88b6", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/14/aa/d9e350323ed97ca2c87667c569bb", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c1/cc/f5ed9c6f03949851eaa5d2cd7aeb", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/52/2a/31fb94be0f4f5e9ded5a100e298d", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/9f/7287e695504ed86e890d5472935e", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/41/6b/175b26bc4b4429aac713d4cc3c20", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2e/7b/a1cd21de67736957e7b2f7550b6f", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/bb/51740409b1cf442d8beed60f759c", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/55/87/933974be0293a51749aa38afb90c", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/44/66/a2d065477f9677a2b869c5ebc0a9", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a8/f7/4bbfc5478309ad97d056ba16f8d0", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/26/94/73a12ae50fe3750547ce218f3857", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b1/ff/d2d2fc01c67baac72281783d38d6", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9d/ac/b2dd3b8a8b231210f19b0ec30299", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3e/37/1926c5062ca3589cf1d7c49bebff", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9e/f7/cadeae6e408cabe57d9e1cf782d6", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/92/71/0e497882534506d4636784f83e41", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/65/87/f08f5ba3e4e91cc1bba8eb135c08", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/9d/80/5b8bbe6321375a34b2e42a07c603", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/77/2a/84887c5ed3a5b427a3cbd928e5f0", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/15/8b/8b1a60b721c13d693f8beec3c707", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/08/65/feb0f30e3f4bcdfa0576cededab1", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/b9/21/6a24928df840f9881a91469b07cc", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e0/36/952c3f268d5d2ddb8b1acf83436e", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/cf/52/f613c9b0d400e6a3cc46d1b10243", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a2/a1/9bfcb44eed26b64ee45c10e71ebf", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e4/6a/b6828e87838c864910769e10b082", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/15/1b/4b88f866b595f9aee3589fe61f22", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b3/bd/61195ab2b707b27ced0b88aab751", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3f/5f/15a89a2c8aabd42d6fd990dcef61", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e1/a7/5c1fbf021cca742d3835b1b9ded8", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1f/0d/b7ce6c28626235b46ed2f3b90d40", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4d/67/34b91ed9e0236b4a5d5bfd72dfa9", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/bf/4a/e071a870261746f96a76f6dbb3c6", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/00/78/253923b1d2bd27fac67351eb06cd", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/8d/f11ab9ad9ebf7512c5b7d8b35a6f", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/38/bf/edf22880968b719327db7d8dd998", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/09/bf/758bd310a00cb749657149580e81", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9c/95/5b9f366fff40806b7ee2062f7050", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/24/a7/35eb9753ebaa9e41bc87e8f27dc3", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ab/c6/1b1576f9d2f767815f7519353bd4", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5a/d4/d2896f57e07ee1cbb43877c174cd", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/30/e9/d0dbf1bf4886264f9fc51b54e419", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/dc/62/a75c243384728a69acfb273e91f7", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1b/bc/4d8cc7c9807c8b7a02d67de95dba", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/10/e6/ccd40f2a83735c5da9193333cbf1", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/eb/3e/91f24852fb1766c9cf273e0952a6", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6f/64/c1cb80d0f007af1e7a7386281fc2", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/12/e5/ed36f54413a114c8d0762c2f57b1", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2c/8c/1597a2fe945c36e76c375fa5e412", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ce/28/61941473817cd934b21cc8447f4d", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/18/e3/01ee52c5bb52687324ecd3bb3f78", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3d/85/62176cf03dd0be0e11ec6ed56230", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cf/62/7587a846e73295a7e12c66d0e19c", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ff/43/3ff93b30de352362dde3a173db18", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5e/15/0279dbe76b979d494d69c03b0527", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/20/e6/7f97b816171100873578dfebc237", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/da/75/32d072333f57926ed2b649b01543", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/17/c2/e334283a230cfe50e5d4da8c02d4", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c4/41/6a346833e2193a05b339d596f3dc", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/62/4a/87bc0017df139dbbc0195be774f5", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/fd/44/5db285cf7fd3301cd46f944dab6d", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/2f/09/dedf1229e5fa5ab73cea4b8b575b", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/c8/3e/7f3ce434876f2992a4043f398073", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ed/a7/2088ab8e7e0ceb2ea768370bb464", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/03/51/0d6c5b45b326d2d7d069f8b371fc", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/77/fe/4f0d3a4ac3f71e4b214c5c5e4cc9", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/42/ef/e9b23bd9661675f6a9ec2bd7745d", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/25/77/8093dfffddaa80cd513ddaa61867", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02", "src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd" diff --git a/CHANGELOG.md b/CHANGELOG.md index 48347e44..23388791 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.14 (build 20944, api 7, 2022-11-29) +### 1.7.14 (build 20956, api 7, 2022-12-01) - Android Google Play logins now provide V2 accounts with access to all V2 features such as a globally-unique account tag, cloud-console, and workspaces. They should still retain their V1 data as well. - V2 accounts now have a 'Manage Account' button in the app account window which will sign you into a browser with your current account. - Removed Google App Invite functionality which has been deprecated for a while now. Google Play users can still get tickets by sharing the app via codes (same as other platforms). @@ -12,6 +12,7 @@ - Added `ba.internal.dump_tracebacks()` which can be used to dump the stack state of all Python threads after some delay. Useful for debugging deadlock; just call right before said deadlock occurs. Results will be logged on the next app launch if they cannot be immediately. - Fixed a low level event-loop issue that in some cases was preventing the Android version from properly pausing/resuming the app or managing connections while in the background. If you look at the devices section on ballistica.net you should now see your device disappear when you background the app and reappear when you foreground it. Please holler if not. - Device accounts are now marked as deprecated, and signing in with one now brings up an 'upgrade' UI which allows converting it to a V2 account. It is my hope to push the entire client ecosystem to V2 accounts as quickly as possible since trying to support both independent V1 accounts and V2 accounts is a substantial technical burden. +- Fixed an issue where Log calls made within `Thread::PushThreadMessage()` could result in deadlock. ### 1.7.13 (build 20919, api 7, 2022-11-03) - Android target-sdk has been updated to 33 (Android 13). Please holler if anything seems broken or is behaving differently than before on Android. diff --git a/assets/.asset_manifest_public.json b/assets/.asset_manifest_public.json index d6172785..895eda83 100644 --- a/assets/.asset_manifest_public.json +++ b/assets/.asset_manifest_public.json @@ -356,6 +356,7 @@ "ba_data/python/bastd/ui/__pycache__/tournamentscores.cpython-310.opt-1.pyc", "ba_data/python/bastd/ui/__pycache__/trophies.cpython-310.opt-1.pyc", "ba_data/python/bastd/ui/__pycache__/url.cpython-310.opt-1.pyc", + "ba_data/python/bastd/ui/__pycache__/v2upgrade.cpython-310.opt-1.pyc", "ba_data/python/bastd/ui/__pycache__/watch.cpython-310.opt-1.pyc", "ba_data/python/bastd/ui/account/__init__.py", "ba_data/python/bastd/ui/account/__pycache__/__init__.cpython-310.opt-1.pyc", @@ -514,6 +515,7 @@ "ba_data/python/bastd/ui/tournamentscores.py", "ba_data/python/bastd/ui/trophies.py", "ba_data/python/bastd/ui/url.py", + "ba_data/python/bastd/ui/v2upgrade.py", "ba_data/python/bastd/ui/watch.py", "ba_data/python/efro/__init__.py", "ba_data/python/efro/__pycache__/__init__.cpython-310.opt-1.pyc", diff --git a/assets/Makefile b/assets/Makefile index 63833361..e764adfc 100644 --- a/assets/Makefile +++ b/assets/Makefile @@ -381,6 +381,7 @@ SCRIPT_TARGETS_PY_PUBLIC = \ build/ba_data/python/bastd/ui/tournamentscores.py \ build/ba_data/python/bastd/ui/trophies.py \ build/ba_data/python/bastd/ui/url.py \ + build/ba_data/python/bastd/ui/v2upgrade.py \ build/ba_data/python/bastd/ui/watch.py \ build/server/ballisticacore_server.py @@ -633,6 +634,7 @@ SCRIPT_TARGETS_PYC_PUBLIC = \ build/ba_data/python/bastd/ui/__pycache__/tournamentscores.cpython-310.opt-1.pyc \ build/ba_data/python/bastd/ui/__pycache__/trophies.cpython-310.opt-1.pyc \ build/ba_data/python/bastd/ui/__pycache__/url.cpython-310.opt-1.pyc \ + build/ba_data/python/bastd/ui/__pycache__/v2upgrade.cpython-310.opt-1.pyc \ build/ba_data/python/bastd/ui/__pycache__/watch.cpython-310.opt-1.pyc \ build/server/__pycache__/ballisticacore_server.cpython-310.opt-1.pyc diff --git a/assets/src/ba_data/python/ba/_accountv2.py b/assets/src/ba_data/python/ba/_accountv2.py index 58d78149..f5fee480 100644 --- a/assets/src/ba_data/python/ba/_accountv2.py +++ b/assets/src/ba_data/python/ba/_accountv2.py @@ -9,6 +9,7 @@ import logging from typing import TYPE_CHECKING from efro.call import tpartial +from efro.error import CommunicationError from bacommon.login import LoginType import _ba @@ -336,18 +337,27 @@ class AccountV2Subsystem: del adapter # Unused. - # Make some noise on errors since the user knows a sign-in - # attempt is happening in this case. + # Make some noise on errors since the user knows + # a sign-in attempt is happening in this case. if isinstance(result, Exception): - logging.warning( - 'Error on explicit accountv2 sign in attempt.', exc_info=result - ) + # We expect the occasional communication errors; + # Log a full exception for anything else though. + if not isinstance(result, CommunicationError): + logging.warning( + 'Error on explicit accountv2 sign in attempt.', + exc_info=result, + ) with _ba.Context('ui'): _ba.screenmessage( Lstr(resource='internal.signInErrorText'), color=(1, 0, 0), ) _ba.playsound(_ba.getsound('error')) + + # Also I suppose we should sign them out in this case since + # it could be misleading to be still signed in with the old + # account. + _ba.app.accounts_v2.set_primary_credentials(None) return _ba.app.accounts_v2.set_primary_credentials(result.credentials) @@ -365,9 +375,13 @@ class AccountV2Subsystem: # Log errors but don't inform the user; they're not aware of this # attempt and ignorance is bliss. if isinstance(result, Exception): - logging.warning( - 'Error on implicit accountv2 sign in attempt.', exc_info=result - ) + # We expect the occasional communication errors; + # Log a full exception for anything else though. + if not isinstance(result, CommunicationError): + logging.warning( + 'Error on implicit accountv2 sign in attempt.', + exc_info=result, + ) return # If we're still connected and still not signed in, diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index f877b79c..9d058ae7 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -47,7 +47,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20944 + expected_build = 20956 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/assets/src/ba_data/python/ba/_login.py b/assets/src/ba_data/python/ba/_login.py index 6e95216e..0ca4098e 100644 --- a/assets/src/ba_data/python/ba/_login.py +++ b/assets/src/ba_data/python/ba/_login.py @@ -174,7 +174,7 @@ class LoginAdapter: Call( result_cb, self, - RuntimeError('fetch-sign-in-token failed'), + RuntimeError('fetch-sign-in-token failed.'), ) ) return @@ -192,7 +192,6 @@ class LoginAdapter: def _got_sign_in_response( response: bacommon.cloud.SignInResponse | Exception, ) -> None: - # from ba._language import Lstr if isinstance(response, Exception): if DEBUG_LOG: @@ -202,10 +201,6 @@ class LoginAdapter: self.login_type.name, response, ) - # _ba.screenmessage( - # Lstr(resource='errorText'), color=(1, 0, 0) - # ) - # _ba.playsound(_ba.getsound('error')) _ba.pushcall(Call(result_cb, self, response)) else: if DEBUG_LOG: @@ -216,7 +211,10 @@ class LoginAdapter: ) if response.credentials is None: result2: LoginAdapter.SignInResult | Exception = ( - RuntimeError('No credentials returned.') + RuntimeError( + 'No credentials returned after' + ' submitting sign-in-token.' + ) ) else: result2 = self.SignInResult( diff --git a/assets/src/ba_data/python/bastd/ui/account/settings.py b/assets/src/ba_data/python/bastd/ui/account/settings.py index 7053b757..04d17a36 100644 --- a/assets/src/ba_data/python/bastd/ui/account/settings.py +++ b/assets/src/ba_data/python/bastd/ui/account/settings.py @@ -1118,8 +1118,7 @@ class AccountSettingsWindow(ba.Window): ) def _on_what_is_v2_press(self) -> None: - bamasteraddr = ba.internal.get_master_server_address(version=2) - ba.open_url(f'{bamasteraddr}/whatisv2') + show_what_is_v2_page() def _on_manage_account_press(self) -> None: ba.screenmessage(ba.Lstr(resource='oneMomentText')) @@ -1495,3 +1494,9 @@ class AccountSettingsWindow(ba.Window): ba.containerwidget(edit=self._root_widget, selected_child=sel) except Exception: ba.print_exception(f'Error restoring state for {self}.') + + +def show_what_is_v2_page() -> None: + """Show the webpage describing V2 accounts.""" + bamasteraddr = ba.internal.get_master_server_address(version=2) + ba.open_url(f'{bamasteraddr}/whatisv2') diff --git a/assets/src/ba_data/python/bastd/ui/v2upgrade.py b/assets/src/ba_data/python/bastd/ui/v2upgrade.py new file mode 100644 index 00000000..ed61e170 --- /dev/null +++ b/assets/src/ba_data/python/bastd/ui/v2upgrade.py @@ -0,0 +1,111 @@ +# Released under the MIT License. See LICENSE for details. +# +"""UI for upgrading V1 accounts to V2.""" + +from __future__ import annotations + +import ba +import ba.internal + + +class V2UpgradeWindow(ba.Window): + """A window presenting a URL to the user visually.""" + + def __init__(self, login_name: str, code: str): + from bastd.ui.account.settings import show_what_is_v2_page + + app = ba.app + uiscale = app.ui.uiscale + + self._code = code + + self._width = 700 + self._height = 270 + super().__init__( + root_widget=ba.containerwidget( + size=(self._width, self._height + 40), + transition='in_right', + scale=( + 1.25 + if uiscale is ba.UIScale.SMALL + else 1.25 + if uiscale is ba.UIScale.MEDIUM + else 1.25 + ), + ) + ) + ba.playsound(ba.getsound('error')) + + ba.textwidget( + parent=self._root_widget, + position=(self._width * 0.5, self._height - 46), + size=(0, 0), + color=ba.app.ui.title_color, + h_align='center', + v_align='center', + text=ba.Lstr( + resource='deviceAccountUpgradeText', + subs=[('${NAME}', login_name)], + ), + maxwidth=self._width * 0.95, + ) + ba.textwidget( + parent=self._root_widget, + position=(self._width * 0.5, 125), + size=(0, 0), + scale=0.8, + color=(0.7, 0.8, 0.7), + h_align='center', + v_align='center', + text=( + ba.charstr(ba.SpecialChar.LOCAL_ACCOUNT) + + login_name + + ' ----> ' + + ba.charstr(ba.SpecialChar.V2_LOGO) + + login_name + ), + maxwidth=self._width * 0.95, + ) + button_width = 200 + + cancel_button = ba.buttonwidget( + parent=self._root_widget, + position=(20, 25), + size=(button_width, 65), + autoselect=True, + label=ba.Lstr(resource='notNowText'), + on_activate_call=self._done, + ) + + _what_is_this_button = ba.buttonwidget( + parent=self._root_widget, + position=(self._width * 0.5 - button_width * 0.5, 25), + size=(button_width, 65), + autoselect=True, + label=ba.Lstr(resource='whatIsThisText'), + color=(0.55, 0.5, 0.6), + textcolor=(0.75, 0.7, 0.8), + on_activate_call=show_what_is_v2_page, + ) + + bamasteraddr = ba.internal.get_master_server_address(version=2) + upgrade_button = ba.buttonwidget( + parent=self._root_widget, + position=(self._width - button_width - 20, 25), + size=(button_width, 65), + autoselect=True, + label=ba.Lstr(resource='upgradeText'), + on_activate_call=ba.Call( + ba.open_url, + f'{bamasteraddr}/v2uda/{self._code}', + ), + ) + + ba.containerwidget( + edit=self._root_widget, + selected_child=upgrade_button, + cancel_button=cancel_button, + ) + + def _done(self) -> None: + ba.containerwidget(edit=self._root_widget, transition='out_left') diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index d524e081..7e901c60 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -32,7 +32,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20944; +const int kAppBuildNumber = 20956; const char* kAppVersion = "1.7.14"; // Our standalone globals. diff --git a/src/ballistica/core/thread.cc b/src/ballistica/core/thread.cc index b9032ff3..c1fae4a8 100644 --- a/src/ballistica/core/thread.cc +++ b/src/ballistica/core/thread.cc @@ -433,15 +433,17 @@ Thread::~Thread() = default; #pragma clang diagnostic push #pragma ide diagnostic ignored "ConstantConditionsOC" -void Thread::LogThreadMessageTally() { +void Thread::LogThreadMessageTally( + std::vector>* log_entries) { // Prevent recursion. if (!writing_tally_) { writing_tally_ = true; std::unordered_map tally; - Log(LogLevel::kError, "Thread message tally (" + log_entries->emplace_back(std::make_pair( + LogLevel::kError, "Thread message tally (" + std::to_string(thread_messages_.size()) - + " in list):"); + + " in list):")); for (auto&& m : thread_messages_) { std::string s; switch (m.type) { @@ -475,8 +477,9 @@ void Thread::LogThreadMessageTally() { } int entry = 1; for (auto&& i : tally) { - Log(LogLevel::kError, " #" + std::to_string(entry++) + " (" - + std::to_string(i.second) + "x): " + i.first); + log_entries->emplace_back(std::make_pair( + LogLevel::kError, " #" + std::to_string(entry++) + " (" + + std::to_string(i.second) + "x): " + i.first)); } writing_tally_ = false; } @@ -484,6 +487,12 @@ void Thread::LogThreadMessageTally() { #pragma clang diagnostic pop void Thread::PushThreadMessage(const ThreadMessage& t) { + // We don't want to make log calls while holding this mutex; + // log calls acquire the GIL and if the GIL-holder (generally + // the logic thread) is trying to send a thread message to the + // thread doing the logging we would get deadlock. + // So tally up any logs and send them after. + std::vector> log_entries; { std::unique_lock lock(thread_message_mutex_); @@ -506,8 +515,9 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { // Show count periodically. if ((std::this_thread::get_id() == g_app->main_thread_id) && foo > 100) { foo = 0; - Log(LogLevel::kInfo, - "MSG COUNT " + std::to_string(thread_messages_.size())); + log_entries.emplace_back(std::make_pair( + LogLevel::kInfo, + "MSG COUNT " + std::to_string(thread_messages_.size()))); } } @@ -515,9 +525,11 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { static bool sent_error = false; if (!sent_error) { sent_error = true; - Log(LogLevel::kError, - "ThreadMessage list > 1000 in thread: " + GetCurrentThreadName()); - LogThreadMessageTally(); + log_entries.emplace_back(std::make_pair( + LogLevel::kError, + "ThreadMessage list > 1000 in thread: " + GetCurrentThreadName())); + + LogThreadMessageTally(&log_entries); } } @@ -531,6 +543,11 @@ void Thread::PushThreadMessage(const ThreadMessage& t) { // available. } thread_message_cv_.notify_all(); + + // Now log anything we accumulated safely outside of the locked section. + for (auto&& log_entry : log_entries) { + Log(log_entry.first, log_entry.second); + } } auto Thread::SetThreadsPaused(bool paused) -> void { diff --git a/src/ballistica/core/thread.h b/src/ballistica/core/thread.h index 7f16500f..a0c5c594 100644 --- a/src/ballistica/core/thread.h +++ b/src/ballistica/core/thread.h @@ -118,7 +118,8 @@ class Thread { auto SetInternalThreadName(const std::string& name) -> void; auto WaitForNextEvent(bool single_cycle) -> void; auto LoopUpkeep(bool once) -> void; - auto LogThreadMessageTally() -> void; + auto LogThreadMessageTally( + std::vector>* log_entries) -> void; auto PushLocalRunnable(Runnable* runnable, bool* completion_flag) -> void; auto PushCrossThreadRunnable(Runnable* runnable, bool* completion_flag) -> void;