diff --git a/autobuild.xml b/autobuild.xml index 56c66b163f4..5dcc9a980a9 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -99,16 +99,6 @@ boost - copyright - (see individual source files) - description - Boost C++ Libraries - license - boost 1.0 - license_file - LICENSES/boost.txt - name - boost platforms darwin64 @@ -154,8 +144,18 @@ windows64 + license + boost 1.0 + license_file + LICENSES/boost.txt + copyright + (see individual source files) version 1.86 + name + boost + description + Boost C++ Libraries bugsplat @@ -205,14 +205,6 @@ colladadom - copyright - Copyright 2006 Sony Computer Entertainment Inc. - license - SCEA - license_file - LICENSES/collada.txt - name - colladadom platforms darwin64 @@ -258,8 +250,16 @@ windows64 + license + SCEA + license_file + LICENSES/collada.txt + copyright + Copyright 2006 Sony Computer Entertainment Inc. version 2.3.0-r8 + name + colladadom cubemaptoequirectangular @@ -441,16 +441,6 @@ dullahan - copyright - Copyright (c) 2017, Linden Research, Inc. - description - A headless browser SDK that uses the Chromium Embedded Framework (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with web based features like JavaScript or cookies. - license - MPL - license_file - LICENSES/LICENSE.txt - name - dullahan platforms darwin64 @@ -458,11 +448,11 @@ archive hash - 7fde76e3f0e62d0e0593b6157f4d740ecef2429d + 8f3672e548c140a48296669b65cb4ce9a54154e2 hash_algorithm sha1 url - https://github.com/secondlife/dullahan/releases/download/v1.14.0-r3/dullahan-1.14.0.202408091638_118.4.1_g3dd6078_chromium-118.0.5993.54-darwin64-10322607516.tar.zst + https://github.com/secondlife/dullahan/releases/download/v1.16.0-CEF_139.0.17/dullahan-1.16.0.202508120105_139.0.17_g6c347eb_chromium-139.0.7258.31-darwin64-16896111303.tar.zst name darwin64 @@ -486,18 +476,28 @@ archive hash - 4124c79d8b0e319877ffa4c12581d5c1318b4d93 + ec077eb13edf0b69324d73b49bb434e69e67d2d0 hash_algorithm sha1 url - https://github.com/secondlife/dullahan/releases/download/v1.14.0-r3/dullahan-1.14.0.202408091639_118.4.1_g3dd6078_chromium-118.0.5993.54-windows64-10322607516.tar.zst + https://github.com/secondlife/dullahan/releases/download/v1.16.0-CEF_139.0.17/dullahan-1.16.0.202508120105_139.0.17_g6c347eb_chromium-139.0.7258.31-windows64-16896111303.tar.zst name windows64 + license + MPL + license_file + LICENSES/LICENSE.txt + copyright + Copyright (c) 2017, Linden Research, Inc. version - 1.14.0.202408091639_118.4.1_g3dd6078_chromium-118.0.5993.54 + 1.16.0.202508120105_139.0.17_g6c347eb_chromium-139.0.7258.31 + name + dullahan + description + A headless browser SDK that uses the Chromium Embedded Framework (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with web based features like JavaScript or cookies. emoji_shortcodes @@ -625,16 +625,6 @@ freetype - copyright - Copyright 2006, 2007, 2008, 2009, 2010 by David Turner, Robert Wilhelm, and Werner Lemberg. - description - Font rendering library - license - FreeType - license_file - LICENSES/freetype.txt - name - freetype platforms darwin64 @@ -680,8 +670,18 @@ windows64 + license + FreeType + license_file + LICENSES/freetype.txt + copyright + Copyright 2006, 2007, 2008, 2009, 2010 by David Turner, Robert Wilhelm, and Werner Lemberg. version 2.13.3-cb2e120 + name + freetype + description + Font rendering library glext @@ -1395,15 +1395,6 @@ llca - copyright - Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project. - - license - mit - license_file - LICENSES/ca-license.txt - name - llca platforms common @@ -1421,8 +1412,17 @@ common + license + mit + license_file + LICENSES/ca-license.txt + copyright + Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project. + version 202407221423.0 + name + llca llphysicsextensions_source @@ -2620,14 +2620,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors vlc-bin - copyright - Copyright (C) 1998-2016 VLC authors and VideoLAN - license - GPL2 - license_file - LICENSES/vlc.txt - name - vlc-bin platforms darwin64 @@ -2659,8 +2651,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors windows64 + license + GPL2 + license_file + LICENSES/vlc.txt + copyright + Copyright (C) 1998-2016 VLC authors and VideoLAN version 3.0.21.10218721728 + name + vlc-bin vulkan_gltf @@ -2858,16 +2858,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors tinyexr - copyright - Copyright (c) 2014 - 2021, Syoyo Fujita and many contributors. - description - tinyexr import library - license - 3-clause BSD - license_file - LICENSES/tinyexr_license.txt - name - tinyexr platforms common @@ -2885,16 +2875,26 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors common - source_type - git + license + 3-clause BSD + license_file + LICENSES/tinyexr_license.txt + copyright + Copyright (c) 2014 - 2021, Syoyo Fujita and many contributors. + version + 1.0.9-5e8947c + name + tinyexr vcs_branch dependabot/github_actions/secondlife/action-autobuild-4 vcs_revision 4dc4d1d90d82a22843e2adf5130f9ecb5ee5769e vcs_url https://github.com/secondlife/3p-tinyexr - version - 1.0.9-5e8947c + description + tinyexr import library + source_type + git discord_sdk diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 64fc7e452b5..3f45ac971a8 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -38,6 +38,13 @@ #include "volume_catcher.h" #include "media_plugin_base.h" +// _getpid()/getpid() +#if LL_WINDOWS +#include +#else +#include +#endif + #include "dullahan.h" //////////////////////////////////////////////////////////////////////////////// @@ -64,7 +71,7 @@ class MediaPluginCEF : void onLoadStartCallback(); void onRequestExitCallback(); void onLoadEndCallback(int httpStatusCode, std::string url); - void onLoadError(int status, const std::string error_text); + void onLoadError(int status, const std::string error_text, const std::string error_url); void onAddressChangeCallback(std::string url); void onOpenPopupCallback(std::string url, std::string target); bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password); @@ -242,15 +249,17 @@ void MediaPluginCEF::onLoadStartCallback() ///////////////////////////////////////////////////////////////////////////////// // -void MediaPluginCEF::onLoadError(int status, const std::string error_text) +void MediaPluginCEF::onLoadError(int status, const std::string error_text, const std::string error_url) { std::stringstream msg; - msg << "Loading error!"; + msg << "Loading error"; msg << "

"; - msg << "Message: " << error_text; - msg << "
"; - msg << "Code: " << status; + msg << "Error message: " << error_text; + msg << "

"; + msg << "Error URL: " << error_url << ""; + msg << "

"; + msg << "Error code: " << status; mCEFLib->showBrowserMessage(msg.str()); } @@ -607,7 +616,12 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mCEFLib->setOnTooltipCallback(std::bind(&MediaPluginCEF::onTooltipCallback, this, std::placeholders::_1)); mCEFLib->setOnLoadStartCallback(std::bind(&MediaPluginCEF::onLoadStartCallback, this)); mCEFLib->setOnLoadEndCallback(std::bind(&MediaPluginCEF::onLoadEndCallback, this, std::placeholders::_1, std::placeholders::_2)); - mCEFLib->setOnLoadErrorCallback(std::bind(&MediaPluginCEF::onLoadError, this, std::placeholders::_1, std::placeholders::_2)); + + // CEF 139 seems to have introduced a loading failure at the login page (only?) I haven't seen it on + // any other page and it only happens about 1 in 8 times. Without this handler for the error page + // (red box, error message/code/url) the page load recovers after display a brief built in error. + // Not ideal but better than stopping altgoether. Will restore this once I discover the error. + //mCEFLib->setOnLoadErrorCallback(std::bind(&MediaPluginCEF::onLoadError, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); mCEFLib->setOnAddressChangeCallback(std::bind(&MediaPluginCEF::onAddressChangeCallback, this, std::placeholders::_1)); mCEFLib->setOnOpenPopupCallback(std::bind(&MediaPluginCEF::onOpenPopupCallback, this, std::placeholders::_1, std::placeholders::_2)); mCEFLib->setOnHTTPAuthCallback(std::bind(&MediaPluginCEF::onHTTPAuthCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4)); @@ -729,17 +743,34 @@ void MediaPluginCEF::receiveMessage(const char* message_string) std::string user_data_path_cache = message_in.getValue("cache_path"); std::string subfolder = message_in.getValue("username"); - mRootCachePath = user_data_path_cache + "cef_cache"; - if (!subfolder.empty()) - { - std::string delim; + // media plugin doesn't have access to gDirUtilp + std::string path_separator; #if LL_WINDOWS - // media plugin doesn't have access to gDirUtilp - delim = "\\"; + path_separator = "\\"; #else - delim = "/"; + path_separator = "/"; #endif - mCachePath = mRootCachePath + delim + subfolder; + + mRootCachePath = user_data_path_cache + "cef_cache"; + + // Issue #4498 Introduce an additional sub-folder underneath the main cache + // folder so that each CEF media instance gets its own (as per the CEF API + // official position). These folders will be removed at startup by Viewer code + // so that their non-trivial size does not exhaust available disk space. This + // begs the question - why turn on the cache at all? There are 2 reasons - firstly + // some of the instances will benefit from per Viewer session caching and will + // use the injected SL cookie and secondly, it's not clear how having no cache + // interacts with the multiple simultaneous paradigm we use. + mRootCachePath += path_separator; +# if LL_WINDOWS + mRootCachePath += std::to_string(_getpid()); +# else + mRootCachePath += std::to_string(getpid()); +# endif + + if (!subfolder.empty()) + { + mCachePath = mRootCachePath + path_separator + subfolder; } else { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 28b40543e9b..f7168598dcc 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4411,6 +4411,9 @@ bool LLAppViewer::initCache() const U32 CACHE_NUMBER_OF_REGIONS_FOR_OBJECTS = 128; LLVOCache::getInstance()->initCache(LL_PATH_CACHE, CACHE_NUMBER_OF_REGIONS_FOR_OBJECTS, getObjectCacheVersion()); + // Remove old, stale CEF cache folders + purgeCefStaleCaches(); + return true; } @@ -4435,18 +4438,27 @@ void LLAppViewer::loadKeyBindings() LLUrlRegistry::instance().setKeybindingHandler(&gViewerInput); } +// As per GHI #4498, remove old, stale CEF cache folders from previous sessions +void LLAppViewer::purgeCefStaleCaches() +{ + // TODO: we really shouldn't use a hard coded name for the cache folder here... + const std::string browser_parent_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "cef_cache"); + if (LLFile::isdir(browser_parent_cache)) + { + // This is a sledgehammer approach - nukes the cef_cache dir entirely + // which is then recreated the first time a CEF instance creates an + // individual cache folder. If we ever decide to retain some folders + // e.g. Search UI cache - then we will need a more granular approach. + gDirUtilp->deleteDirAndContents(browser_parent_cache); + } +} + void LLAppViewer::purgeCache() { LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL; LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE); LLVOCache::getInstance()->removeCache(LL_PATH_CACHE); LLViewerShaderMgr::instance()->clearShaderCache(); - std::string browser_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "cef_cache"); - if (LLFile::isdir(browser_cache)) - { - // cef does not support clear_cache and clear_cookies, so clear what we can manually. - gDirUtilp->deleteDirAndContents(browser_cache); - } gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*"); } diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 14e96afe94a..918300f6e59 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -220,6 +220,7 @@ class LLAppViewer : public LLApp void initGeneralThread(); void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; } + void purgeCefStaleCaches(); // Remove old, stale CEF cache folders void purgeCache(); // Clear the local cache. void purgeCacheImmediate(); //clear local cache immediately. S32 updateTextureThreads(F32 max_time); diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml index 2e1dfa00c7a..53796f09591 100644 --- a/indra/newview/skins/default/xui/en/floater_web_content.xml +++ b/indra/newview/skins/default/xui/en/floater_web_content.xml @@ -178,7 +178,7 @@ width="22"> + parameter="https://sl-viewer-media-system.s3.amazonaws.com/bookmarks/index.html"/>