diff --git a/.efrocachemap b/.efrocachemap index f5399fd7..694934dc 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -944,10 +944,10 @@ "assets/build/ba_data/models/zoeUpperArm.bob": "https://files.ballistica.net/cache/ba1/99/38/b7694cae0804260eeb337aa1676a", "assets/build/ba_data/models/zoeUpperLeg.bob": "https://files.ballistica.net/cache/ba1/83/4f/28b2202d0109fa93272c0b09fa2d", "assets/build/ba_data/python-site-packages/_yaml/__init__.py": "https://files.ballistica.net/cache/ba1/0d/45/65ba92f51d411dcffac8835b6130", - "assets/build/ba_data/python-site-packages/certifi/__init__.py": "https://files.ballistica.net/cache/ba1/ca/90/4cf111df6bafc9735f6d2a05d6f2", + "assets/build/ba_data/python-site-packages/certifi/__init__.py": "https://files.ballistica.net/cache/ba1/f0/50/dbe7d0065006ac12adf2eaa239fc", "assets/build/ba_data/python-site-packages/certifi/__main__.py": "https://files.ballistica.net/cache/ba1/b2/bb/d7d8216212bcf66cdc3067700fb7", - "assets/build/ba_data/python-site-packages/certifi/cacert.pem": "https://files.ballistica.net/cache/ba1/c9/f9/e2d0dd61a7f4e36a3309a3981d07", - "assets/build/ba_data/python-site-packages/certifi/core.py": "https://files.ballistica.net/cache/ba1/8a/01/33e774b2ed89a56756f32d2f3bef", + "assets/build/ba_data/python-site-packages/certifi/cacert.pem": "https://files.ballistica.net/cache/ba1/eb/1c/18ef584961785d002a2550d389e0", + "assets/build/ba_data/python-site-packages/certifi/core.py": "https://files.ballistica.net/cache/ba1/ac/28/37f05b52df3806856bce2c0b9772", "assets/build/ba_data/python-site-packages/typing_extensions.py": "https://files.ballistica.net/cache/ba1/a5/c3/66c408bfad73af8644f507d8ee17", "assets/build/ba_data/python-site-packages/yaml/__init__.py": "https://files.ballistica.net/cache/ba1/e5/47/17715ca7620f3b9749558b9dcb2d", "assets/build/ba_data/python-site-packages/yaml/composer.py": "https://files.ballistica.net/cache/ba1/3e/aa/d7fcfc4707ad19a6964d72654b82", @@ -3995,26 +3995,26 @@ "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/b2/e5/0ee0561e16257a32830645239f34", "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/18/b5/fdb800eba3e560e1e6b892d639a6", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4d/ff/a05c193e6d1324551f40c92b7b61", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/68/b1/409e956704f4d019e8fe5ffce1dc", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/66/44/0a37f6394999644e2da10356d9e6", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6e/b6/c999544c7354b2d264e550a40851", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a1/df/94e1bd43783d4b95404bca30d1ee", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/86/85/637ebdfd6f4dbd5f0b7c0788bcc7", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/60/fd9c38903be9656c0eba0666cc52", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/88/4e/6718a6097277b8403bc0e22e987a", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fb/69/1a73d2f13f5a6d125e40c6446db4", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/cf/349a54fb60273d5e87bba5943b4e", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4d/bf/d0088e558d27e308b4e0e1d976da", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a1/59/0d7b240a7a5dfd01891465cda63f", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/89/f2/121681f63a15009d4dbb847fa285", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1c/10/81a9c096bc4b06a10602e9bf554f", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e2/72/c6ea79d94342a0d4f512a16bd82f", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/2c/5f/47e3bc81bb71823e6c7e9ce7b385", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e3/c7/fd9f0eafb404b672b6fe065e5728", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/0c/bb/9e8aa3497dd3557146cd7396c363", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/67/77/b9695816c6e7d38286cf5ca6f6ed", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/a8/c64dd132890deee940ce6831725b", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3e/d6/869c9edf19032183504df20c7157", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/12/f7/1e088f53cde513f12d9dced02e06", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/91/3d/ab4c0beb21104b43f570061a41f9", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/fd/0d/c9cc68e293873548a5789fed5a13", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0d/6c/d48fcad2794d48d8dd453ccb21fb", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/89/6944dc05561230801d79777a7900", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4e/0a/00104605199b8ece7680dffd9d26", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c8/a3/01704b3b283c60728a87846169d4", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/45/e8/6b0538e38f718b162f5752179e7f", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/2d/db7270ba82084e1e75e2a6a7e996", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/14/c1/680b3c3148416160b68ac48c20e1", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0b/f2/123fd4622a920af7db6da433b745", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7c/5b/bb7af29eacadbe580b60d42249de", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2a/30/ceb422a91047bfed7165614eb37a", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/0a/eb6a1543f81e02496ea4e09926de", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/89/8f/26d2ae170ccbaa765c8bcf7a4064", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/59/fd/90bc586dcd1386ae26e57a9c6cb4", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/48/85/bd7a7ad72f22b363136a6ab38d0c", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/47/6b/20ddf06be6ffcb9206d073f0e007", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/17/f0d22a9a91a295ee4a9d94db2af9", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d5/4f/bfbcdd18679b4ba0df1b040e8c15", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/96/e9/0f4aa3d10f2d50fe670bb6d89ba0", @@ -4031,14 +4031,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/06/ec124d5bfce4d3f268b1318755b8", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/47/3322caea5f9a92735076c1017839", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f5/9f/ce9a27aea9a4b7056800cf68afe9", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ac/91/58112f039b7ad67af761ba988698", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d4/b7/9bba9f1e630f5c1691b1483682f1", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a6/0f/2fbf2e656b3e8d0041c04cdc0c45", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/4b/f1/1afbb7997808a9aa22154f1ba97c", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/e6/b5/7f1e577e568f55324de3cccd877d", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/6f/df/ff6619da29ce2ba222ea9f7918a3", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/67/3f/4be4522ae75ab5ce73124a93db83", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e9/e0/2687b6a41c92b8098d5115804d7f", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/cd/c3/ef2a3645542161cb0dda7228d82f", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/76/33/2d95e621043e7a6c724e83dc6ba1", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/44/57/5fe7e94f357486bb4c9bcaca9f03", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/00/0f/049dcd75e76c0050b227cc7e765c", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/e9/3a/d02e1a197ba1732b8ed42f41a650", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d0/8f/135a92cf6bce3035cdb2b91ffcea", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/d4/41/9932701d3f9da34fb64728ff9ca8", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/70/97/19a63e1f1b0796d94b50cef7562b", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523", "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 48c0fff0..2735c724 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20866, api 7, 2022-09-19) +### 1.7.7 (build 20868, api 7, 2022-09-20) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. @@ -41,7 +41,7 @@ - (build 20859) Fixed an error setting up asyncio loops under Windows related to the fact that Python is now inited in the main thread. - (build 20864) Fatal-error message/traceback now properly prints to stderr again (I think the reject logging rejiggering caused it to stop). - (build 20864) Fixed an issue where the app could crash when connected to the cloud console while in a network game. -- Added a simplified help() command which behaves reasonably under the in-game console or cloud console. +- Added a simplified help() command which behaves reasonably under the in-game console or cloud-console. ### 1.7.6 (build 20687, api 7, 2022-08-11) diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index 58135d01..d2ce5d36 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -45,7 +45,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20866 + expected_build = 20868 running_build: int = env['build_number'] if running_build != expected_build: print( @@ -133,6 +133,18 @@ class _CustomHelper: return 'Type help(object) for help about object.' def __call__(self, *args: Any, **kwds: Any) -> Any: + # We get an ugly error importing pydoc on our embedded + # platforms due to _sysconfigdata_xxx.py not being present + # (but then things mostly work). Let's get the ugly error out + # of the way explicitly. + import sysconfig + try: + # This errors once but seems to run cleanly after, so let's + # get the error out of the way. + sysconfig.get_path('stdlib') + except ModuleNotFoundError: + pass + import pydoc # Disable pager and interactive help since neither works well # with our funky multi-threaded setup or in-game/cloud consoles. @@ -149,9 +161,11 @@ def _on_log(entry: LogEntry) -> None: # Just forward this along to the engine to display in the in-game console, # in the Android log, etc. - _ba.display_log(name=entry.name, - level=entry.level.name, - message=entry.message) + _ba.display_log( + name=entry.name, + level=entry.level.name, + message=entry.message, + ) # We also want to feed some logs to the old V1-cloud-log system. # Let's go with anything warning or higher as well as the stdout/stderr diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index df49fab6..200903e6 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 = 20866; +const int kAppBuildNumber = 20868; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/tools/efro/log.py b/tools/efro/log.py index 116d0de5..b313c37b 100644 --- a/tools/efro/log.py +++ b/tools/efro/log.py @@ -144,7 +144,16 @@ class LogHandler(logging.Handler): # setting it for our loop. asyncio.set_event_loop(self._event_loop) self._thread_bootstrapped = True - self._event_loop.run_forever() + try: + self._event_loop.run_forever() + except BaseException: + # If this ever goes down we're in trouble. + # We won't be able to log about it though... + # Try to make some noise however we can. + print('LogHandler died!!!', file=sys.stderr) + import traceback + traceback.print_exc() + raise def get_cached(self, start_index: int = 0, @@ -180,8 +189,10 @@ class LogHandler(logging.Handler): def emit(self, record: logging.LogRecord) -> None: # Called by logging to send us records. # We simply package them up and ship them to our thread. - - assert current_thread() is not self._thread + # UPDATE: turns out we CAN get log messages from this thread + # (the C++ layer can spit out some performance metrics when + # calls take too long/etc.) + # assert current_thread() is not self._thread # Special case - filter out this common extra-chatty category. # TODO - should use a standard logging.Filter for this.