diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..5766126411 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "monthly" diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ddb0f44150..7b6187f3bb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -224,7 +224,7 @@ jobs: - name: Upload executable if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_app - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "${{ steps.build.outputs.artifact }}-app" path: | @@ -234,7 +234,7 @@ jobs: # artifact for that too. - name: Upload symbol file if: matrix.configuration != 'ReleaseOS' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "${{ steps.build.outputs.artifact }}-symbols" path: | @@ -242,7 +242,7 @@ jobs: - name: Upload metadata if: matrix.configuration != 'ReleaseOS' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "${{ steps.build.outputs.artifact }}-metadata" # emitted by build.sh, possibly multiple lines @@ -250,7 +250,7 @@ jobs: ${{ steps.build.outputs.metadata }} - name: Upload physics package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 # should only be set for viewer-private if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.physicstpv with: diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index f50c4b8e8a..803ec090c4 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -25,7 +25,7 @@ jobs: build_matrix: strategy: matrix: - os: [macos-11,ubuntu-20.04,windows-2022] + os: [macos-11,ubuntu-22.04,windows-2022] grid: [sl,os] addrsize: [64] runs-on: ${{ matrix.os }} @@ -178,6 +178,8 @@ jobs: echo -n "$FS_CERT_PASS" >${build_secrets_checkout}/code-signing-osx/password.txt echo -n "$NOTARIZE_CREDS" | base64 --decode --output ${build_secrets_checkout}/code-signing-osx/notarize_creds.sh security create-keychain -p "$FS_KEYCHAIN_PASS" ~/Library/Keychains/viewer.keychain + # notarize tool uses a specific database keychain by default we need to override this to ours. + security default-keychain -s viewer.keychain security set-keychain-settings -lut 21600 ~/Library/Keychains/viewer.keychain security unlock-keychain -p "$FS_KEYCHAIN_PASS" ~/Library/Keychains/viewer.keychain security import ${build_secrets_checkout}/code-signing-osx/fs-cert.p12 -P "$FS_CERT_PASS" -A -t cert -f pkcs12 -k ~/Library/Keychains/viewer.keychain diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 6e41d8aa2d..a34c575680 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -9,7 +9,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: configuration-path: .github/labeler.yaml repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index d626eef38d..dcb64a3b29 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.x - - uses: pre-commit/action@v3.0.0 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index e44e223589..6d0eaacca5 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -12,7 +12,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v6 + - uses: actions/stale@v9 id: stale with: stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days diff --git a/autobuild.xml b/autobuild.xml index 0ddce9e4ca..9022a28ccc 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -26,11 +26,11 @@ archive hash - bcf0f9d160231c52869b8d81014d0ad3afe537fd + 0f6fbb52ffea1a55bf76a84a6688079f95674cbd hash_algorithm sha1 url - https://3p.firestormviewer.org/SDL2-2.28.5-linux64-233480131.tar.bz2 + https://github.com/secondlife/3p-sdl2/releases/download/v2.28.0-1dc88c1/SDL2-2.28.0-linux64-1dc88c1.tar.zst name linux64 @@ -142,9 +142,11 @@ archive hash - 81fe1e927e4fe3c5e5f15ce6219ca883 + 691fef2ddd57d7b6c26e87fc82d9ace3f54e078c + hash_algorithm + sha1 url - https://3p.firestormviewer.org/fltk-1.3.5.202282121-linux64-202282121.tar.bz2 + https://github.com/secondlife/3p-fltk/releases/download/v1.3.9-r1/fltk-1.3.9.8556992788-linux64-8556992788.tar.zst name linux @@ -385,36 +387,6 @@ - SDL - - platforms - - linux64 - - archive - - hash - 64c1dff0e19792acec7fd32556bf4d7b - url - https://3p.firestormviewer.org/SDL-1.2.15-linux64-181411635.tar.bz2 - - name - linux64 - - - license - lgpl - license_file - LICENSES/SDL.txt - copyright - Copyright (C) 1997-2012 Sam Lantinga - version - 1.2.15 - name - SDL - description - Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. - apr_suite platforms @@ -438,9 +410,11 @@ archive hash - 1c341bdbb5fd0c8a8930f76e6c1647d4 + 95137cd3f4d6ffa5bd7a00d7d91bd8fc272b7ca2 + hash_algorithm + sha1 url - https://3p.firestormviewer.org/apr_suite-1.4.5.230921251-linux64-230921251.tar.bz2 + https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.2-c5f3347/apr_suite-1.7.2-c5f3347-linux64-c5f3347.tar.zst name linux64 @@ -496,11 +470,11 @@ archive hash - 5d1952e270a873d4587f7b943ed6e3f87d5023da + a3bfbdba7e1977e7e65266ec654990bb13994bd3 hash_algorithm sha1 url - https://3p.firestormviewer.org/boost-1.81-linux64-240621158.tar.zst + https://github.com/secondlife/3p-boost/releases/download/v1.81-3d0d7fc/boost-1.81-linux64-3d0d7fc.tar.zst name linux64 @@ -602,11 +576,11 @@ archive hash - 83f9c9aff5a7b96711c04bd33cb453c108dee3a5 + cab0237b5194254c0c0ff6bf77bc6a2f946d4f57 hash_algorithm sha1 url - https://3p.firestormviewer.org/colladadom-2.3.240621210-linux64-240621210.tar.zst + https://github.com/secondlife/3p-colladadom/releases/download/v2.3-2f532e1/colladadom-2.3.2f532e1-linux64-2f532e1.tar.zst name linux64 @@ -660,11 +634,11 @@ archive hash - 64210ab1d7c881dbe5c78ef8f6db5a6d2b27e5d2 + aea0bed0f953a9371b9091f09230b41597f891f7 hash_algorithm sha1 url - https://3p.firestormviewer.org/cubemaptoequirectangular-1.1.0-linux64-213500938.tar.bz2 + https://github.com/secondlife/3p-cubemap_to_eqr_js/releases/download/v1.1.0-cb8785a/cubemaptoequirectangular-1.1.0-linux64-cb8785a.tar.zst name linux64 @@ -878,11 +852,11 @@ archive hash - c036cc042523fb6a3dafb7134f83e52c566c0765 + 5b957aa7f353b10ae17b7119e5b3668f48a35325 hash_algorithm sha1 url - https://3p.firestormviewer.org/emoji_shortcodes-6.1.0.240620448-linux64-240620448.tar.zst + https://github.com/secondlife/3p-emoji-shortcodes/releases/download/v6.1.0.5413f58/emoji_shortcodes-6.1.0.5413f58-linux64-5413f58.tar.zst name linux64 @@ -926,9 +900,11 @@ archive hash - 39702f98867a319b090ee04f22d82762 + 4cd82e2dec06ddff19e9b3dc0254f2593ec80452 + hash_algorithm + sha1 url - https://3p.firestormviewer.org/expat-2.5.0.230021327-linux64-230021327.tar.bz2 + https://github.com/secondlife/3p-expat/releases/download/v2.1.1.1f36d02/expat-2.1.1.1f36d02-linux64-1f36d02.tar.zst name linux64 @@ -1021,36 +997,6 @@ description FMOD Studio API - fontconfig - - platforms - - linux64 - - archive - - hash - 6fdcfcc9aa1d01164c0f7ca5590859bb - url - https://3p.firestormviewer.org/fontconfig-2.12.6-linux64-223020909.tar.bz2 - - name - linux64 - - - license - bsd - license_file - LICENSES/fontconfig.txt - copyright - Copyright (C) 2000,2001,2002,2003,2004,2006,2007 Keith Packard, 2005 Patrick Lam, 2009 Roozbeh Pournader, 2008,2009 Red Hat, Inc., 2008 Danilo Šegan, 2012 Google, Inc. - version - 2.11.0 - name - fontconfig - description - Fontconfig is a library for configuring and customizing font access. - freetype copyright @@ -1084,11 +1030,11 @@ archive hash - a8326f592bf608095f0854383eec2baf36257ea9 + 07a38133c008ce6f728d652d00a756bea3a70288 hash_algorithm sha1 url - https://3p.firestormviewer.org/freetype-2.12.1.240700637-linux64-240700637.tar.zst + https://github.com/secondlife/3p-freetype/releases/download/v2.12.1-r1/freetype-2.12.1.8503093630-linux64-8503093630.tar.zst name linux64 @@ -1233,34 +1179,6 @@ description a library for writing and using C++ mock classes - gstreamer - - platforms - - linux64 - - archive - - hash - 86a358f1b5a2c2baf68444b2bfc5bb32 - url - https://3p.firestormviewer.org/gstreamer-0.10.6.180841551-linux64-180841551.tar.bz2 - - name - linux64 - - - license - LGPL - license_file - LICENSES/gstreamer.txt - copyright - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - version - 0.10.6.314267 - name - gstreamer - havok-source platforms @@ -1358,11 +1276,11 @@ archive hash - f5e5be3af96f1eb0842219a94765c04aa9c561c5 + bdd74e2a02c7b78fded9222140d197da4af9904e hash_algorithm sha1 url - https://3p.firestormviewer.org/icu4c-4.8.1-linux64-240621048.tar.zst + https://github.com/secondlife/3p-icu4c/releases/download/v4.8.1-8bff176/icu4c-4.8.1-linux64-8512575562.tar.zst name linux64 @@ -1408,9 +1326,11 @@ archive hash - fd8060aa3c920e0fc63e7ecbea67bc5e + 23daab838f4b8f92e5dc1a2f6c568cb7b0cb43b7 + hash_algorithm + sha1 url - https://3p.firestormviewer.org/jpegencoderbasic-1.0-linux64-213500937.tar.bz2 + https://github.com/secondlife/3p-jpeg_encoder_js/releases/download/v1.0-790015a/jpegencoderbasic-1.0-linux64-790015a.tar.zst name linux64 @@ -1464,9 +1384,11 @@ archive hash - 324bb9deb00d256a12f8cbf686f413f0 + b4b2278bd2fcae85619e2145a243cca388d760d7 + hash_algorithm + sha1 url - https://3p.firestormviewer.org/jpeglib-8c.180841548-linux64-180841548.tar.bz2 + https://github.com/secondlife/3p-jpeglib/releases/download/v8c.7846234/jpeglib-8c.7846234-linux64-7846234.tar.zst name linux64 @@ -1522,9 +1444,11 @@ archive hash - 352ab340f2091c93eb313cf80ac0c8cc + 66dce1d0c2fc19dff13db279d973773fc7e2aa13 + hash_algorithm + sha1 url - https://3p.firestormviewer.org/jsoncpp-0.5.0.202052209-linux64-202052209.tar.bz2 + https://github.com/secondlife/3p-jsoncpp/releases/download/v0.5.0-cc63e92/jsoncpp-0.5.0.cc63e92-linux64-cc63e92.tar.zst name linux64 @@ -1634,9 +1558,11 @@ archive hash - 6555f040c686d8c1dec8e6264c2d3672 + 6413d3bd4cd50c2a6b7f949eb4bd6f0c94feb984 + hash_algorithm + sha1 url - https://3p.firestormviewer.org/libhunspell-1.3.2.180841552-linux64-180841552.tar.bz2 + https://github.com/secondlife/3p-libhunspell/releases/download/v1.3.2.650fb94/libhunspell-1.3.2.650fb94-linux64-650fb94.tar.zst name linux64 @@ -1738,11 +1664,11 @@ archive hash - e646a9da0ddfe1dfbffc6600d7d35f78ac48c75e + 39d5779fd79e23da16a7b5bf608008999004c828 hash_algorithm sha1 url - https://3p.firestormviewer.org/libpng-1.6.38-240620624-linux64-240620624.tar.zst + https://github.com/secondlife/3p-libpng/releases/download/v1.16.38-d427738/libpng-1.6.38-8318603154-linux64-8318603154.tar.zst name linux64 @@ -2131,9 +2057,11 @@ archive hash - 50d647afc4e510af72f09dcd7a77e920 + 6f4509dca9e32e3b4f9c4b13d875ce0e24340efc + hash_algorithm + sha1 url - https://3p.firestormviewer.org/meshoptimizer-0.16.222121104-linux64-222121104.tar.bz2 + https://github.com/secondlife/3p-meshoptimizer/releases/download/v160-4f905dd/meshoptimizer-160-linux64-4f905dd.tar.zst name linux64 @@ -2466,9 +2394,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 03b7df0406d7588c4fb49c2ddf0d8264 + 90052be851c4fcecc35d8424b4f31352de14ab2f + hash_algorithm + sha1 url - https://3p.firestormviewer.org/ogg_vorbis-1.3.3-1.3.6.202241500-linux64-202241500.tar.bz2 + https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.3-1.3.6-881f65e/ogg_vorbis-1.3.3-1.3.6.881f65e-linux64-881f65e.tar.zst name linux64 @@ -2522,11 +2452,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 52c4622c76c773deba056eeb6b0dc726cb3100bd + 2d20683554f0b00234bbb84d0ce7ac1be1ad70aa hash_algorithm sha1 url - https://3p.firestormviewer.org/open_libndofdev-0.14.233480318-linux64-233480318.tar.bz2 + https://github.com/secondlife/3p-open-libndofdev/releases/download/v1.14-r1/open_libndofdev-0.14.8503290964-linux64-8503290964.tar.zst name linux64 @@ -2544,9 +2474,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 4f36ae378593240701fd4453bd6074c8 + e0fbc4874acc4167a6e2b6489fbb8258d98fd665 + hash_algorithm + sha1 url - https://3p.firestormviewer.org/openal-1.12.854-1.1.0.180841552-linux64-180841552.tar.bz2 + https://github.com/secondlife/3p-openal-soft/releases/download/v1.23.1-18e315c/openal-1.23.1-linux64-18e315c.tar.zst name linux64 @@ -2616,9 +2548,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - b1dad7c841118a3b6e03a01722d1846a + 8c277dde6076fb682cb07264dd70f6f2298b633f + hash_algorithm + sha1 url - https://3p.firestormviewer.org/openjpeg-2.5.0.230362345-linux64-230362345.tar.bz2 + https://github.com/secondlife/3p-openjpeg/releases/download/v2.5.0.ea12248/openjpeg-2.5.0.ea12248-linux64-ea12248.tar.zst name linux64 @@ -2848,9 +2782,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - d37be064bd851276dab423d723cb9b7d + 982c0fa427458082ea9e3cb9603904210732b64e + hash_algorithm + sha1 url - https://3p.firestormviewer.org/threejs-0.132.2-linux64-213500940.tar.bz2 + https://github.com/secondlife/3p-three_js/releases/download/v0.132.2-5da28d9/threejs-0.132.2-common-8454371083.tar.zst name linux64 @@ -3026,9 +2962,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 0d6832fd958ec127f089e683c9b67169 + df66574b3d70f49570709eccd8a1cdeee996cb43 + hash_algorithm + sha1 url - https://3p.firestormviewer.org/uriparser-0.9.4-linux64-211210958.tar.bz2 + https://github.com/secondlife/3p-uriparser/releases/download/v0.9.4-42d7a6d/uriparser-0.9.4-linux64-42d7a6d.tar.zst name linux64 @@ -3246,11 +3184,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 71a9c7c03a2c26cdb21fa476de485d9c + ad0c8b41ee4b4de216382bec46ee1c25962a3f12 hash_algorithm - md5 + sha1 url - https://3p.firestormviewer.org/xmlrpc_epi-0.54.2.230940042-linux64-230940042.tar.bz2 + https://github.com/secondlife/3p-xmlrpc-epi/releases/download/v0.54.1.8a05acf/xmlrpc_epi-0.54.1.8a05acf-linux64-8a05acf.tar.zst name linux64 diff --git a/doc/building_linux.md b/doc/building_linux.md index 7455f36feb..eeeb950728 100644 --- a/doc/building_linux.md +++ b/doc/building_linux.md @@ -3,18 +3,23 @@ > [!WARNING] > Please note that we do not give support for compiling the viewer on your own. However, there is a self-compilers group in Second Life that can be joined to ask questions related to compiling the viewer: [Firestorm Self Compilers](https://tinyurl.com/firestorm-self-compilers) -> [!NOTE] -> These instructions only apply to Firestorm versions with AlexIvy code. - This procedure is based on discussions with the Firestorm Linux development team and is the only one recommended for Firestorm for Linux. System requirements are: -- Ubuntu 20.04 x64 fully upgraded +- Ubuntu 22.04 LTS (x86_64) - fully upgraded (this is also now the minimum requirement for running the viewer). - 16GB or more RAM ([Low Memory Caution](#common-issuesbugsglitches-and-solutions)) - 64GB hard drive space - 4 or more core CPU (you could get by with 2 cores, but the process will take much longer) +- GCC 11 compiler (which is the default version on Ubuntu 22.04 LTS) -Due to the age of the build OS, it is recommended that you use a virtual machine, ensuring the guest can meet the hardware requirements. +It is recommended that you use a virtual machine for compiling, ensuring the guest can meet the hardware requirements. -This procedure may or may not work on other Linux distributions. +This procedure may or may not work on other Linux distributions (or you might need to adjust some of the package names to suit the distribution you are using). + +> [!WARNING] +> A system with a glibc version of at least 2.34 is required (Ubuntu 22.04 LTS meets this requirement) +> Building on a system with a glibc version older than 2.34 will likely result in linker errors. + +> [!IMPORTANT] +> Only 64 bit builds are possible - 32 bit support was dropped quite some time ago. ## Establish your programming environment @@ -31,35 +36,22 @@ A few packages must be installed on the build system. Some may already be instal | | | | | | | | --------------- | ---------------- | ------------- | ------------------ | ---------------- | ------ | | libgl1-mesa-dev | libglu1-mesa-dev | libpulse-dev | build-essential | python3-pip | git | -| libssl-dev | libxinerama-dev | libxrandr-dev | libfontconfig1-dev | libfreetype6-dev | gcc-10 | -| | | | | | | +| libssl-dev | libxinerama-dev | libxrandr-dev | libfontconfig-dev | libfreetype6-dev | gcc-11 | +| cmake | | | | | | ``` -sudo apt install libgl1-mesa-dev libglu1-mesa-dev libpulse-dev build-essential python3-pip git libssl-dev libxinerama-dev libxrandr-dev libfontconfig1-dev libfreetype6-dev gcc-10 -``` - -### CMake - -CMake version 3.18 is required but not available in Ubuntu's repositories, we have to build it from source - -``` -wget https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0.tar.gz -tar xvf cmake-3.18.0.tar.gz -cd cmake-3.18.0 -./bootstrap --parallel=$(nproc) --prefix=/usr && make -j $(nproc) && sudo make install +sudo apt install libgl1-mesa-dev libglu1-mesa-dev libpulse-dev build-essential python3-pip git libssl-dev libxinerama-dev libxrandr-dev libfontconfig-dev libfreetype6-dev gcc-11 cmake ``` ### Install Autobuild Autobuild is a Linden Lab resource that does all the hard work. - +You can install it using the same versions as our automated builds as follows: ``` sudo pip3 install --upgrade pip -sudo pip3 install git+https://github.com/secondlife/autobuild.git#egg=autobuild +pip install -r requirements.txt ``` - -Check Autobuild version to be "autobuild 3.8" or higher: `autobuild --version` - +Check Autobuild version to be "autobuild 3.9.3" or higher: `autobuild --version` ## Download the source code There are two required repositories, the viewer itself and the build variables. An optional third repository is used to configure and package FMOD Studio. @@ -81,7 +73,7 @@ The rest of this document will assume the default directory, `phoenix-firestorm` ### Clone the Autobuild build variables -Autobuild 3.0 uses a separate file to control compiler options, switches, and the like for different configurations. +Autobuild uses a separate file to control compiler options, switches, and the like for different configurations. ``` cd ~/src diff --git a/doc/building_macos.md b/doc/building_macos.md index f5ad4ea481..ce251a4673 100644 --- a/doc/building_macos.md +++ b/doc/building_macos.md @@ -40,7 +40,7 @@ sudo python3 get-pip.py The Linden Lab [Autobuild](https://github.com/secondlife/autobuild) tool. - Use the following command to install it on your machine: ``` -pip3 install --user git+https://bitbucket.org/lindenlab/autobuild.git#egg=autobuild +pip3 install --user -r requirements.txt ``` - Add it to your PATH environment variable so it can be found by the shell. The macOS-approved way to do this is to issue the following command (This change will not take effect until the next time you open a Terminal window.): @@ -53,7 +53,7 @@ echo '~/Library/Python/3.7/bin/' | sudo tee /etc/paths.d/99-autobuild export PATH=$PATH:~/Library/Python/3.7/bin/ ``` -- Check Autobuild version to be "autobuild 3.8" or higher: `autobuild --version` +- Check Autobuild version to be "autobuild 3.9.3" or higher: `autobuild --version` ### Additional third party libraries If you want to use licensed FMOD Studio API or KDU build libraries (they are optional) you have to provide these yourself. If you're building Firestorm as part of the project team, ask for the libraries for fmodstudio and kdu. Put them into `/opt/firestorm`. diff --git a/doc/building_windows.md b/doc/building_windows.md index 46117d7fbc..7ae61cdf5e 100644 --- a/doc/building_windows.md +++ b/doc/building_windows.md @@ -93,9 +93,11 @@ If they all report sensible values and not "Command not found" errors, then you ### Set up Autobuild - Install Autobuild + You can install autobuild and its dependencies using the `requirements.txt` file that is part of the repo, this will build using the same versions that our official builds use. + - Open Windows Command Prompt and enter: pip install -r requirements.txt + - Autobuild will be installed. **Earlier versions of Autobuild could be made to work by just putting the source files into your path correctly; this is no longer true - Autobuild _must_ be installed as described here.** - Open Windows Command Prompt and enter: `pip install git+https://github.com/secondlife/autobuild.git#egg=autobuild` - - Autobuild will be installed. **Earlier versions of Autobuild could be made to work by just putting the source files into your path correctly; this is no longer true - Autobuild _must_ be installed as described here.** - Set environment variable AUTOBUILD_VSVER to 170 (170 = Visual Studio 2022). - Check Autobuild version to be "autobuild 3.8" or higher: `autobuild --version` diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 35fc6090cd..a9b992ab20 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -12,6 +12,6 @@ if (WINDOWS) elseif (DARWIN) target_link_libraries( ll::jsoncpp INTERFACE libjson_darwin_libmt.a ) elseif (LINUX) - target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-5.4.0_libmt.a ) + target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-11_libmt.a ) endif (WINDOWS) target_include_directories( ll::jsoncpp SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/media_plugins/cef/linux_volume_catcher.cpp b/indra/media_plugins/cef/linux_volume_catcher.cpp index 43773bb952..6e7691ff57 100755 --- a/indra/media_plugins/cef/linux_volume_catcher.cpp +++ b/indra/media_plugins/cef/linux_volume_catcher.cpp @@ -286,7 +286,11 @@ void VolumeCatcherImpl::setVolume(F32 volume) void VolumeCatcherImpl::pump() { - return; + // PR#17 makidoll: Fix Linux volume catcher + if (mGotSyms && mMainloop) { + llpa_mainloop_iterate(mMainloop, 0, NULL); + } + // } void VolumeCatcherImpl::connected_okay() diff --git a/indra/media_plugins/cef/linux_volume_catcher_pa_syms.inc b/indra/media_plugins/cef/linux_volume_catcher_pa_syms.inc index 2c9f760fba..4e65221003 100755 --- a/indra/media_plugins/cef/linux_volume_catcher_pa_syms.inc +++ b/indra/media_plugins/cef/linux_volume_catcher_pa_syms.inc @@ -21,5 +21,6 @@ LL_PA_SYM(true, pa_sw_volume_from_linear, pa_volume_t, double v); LL_PA_SYM(true, pa_mainloop_free, void, pa_mainloop* m); LL_PA_SYM(true, pa_mainloop_get_api, pa_mainloop_api*, pa_mainloop* m); LL_PA_SYM(true, pa_mainloop_new, pa_mainloop*, void); +LL_PA_SYM(true, pa_mainloop_iterate, int, pa_mainloop*, int, int*); // optional symbols to grab diff --git a/indra/newview/Info-Firestorm.plist b/indra/newview/Info-Firestorm.plist index 2b0e24e92e..6b2e73a5a2 100644 --- a/indra/newview/Info-Firestorm.plist +++ b/indra/newview/Info-Firestorm.plist @@ -28,6 +28,8 @@ ${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION} CSResourcesFileMapped + LSApplicationCategoryType + public.app-category.games LSRequiresCarbon NSAppSleepDisabled diff --git a/indra/newview/installers/darwin/apple-notarize.sh b/indra/newview/installers/darwin/apple-notarize.sh index ce012d84ed..cd3f9eb803 100755 --- a/indra/newview/installers/darwin/apple-notarize.sh +++ b/indra/newview/installers/darwin/apple-notarize.sh @@ -11,45 +11,30 @@ if [[ -f "$CONFIG_FILE" ]]; then zip_file=${app_file/app/zip} ditto -c -k --keepParent "$app_file" "$zip_file" if [[ -f "$zip_file" ]]; then - res=$(xcrun altool --notarize-app --primary-bundle-id "org.firestormviewer.firestorm" \ - --username $USERNAME \ - --password $PASSWORD \ - --asc-provider $ASC_PROVIDER \ - --file "$zip_file" 2>&1) + # res=$(xcrun notarytool store-credentials \ + # viewer.profile \ + # --verbose 2>*1) + # echo $res + res=$(xcrun notarytool submit "$zip_file" \ + --apple-id $USERNAME \ + --password $PASSWORD \ + --team-id $ASC_PROVIDER \ + --wait 2>&1) + echo "Notarytool submit:" echo $res - requestUUID=$(echo $res | awk '/RequestUUID/ { print $NF; }') - if [[ -n $requestUUID ]]; then - in_progress=1 - while [[ $in_progress -eq 1 ]]; do - sleep 30 - res=$(xcrun altool --notarization-info "$requestUUID" \ - --username $USERNAME \ - --password $PASSWORD 2>&1) - if [[ $res != *"in progress"* ]]; then - in_progress=0 - fi - echo "." - done - # log results - echo $res + [[ "$res" =~ 'id: '([^[:space:]]+) ]] + match=$? + echo "Notarized with id: [$match]" - #remove temporary file - rm "$zip_file" - - if [[ $res == *"success"* ]]; then - xcrun stapler staple "$app_file" - exit 0 - elif [[ $res == *"invalid"* ]]; then - echo "Notarization error: failed to process the app file" - exit 1 - else - echo "Notarization error: unknown response status" - fi - else - echo "Notarization error: couldn't get request UUID" - exit 1 - fi + # if [[ ! $match -eq 0 ]]; then + echo "Running Stapler" + xcrun stapler staple "$app_file" + exit 0 + # else + # echo "Notarization error" + # exit 1 + # fi else echo "Notarization error: ditto failed" exit 1 diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 92c58a2dbc..b7022ac69c 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -245,8 +245,13 @@ void LLGLTFMaterialList::applyOverrideMessage(LLMessageSystem* msg, const std::s } } } - - region->cacheFullUpdateGLTFOverride(cache); + // FIRE-33808 - Material Override Cache causes long delays + if(cache.mSides.size() > 0) + { + region->cacheFullUpdateGLTFOverride(cache); + LL_DEBUGS("GLTF") << "GLTF Material Override: " << cache.mObjectId << " " << cache.mLocalId << " " << cache.mRegionHandle << " (sides:" << (cache.mSides.size()) << ")" << LL_ENDL; + } + // } } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 23c91fc660..1dfc6ee6f9 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -83,7 +83,6 @@ #include "llcorehttputil.h" #include "llcallstack.h" #include "llsettingsdaycycle.h" - #include // Firestorm includes @@ -845,8 +844,13 @@ void LLViewerRegion::loadObjectCache() if(LLVOCache::instanceExists()) { LLVOCache & vocache = LLVOCache::instance(); - vocache.readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap); - vocache.readGenericExtrasFromCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesLLSD); + // FIRE-33808 - Material Override Cache causes long delays + // vocache.readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap); + // vocache.readGenericExtrasFromCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesLLSD); + // mark as dirty if read fails to force a rewrite. + mCacheDirty = !vocache.readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap); + vocache.readGenericExtrasFromCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesLLSD, mImpl->mCacheMap); + // if (mImpl->mCacheMap.empty()) { @@ -1248,12 +1252,16 @@ void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry, bool for_rendering) } } + // Fix the missing kill on overrides + mImpl->mGLTFOverridesLLSD.erase(entry->getLocalID()); + // //will remove it from the object cache, real deletion entry->setState(LLVOCacheEntry::INACTIVE); entry->removeOctreeEntry(); entry->setValid(FALSE); - - // TODO kill extras/material overrides cache too + // Fix the missing kill on overrides + // // TODO kill extras/material overrides cache too + } //physically delete the cache entry @@ -3942,6 +3950,12 @@ void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj) auto iter = mImpl->mGLTFOverridesLLSD.find(local_id); if (iter != mImpl->mGLTFOverridesLLSD.end()) { + // backfill the UUID if it was left empty + if (iter->second.mObjectId.isNull()) + { + iter->second.mObjectId = obj->getID(); + } + // llassert(iter->second.mGLTFMaterial.size() == iter->second.mSides.size()); for (auto& side : iter->second.mGLTFMaterial) diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 5bf990c806..bfcae9d3b4 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -34,6 +34,7 @@ #include "llagentcamera.h" #include "llsdserialize.h" #include "llagent.h" // For gAgent +#include "llworld.h" // For LLWorld::getInstance() //static variables U32 LLVOCacheEntry::sMinFrameRange = 0; @@ -55,6 +56,10 @@ BOOL check_write(LLAPRFile* apr_file, void* src, S32 n_bytes) { return apr_file->write(src, n_bytes) == n_bytes ; } +// FIRE-33808 - Material Override Cache causes long delays +const std::string LLGLTFOverrideCacheEntry::VERSION_LABEL = {"GLTFCacheVer"}; +const int LLGLTFOverrideCacheEntry::VERSION = 1; +// bool LLGLTFOverrideCacheEntry::fromLLSD(const LLSD& data) { @@ -236,6 +241,8 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) } else { + // improve logging around vocache + LL_WARNS() << "Error loading cache entry for " << mLocalID << ", size " << size << " aborting!" << LL_ENDL; delete[] mBuffer ; mBuffer = NULL ; } @@ -1289,6 +1296,11 @@ void LLVOCache::removeEntry(HeaderEntryInfo* entry) { return; } + // FIRE-33808 - Material Override Cache causes long delays + std::string filename; + getObjectCacheFilename(entry->mHandle, filename); + LL_INFOS() << "Removing entry for region with filename" << filename << LL_ENDL; + // header_entry_queue_t::iterator iter = mHeaderEntryQueue.find(entry); if(iter != mHeaderEntryQueue.end()) @@ -1359,6 +1371,11 @@ void LLVOCache::removeFromCache(HeaderEntryInfo* entry) std::string filename; getObjectCacheFilename(entry->mHandle, filename); LLAPRFile::remove(filename, mLocalAPRFilePoolp); + // FIRE-33808 - Material Override Cache causes long delays + // Note that removeFromCache should take responsibility for cleaning up all cache artefactgs specfic to the handle/entry. + // as such this now includes the generic extras + removeGenericExtrasForHandle(entry->mHandle); + // entry->mTime = INVALID_TIME ; updateEntry(entry) ; //update the head file. } @@ -1507,13 +1524,17 @@ BOOL LLVOCache::updateEntry(const HeaderEntryInfo* entry) return check_write(&apr_file, (void*)entry, sizeof(HeaderEntryInfo)) ; } - -void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) +// FIRE-33808 - Material Override Cache causes long delays +// void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) +// we now return bool to trigger dirty cache +// and force a rewrite after a partial read due to corruption. +bool LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) +// { if(!mEnabled) { LL_WARNS() << "Not reading cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL; - return ; + return true; // FIRE-33808 - Material Override Cache causes long delays } llassert_always(mInitialized); @@ -1521,12 +1542,13 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca if(iter == mHandleEntryMap.end()) //no cache { LL_WARNS() << "No handle map entry for " << handle << LL_ENDL; - return ; + return false; // FIRE-33808 - Material Override Cache causes long delays } bool success = true ; + S32 num_entries=0; // FIRE-33808 - Material Override Cache causes long delays + std::string filename; { - std::string filename; LLUUID cache_id; getObjectCacheFilename(handle, filename); LLAPRFile apr_file(filename, APR_READ|APR_BINARY, mLocalAPRFilePoolp); @@ -1543,7 +1565,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca if(success) { - S32 num_entries; // if removal was enabled during write num_entries might be wrong + // S32 num_entries; // if removal was enabled during write num_entries might be wrong success = check_read(&apr_file, &num_entries, sizeof(S32)) ; if(success) @@ -1554,7 +1576,7 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca if (!entry->getLocalID()) { LL_WARNS() << "Aborting cache file load for " << filename << ", cache file corruption!" << LL_ENDL; - success = false ; + success = false ; break ; } cache_entry_map[entry->getLocalID()] = entry; @@ -1570,13 +1592,24 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca { removeEntry(iter->second) ; } - } - return ; + } + // FIRE-33808 - Material Override Cache causes long delays + // return ; + LL_DEBUGS("GLTF", "VOCache") << "Read " << cache_entry_map.size() << " entries from object cache " << filename << ", expected " << num_entries << ", success=" << (success?"True":"False") << LL_ENDL; + return success; + // } -void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map) +// FIRE-33808 - Material Override Cache causes long delays +// void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map) +void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) { + int loaded= 0; + int discarded = 0; + // get ViewerRegion pointer from handle + LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromHandle(handle); +// if(!mEnabled) { LL_WARNS() << "Not reading cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL; @@ -1598,19 +1631,42 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac std::getline(in, line); if(!in.good()) { LL_WARNS() << "Failed reading extras cache for handle " << handle << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + in.close(); + removeGenericExtrasForHandle(handle); + // return; } + // FIRE-33808 - Material Override Cache causes long delays + // file formats need versions, let's add one. legacy cache files will be considered version 0 + int versionNumber=0; + if (line.compare(0, LLGLTFOverrideCacheEntry::VERSION_LABEL.length(), LLGLTFOverrideCacheEntry::VERSION_LABEL) == 0) + { + std::string versionStr = line.substr(LLGLTFOverrideCacheEntry::VERSION_LABEL.length()+1); // skip the version label and ':' + versionNumber = std::stol(versionStr); + std::getline(in, line); // read the next line for the region UUID check + } + // if(!LLUUID::validate(line)) { LL_WARNS() << "Failed reading extras cache for handle" << handle << ". invalid uuid line: '" << line << "'" << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + in.close(); + removeGenericExtrasForHandle(handle); + // return; } LLUUID cache_id(line); if(cache_id != id) { - LL_INFOS() << "Cache ID doesn't match for this region, discarding" << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + // if the cache id doesn't match the expected region we should just kill the file. + LL_WARNS() << "Cache ID doesn't match for this region, deleting it" << LL_ENDL; + in.close(); + removeGenericExtrasForHandle(handle); + // return; } @@ -1618,6 +1674,10 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac std::getline(in, line); if(!in.good()) { LL_WARNS() << "Failed reading extras cache for handle " << handle << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + in.close(); + removeGenericExtrasForHandle(handle); + // return; } try { @@ -1626,10 +1686,15 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac catch(std::logic_error&) // either invalid_argument or out_of_range { LL_WARNS() << "Failed reading extras cache for handle " << handle << ". unreadable num_entries" << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + in.close(); + removeGenericExtrasForHandle(handle); + // return; } - LL_DEBUGS("GLTF") << "Beginning reading extras cache for handle " << handle << ", " << num_entries << " entries" << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + LL_DEBUGS("GLTF") << "Beginning reading extras cache for handle " << handle << " from " << getObjectCacheExtrasFilename(handle) << LL_ENDL; LLSD entry_llsd; for (U32 i = 0; i < num_entries && !in.eof(); i++) @@ -1638,46 +1703,77 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac bool success = LLSDSerialize::deserialize(entry_llsd, in, max_size); // check bool(in) this time since eof is not a failure condition here if(!success || !in) { - LL_WARNS() << "Failed reading extras cache for handle " << handle << ", entry number " << i << LL_ENDL; - return; + // FIRE-33808 - Material Override Cache causes long delays + LL_WARNS() << "Failed reading extras cache for handle " << handle << ", entry number " << i << " cache patrtial load only." << LL_ENDL; + in.close(); + removeGenericExtrasForHandle(handle); + break; + // } LLGLTFOverrideCacheEntry entry; entry.fromLLSD(entry_llsd); U32 local_id = entry_llsd["local_id"].asInteger(); - cache_extras_entry_map[local_id] = entry; + // FIRE-33808 - Material Override Cache causes long delays + // cache_extras_entry_map[local_id] = entry; + // only add entries that exist in the primary cache + // this is a self-healing test that avoids us polluting the cache with entries that are no longer valid. + if(cache_entry_map.find(local_id)!= cache_entry_map.end()) + { + // attempt to backfill a null objectId, though these shouldn't be in the persisted cache really + if(entry.mObjectId.isNull() && pRegion) + { + gObjectList.getUUIDFromLocal( entry.mObjectId, local_id, pRegion->getHost().getAddress(), pRegion->getHost().getPort() ); + } + cache_extras_entry_map[local_id] = entry; + loaded++; + } + else + { + discarded++; + } } - - LL_DEBUGS("GLTF") << "Completed reading extras cache for handle " << handle << ", " << num_entries << " entries" << LL_ENDL; + LL_DEBUGS("GLTF") << "Completed reading extras cache for handle " << handle << ", " << loaded << " loaded, " << discarded << " discarded" << LL_ENDL; + // } void LLVOCache::purgeEntries(U32 size) { + // FIRE-33808 - Material Override Cache causes long delays + LL_DEBUGS("VOCache","GLTF") << "Purging " << size << " entries from cache" << LL_ENDL; while(mHeaderEntryQueue.size() > size) { header_entry_queue_t::iterator iter = mHeaderEntryQueue.begin() ; HeaderEntryInfo* entry = *iter ; mHandleEntryMap.erase(entry->mHandle); - mHeaderEntryQueue.erase(iter) ; - removeFromCache(entry) ; + // FIRE-33808 - Material Override Cache causes long delays + mHeaderEntryQueue.erase(iter); + removeFromCache(entry); + // delete entry; - // TODO also delete extras + } mNumEntries = mHandleEntryMap.size() ; } void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled) { + // FIRE-33808 - Material Override Cache causes long delays + std::string filename; + getObjectCacheFilename(handle, filename); + // if(!mEnabled) { - LL_WARNS() << "Not writing cache for handle " << handle << "): Cache is currently disabled." << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + LL_WARNS() << "Not writing cache for " << filename << " (handle:" << handle << "): Cache is currently disabled." << LL_ENDL; return ; } llassert_always(mInitialized); if(mReadOnly) { - LL_WARNS() << "Not writing cache for handle " << handle << "): Cache is currently in read-only mode." << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + LL_WARNS() << "Not writing cache for " << filename << " (handle:" << handle << "): Cache is currently in read-only mode." << LL_ENDL; return ; } @@ -1712,13 +1808,15 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: //update cache header if(!updateEntry(entry)) { - LL_WARNS() << "Failed to update cache header index " << entry->mIndex << ". handle = " << handle << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + LL_WARNS() << "Failed to update cache header index " << entry->mIndex << ". " << filename << " handle = " << handle << LL_ENDL; return ; //update failed. } if(!dirty_cache) { - LL_WARNS() << "Skipping write to cache for handle " << handle << ": cache not dirty" << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + LL_WARNS() << "Skipping write to cache for " << filename << " (handle:" << handle << "): cache not dirty" << LL_ENDL; return ; //nothing changed, no need to update. } @@ -1754,6 +1852,8 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: } else { + // FIRE-33808 - Material Override Cache causes long delays + LL_WARNS() << "Failed to write cache entry to buffer for " << filename << ", entry number " << iter->second->getLocalID() << LL_ENDL; success = false; break; } @@ -1765,6 +1865,8 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: size_in_buffer = 0; if (!success) { + // FIRE-33808 - Material Override Cache causes long delays + LL_WARNS() << "Failed to write cache to disk " << filename << LL_ENDL; break; } } @@ -1775,8 +1877,16 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: { // final write success = check_write(&apr_file, (void*)data_buffer, size_in_buffer); + // FIRE-33808 - Material Override Cache causes long delays + if(!success) + { + LL_WARNS() << "Failed to write cache entry to disk " << filename << LL_ENDL; + } + // size_in_buffer = 0; } + // FIRE-33808 - Material Override Cache causes long delays + LL_DEBUGS("VOCache") << "Wrote " << num_entries << " entries to the primary VOCache file " << filename << ". success = " << (success ? "True":"False") << LL_ENDL; } } } @@ -1788,6 +1898,18 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: return ; } +// FIRE-33808 - Material Override Cache causes long delays +void LLVOCache::removeGenericExtrasForHandle(U64 handle) +{ + if(mReadOnly) + { + LL_WARNS() << "Not removing cache for handle " << handle << ": Cache is currently in read-only mode." << LL_ENDL; + return ; + } + LL_WARNS("GLTF", "VOCache") << "Removing generic extras for handle " << handle << "Filename: " << getObjectCacheExtrasFilename(handle) << LL_ENDL; + LLFile::remove(getObjectCacheExtrasFilename(handle)); +} +// void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled) { @@ -1804,46 +1926,106 @@ void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LL return; } - std::string filename(getObjectCacheExtrasFilename(handle)); + // FIRE-33808 - Material Override Cache causes long delays + std::string filename = getObjectCacheExtrasFilename(handle); + // llofstream out(filename, std::ios::out | std::ios::binary); if(!out.good()) { LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL; + // FIRE-33808 - Material Override Cache causes long delays + // return; + // // TODO - clean up broken cache file + // } + + // out << id << '\n'; + // if(!out.good()) + // { + // LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL; + // return; + // // TODO - clean up broken cache file + // } + + // U32 num_entries = cache_extras_entry_map.size(); + // out << num_entries << '\n'; + // if(!out.good()) + // { + // LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL; + // return; + // // TODO - clean up broken cache file + // } + removeGenericExtrasForHandle(handle); return; - // TODO - clean up broken cache file } + // It is good practice to version file formats so let's add one. + // legacy versions will be treated as version 0. + out << LLGLTFOverrideCacheEntry::VERSION_LABEL << ":" << LLGLTFOverrideCacheEntry::VERSION << '\n'; out << id << '\n'; if(!out.good()) { LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL; + removeGenericExtrasForHandle(handle); // FIRE-33808 - Material Override Cache causes long delays return; - // TODO - clean up broken cache file } - U32 num_entries = cache_extras_entry_map.size(); - out << num_entries << '\n'; + auto num_entries_placeholder = out.tellp(); + out << std::setw(10) << std::setfill('0') << 0 << '\n'; if(!out.good()) { LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL; + removeGenericExtrasForHandle(handle); return; - // TODO - clean up broken cache file } - for (auto const & entry : cache_extras_entry_map) + // get ViewerRegion pointer from handle + LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromHandle(handle); + + U32 num_entries = 0; + U32 inmem_entries = 0; + U32 skipped = 0; + inmem_entries = cache_extras_entry_map.size(); + for (auto [local_id, entry] : cache_extras_entry_map) { - S32 local_id = entry.first; - LLSD entry_llsd = entry.second.toLLSD(); - entry_llsd["local_id"] = local_id; - LLSDSerialize::serialize(entry_llsd, out, LLSDSerialize::LLSD_XML); - out << '\n'; - if(!out.good()) + // Only write out GLTFOverrides that we can actually apply again on import. + // worst case we have an extra cache miss. + // Note: mObjectId is valid in memory as we might have a data race between GLTF of the object itself. + // This remains a valid state to persist as it is consistent with the localid checks on import with the main cache. + if(entry.mObjectId.isNull() && pRegion) { - LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL; - return; - // TODO - clean up broken cache file + gObjectList.getUUIDFromLocal( entry.mObjectId, local_id, pRegion->getHost().getAddress(), pRegion->getHost().getPort() ); + } + + if( /*entry.mObjectId.notNull() &&*/ + entry.mSides.size() > 0 && + entry.mSides.size() == entry.mGLTFMaterial.size() + ) + { + LLSD entry_llsd = entry.toLLSD(); + entry_llsd["local_id"] = (S32)local_id; + LLSDSerialize::serialize(entry_llsd, out, LLSDSerialize::LLSD_XML); + out << '\n'; + if(!out.good()) + { + // We're not in a good place when this happens so we might as well nuke the file. + LL_WARNS() << "Failed writing extras cache for handle " << handle << ". Corrupted cache file " << filename << " removed." << LL_ENDL; + removeGenericExtrasForHandle(handle); + return; + } + num_entries++; + } + else + { + skipped++; } } - - LL_DEBUGS("GLTF") << "Completed writing extras cache for handle " << handle << ", " << num_entries << " entries" << LL_ENDL; + out.seekp(num_entries_placeholder); + out << std::setw(10) << std::setfill('0') << num_entries << '\n'; + if(!out.good()) + { + LL_WARNS() << "Failed writing extras cache for handle " << handle << LL_ENDL; + removeGenericExtrasForHandle(handle); + return; + } + LL_DEBUGS("GLTF") << "Completed writing extras cache for handle " << handle << ", " << num_entries << " entries. Total in RAM: " << inmem_entries << " skipped (no persist): " << skipped << LL_ENDL; } diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 8525edd121..c4db69ed48 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -43,6 +43,8 @@ class LLCamera; class LLGLTFOverrideCacheEntry { public: + static const std::string VERSION_LABEL; + static const int VERSION; bool fromLLSD(const LLSD& data); LLSD toLLSD() const; @@ -95,12 +97,13 @@ public: } } }; - - struct ExtrasEntry - { - LLSD extras; - std::string extras_raw; - }; + // Unused, remove to reduce cognitive load + // struct ExtrasEntry + // { + // LLSD extras; + // std::string extras_raw; + // }; + // protected: ~LLVOCacheEntry(); @@ -288,13 +291,17 @@ public: // We need this init to be separate from constructor, since we might construct cache, purge it, then init. void initCache(ELLPath location, U32 size, U32 cache_version); void removeCache(ELLPath location, bool started = false) ; - - void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ; - void readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map); + // FIRE-33808 - Material Override Cache causes long delays + // void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ; + // void readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map); + bool readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ; + void readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map); + // void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled); void writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled); void removeEntry(U64 handle) ; + void removeGenericExtrasForHandle(U64 handle); // FIRE-33808 - Material Override Cache causes long delays U32 getCacheEntries() { return mNumEntries; } U32 getCacheEntriesMax() { return mCacheSize; } diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 0f2563b105..a1b271ff28 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -140,7 +140,7 @@ The Firestorm Development Team: top_pad="4" width="450" wrap="true"> -Ansariel Hiller, ArminWeatherHax, Arrehn Oberlander, Beq Janus, Cinder Roxley, Holy Gavenkrantz, Jessica Lyon, Kadah Coba, Kitty Barnett, Liny Odell, LordGregGreg Back, Mobius Ryba, Nicky Dasmijn, PanteraPolnocy, ScentualLust, Selo Jacobus, Tankmaster Finesmith, Techwolf Lupindo, Tonya Souther, Tozh Taurog, Vortex Saito, WoLf Loonie, Wolfspirit Magic and Zi Ree. +Ansariel Hiller, ArminWeatherHax, Arrehn Oberlander, Beq Janus, Cinder Roxley, Holy Gavenkrantz, Jessica Lyon, Kadah Coba, Kitty Barnett, Liny Odell, LordGregGreg Back, Mobius Ryba, Nicky Dasmijn, PanteraPolnocy, ScentualLust, Selo Jacobus, Tankmaster Finesmith, Techwolf Lupindo, Tonya Souther, Tozh Taurog, Vortex Saito, WoLf Loonie, Wolfspirit Magic, Yay N' Stuff (mygoditsfullofstars), and Zi Ree. -Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Angus Boyd, Animats, Armin Weatherwax, Beq Janus, Casper Warden, Chalice Yao, Chaser Zaks, Chorazin Allen, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Laurent Bechir, Magne Metaverse LLC, Magus Freston, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, MorganMegan, Morgan Pennent, mygoditsfullofstars, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Oren Hurvitz, Paladin Forzane, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Rebecca Ashbourne, Revolution Smythe, Romka Swallowtail, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Testicular Slingshot, Thickbrick Sleaford, Ubit Umarov, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, Zwagoth Klaar and others. +Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Angus Boyd, Animats, Armin Weatherwax, Casper Warden, Chalice Yao, Chaser Zaks, Chorazin Allen, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Laurent Bechir, Magne Metaverse LLC, Magus Freston, Makidoll, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, MorganMegan, Morgan Pennent, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Oren Hurvitz, Paladin Forzane, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Rebecca Ashbourne, Revolution Smythe, Romka Swallowtail, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Testicular Slingshot, Thickbrick Sleaford, Ubit Umarov, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, Zwagoth Klaar and others. + diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index d3e5270fe2..c5c96f142e 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -3220,6 +3220,19 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. [APP_NAME] ne peut pas s'exécuter car les pilotes de votre carte vidéo n'ont pas été installés correctement, ne sont pas à jour, ou sont pour du matériel non pris en charge. Assurez-vous d'avoir des pilotes de cartes vidéos récents, et même si vous avez les plus récents, réinstallez-les. Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. + + + Out Of Memory + + + La demande de mémoire de [APP_NAME] a échoué. L'application ne peut pas continuer et sera fermée. + +Si la mémoire vive de votre ordinateur est faible, quittez les applications lourdes avant de lancer [APP_NAME], allouez un fichier de page ou réduisez les paramètres graphiques tels que la distance de rendu. + + + [APP_NAME] n'a pas pu accéder ou trouver certains des fichiers dont il a besoin et sera fermé. + +Veuillez réinstaller la visionneuse à partir de [DOWNLOAD_URL] et contacter [SUPPORT_SITE] si le problème persiste après la réinstallation. Ombre de 5 heures diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index 7a2d53d5e2..907f397bfd 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -448,6 +448,7 @@ + diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index 0fee0c32bd..e43ba1fbcd 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -3088,6 +3088,19 @@ Uruchomione w oknie. Aplikacja [APP_NAME] nie może zostać uruchomiona, ponieważ sterowniki Twojej karty wideo są niepoprawnie zainstalowane, niezaktualizowane lub przeznaczone dla nieobsługiwanego rodzaju sprzętu. Upewnij się, że Twoja karta wideo została zaktualizowana poprawnie, spróbuj zainstalować sterowniki ponownie. Jeżeli nadal otrzymujesz ten komunikat, skontaktuj się z [SUPPORT_SITE]. + + + Zabrakło pamięci + + + Żądanie [APP_NAME] przydzielenia pamięci nie powiodło się. Aplikacja nie może kontynuować i zostanie zamknięta. + +Jeśli w komputerze jest mało pamięci RAM, zamknij wszystkie obciążające aplikacje przed uruchomieniem [APP_NAME], ustaw plik wymiany lub zmniejsz ustawienia graficzne, takie jak pole widzenia. + + + [APP_NAME] nie mogła uzyskać dostępu do niektórych potrzebnych plików, dlatego zostanie zamknięta. + +Zainstaluj ponownie przeglądarkę z [DOWNLOAD_URL] i skontaktuj się z [SUPPORT_SITE], jeśli problem będzie się powtarzał po reinstalacji. Cień na godzinie 5 diff --git a/indra/newview/skins/default/xui/ru/floater_bulk_perms.xml b/indra/newview/skins/default/xui/ru/floater_bulk_perms.xml index f134779a44..fce9ec25ff 100644 --- a/indra/newview/skins/default/xui/ru/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/ru/floater_bulk_perms.xml @@ -22,6 +22,7 @@ +