From d163d9032314335825b6f713e388342dde9174e7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 28 Jul 2024 16:17:23 +0200 Subject: Fix callbacks for PBR region terrain panel not getting wired up properly --- indra/newview/llfloaterregioninfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 8807509a2e..3ef44bf74a 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -852,8 +852,9 @@ void LLPanelRegionInfo::initCtrl(const std::string& name) template void LLPanelRegionInfo::initAndSetCtrl(CTRL*& ctrl, const std::string& name) { - initCtrl(name); ctrl = findChild(name); + if (ctrl) + ctrl->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this)); } void LLPanelRegionInfo::onClickManageTelehub() -- cgit v1.2.3 From 2d69e4d2396d4d5d2e2b9d4959e668e57c08efd0 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 29 Jul 2024 10:09:56 +0200 Subject: Fix trailing whitespaces --- indra/llwebrtc/llwebrtc.cpp | 6 +++--- indra/llwebrtc/llwebrtc.h | 4 ++-- indra/llwebrtc/llwebrtc_impl.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index d5bd913315..6dc632aba4 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -458,7 +458,7 @@ void ll_set_device_module_render_device(rtc::scoped_refptrSetPlayoutDevice(webrtc::AudioDeviceModule::kDefaultDevice); } - else + else { device_module->SetPlayoutDevice(device); } @@ -656,7 +656,7 @@ void LLWebRTCImpl::freePeerConnection(LLWebRTCPeerConnectionInterface* peer_conn // Most peer connection (signaling) happens on // the signaling thread. -LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : +LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() : mWebRTCImpl(nullptr), mPeerConnection(nullptr), mMute(false), @@ -1171,7 +1171,7 @@ void LLWebRTCPeerConnectionImpl::OnSuccess(webrtc::SessionDescriptionInterface * { observer->OnOfferAvailable(mangled_sdp); } - + mPeerConnection->SetLocalDescription(std::unique_ptr( webrtc::CreateSessionDescription(webrtc::SdpType::kOffer, mangled_sdp)), rtc::scoped_refptr(this)); diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h index f447ea990a..54eefc8554 100644 --- a/indra/llwebrtc/llwebrtc.h +++ b/indra/llwebrtc/llwebrtc.h @@ -129,7 +129,7 @@ class LLWebRTCDeviceInterface }; virtual void setAudioConfig(AudioConfig config) = 0; - + // instructs webrtc to refresh the device list. virtual void refreshDevices() = 0; @@ -231,7 +231,7 @@ class LLWebRTCSignalingObserver class LLWebRTCPeerConnectionInterface { public: - + struct InitOptions { // equivalent of PeerConnectionInterface::IceServer diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index 6672f8ce90..2fb5525519 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -235,7 +235,7 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceS // The factory that allows creation of native webrtc PeerConnections. rtc::scoped_refptr mPeerConnectionFactory; - + rtc::scoped_refptr mAudioProcessingModule; // more native webrtc stuff -- cgit v1.2.3 From 897525f67414f24230e410845193d336d9dece54 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 2 Aug 2024 20:40:38 +0200 Subject: Fix integer underflow causing issues with wearables --- indra/newview/llappearancemgr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 9dd23a5319..6411be3d4f 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2133,11 +2133,11 @@ void LLAppearanceMgr::filterWearableItems( items.clear(); for (S32 i=0; i Date: Mon, 5 Aug 2024 20:18:24 +0300 Subject: viewer#2195 Voice morphs 'not supported' notification lacks description --- indra/newview/skins/default/xui/en/notifications.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 2403082938..e9a67fb707 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8839,6 +8839,7 @@ New Voice Morphs are available! Voice Morphs are not supported by this viewer. For more information about other voice morph tools, see [[FAQ_URL] this article]. voice -- cgit v1.2.3 From 293187e04b5dfbc002fd694b75ffdca4b2fdbc8e Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 5 Aug 2024 18:17:03 -0700 Subject: Build mac symbols for multiple binaries/dynamic libraries and upload them all to bugsplat --- .github/workflows/build.yaml | 16 ++++++++++++++-- build.sh | 4 ++-- indra/cmake/Linking.cmake | 1 + indra/llwebrtc/CMakeLists.txt | 2 ++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 57faafc042..c2abc503bb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -390,15 +390,27 @@ jobs: needs: build runs-on: ubuntu-latest steps: + - name: Download Mac Symbols + if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS + uses: actions/download-artifact@v4 + with: + name: macOS-symbols + path: _artifacts + - name: Unpack Mac Symbols + run: | + mkdir _extracted + tar -xJf ${{ needs.build.outputs.viewer_channel }}.sym.tar.gz -C _extracted - name: Post Mac symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: secondlife/viewer-build-util/post-bugsplat-mac@v2 + uses: Bugsplat-Git/symbol-upload@v9.1.1 with: username: ${{ env.BUGSPLAT_USER }} password: ${{ env.BUGSPLAT_PASS }} database: "SecondLife_Viewer_2018" - channel: ${{ needs.build.outputs.viewer_channel }} + application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} + directory: _extracted + files: "**/*.dSYM" release: needs: [setvar, build, sign-and-package-windows, sign-and-package-mac] diff --git a/build.sh b/build.sh index e025b73170..1a7ef1a941 100755 --- a/build.sh +++ b/build.sh @@ -527,8 +527,8 @@ then if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then # BugSplat wants to see xcarchive.zip - # e.g. build-darwin-x86_64/newview/Release/Second Life Test.xcarchive.zip - symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.xcarchive.zip" + # e.g. build-darwin-x86_64/newview/Release/Second Life Test.sym.tar.gz + symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.sym.tar.gz if [[ ! -f "$symbol_file" ]] then # symbol tarball we prep for (e.g.) Breakpad diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 0ab30d0800..a5b8767923 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -19,6 +19,7 @@ if (WINDOWS OR DARWIN ) endif() else() set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$,$,>) + set(SYMBOLS_STAGING_DIR ${CMAKE_BINARY_DIR}/symbols/$,$,>) endif() if( DARWIN ) diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index fd1788c5d4..a8d23b461a 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -41,6 +41,8 @@ if (WINDOWS) iphlpapi) elseif (DARWIN) target_link_libraries(llwebrtc PRIVATE ll::webrtc) + set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" + XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}") elseif (LINUX) target_link_libraries(llwebrtc PRIVATE ll::webrtc) endif (WINDOWS) -- cgit v1.2.3 From e96416bdd2ed20b8b5a1fc08a35c7a4ee4eee832 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 5 Aug 2024 19:25:59 -0700 Subject: missing quotes --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 1a7ef1a941..26c4399ae8 100755 --- a/build.sh +++ b/build.sh @@ -528,7 +528,7 @@ then then # BugSplat wants to see xcarchive.zip # e.g. build-darwin-x86_64/newview/Release/Second Life Test.sym.tar.gz - symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.sym.tar.gz + symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.sym.tar.gz" if [[ ! -f "$symbol_file" ]] then # symbol tarball we prep for (e.g.) Breakpad -- cgit v1.2.3 From 946b165b99fe1cffbb756a6ee8ff3fa7af756cc6 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 5 Aug 2024 21:34:52 -0700 Subject: Missed file --- build.sh | 1 - indra/newview/CMakeLists.txt | 40 ++++++++++++++++------------------------ 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/build.sh b/build.sh index 26c4399ae8..e09e6f9f5c 100755 --- a/build.sh +++ b/build.sh @@ -526,7 +526,6 @@ then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then - # BugSplat wants to see xcarchive.zip # e.g. build-darwin-x86_64/newview/Release/Second Life Test.sym.tar.gz symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.sym.tar.gz" if [[ ! -f "$symbol_file" ]] diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index da4060ccec..8ff96f0f3b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2086,7 +2086,7 @@ if (DARWIN) set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/$,$,>/${product}.app") set(VIEWER_APP_EXE "${VIEWER_APP_BUNDLE}/Contents/MacOS/${product}") set(VIEWER_APP_DSYM "${VIEWER_APP_EXE}.dSYM") - set(VIEWER_APP_XCARCHIVE "${VIEWER_APP_BUNDLE}/../${product}.xcarchive.zip") + set(VIEWER_APP_SYMBOLS_ARCHIVE "${VIEWER_APP_BUNDLE}/../${product}.sym.tar.gz") configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist" @@ -2191,41 +2191,33 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE add_dependencies(generate_symbols ${VIEWER_BINARY_NAME}) endif (WINDOWS) if (DARWIN) - # Have to run dsymutil first, then pack up the resulting .dSYM directory - add_custom_command(OUTPUT "${VIEWER_APP_DSYM}" - COMMAND "dsymutil" - ARGS - ${VIEWER_APP_EXE} - COMMENT "Generating ${VIEWER_APP_DSYM}" - ) - add_custom_target(dsym_generate DEPENDS "${VIEWER_APP_DSYM}") - add_dependencies(dsym_generate ${VIEWER_BINARY_NAME}) - add_custom_command(OUTPUT "${VIEWER_APP_XCARCHIVE}" - COMMAND "zip" + set_target_properties(${VIEWER_BINARY_NAME} + PROPERTIES + XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" + XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}") + add_custom_command(OUTPUT "${VIEWER_APP_SYMBOLS_ARCHIVE}" + COMMAND "tar" ARGS - "-r" - "${VIEWER_APP_XCARCHIVE}" + "-cJf" + "${VIEWER_APP_SYMBOLS_ARCHIVE}" + "-C" + "${SYMBOLS_STAGING_DIR}" "." - WORKING_DIRECTORY "${VIEWER_APP_DSYM}/.." - DEPENDS "${VIEWER_APP_DSYM}" - COMMENT "Generating xcarchive.zip for upload to BugSplat" + DEPENDS "${VIEWER_BINARY_NAME}" + COMMENT "Generating symbols archive for upload to BugSplat" ) - add_custom_target(dsym_xcarchive DEPENDS "${VIEWER_APP_XCARCHIVE}") - add_dependencies(dsym_xcarchive dsym_generate) # Have to create a stamp file, and depend on it, to force CMake to run # the cleanup step. add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp" COMMAND rm -rf "${VIEWER_APP_DSYM}" COMMAND touch "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp" - DEPENDS "${VIEWER_APP_XCARCHIVE}" - COMMENT "Cleaning up dSYM" + DEPENDS "${VIEWER_APP_SYMBOLS_ARCHIVE}" + COMMENT "Cleaning up symbols archive" ) add_custom_target(generate_symbols DEPENDS - "${VIEWER_APP_DSYM}" - "${VIEWER_APP_XCARCHIVE}" + "${VIEWER_APP_SYMBOLS_ARCHIVE}" "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp" ) - add_dependencies(generate_symbols dsym_xcarchive) endif (DARWIN) if (LINUX) # TBD -- cgit v1.2.3 From 07573f7e10a9ce4df2c2a0f6c6eb5f0935da57a6 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 5 Aug 2024 23:16:48 -0700 Subject: allow paths with spaces --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c2abc503bb..cf14bac0a2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -399,7 +399,7 @@ jobs: - name: Unpack Mac Symbols run: | mkdir _extracted - tar -xJf ${{ needs.build.outputs.viewer_channel }}.sym.tar.gz -C _extracted + tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.gz" -C _extracted - name: Post Mac symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS uses: Bugsplat-Git/symbol-upload@v9.1.1 -- cgit v1.2.3 From 83c1f45dbacecd9a9fe2a99c8dcd307b143f2b35 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 6 Aug 2024 00:26:43 -0700 Subject: Download osx artifacts to working directory --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cf14bac0a2..506dbff664 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -395,7 +395,6 @@ jobs: uses: actions/download-artifact@v4 with: name: macOS-symbols - path: _artifacts - name: Unpack Mac Symbols run: | mkdir _extracted -- cgit v1.2.3 From bf21677305f7dc725cb0872ee3bcf251efef40f7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 6 Aug 2024 15:39:21 +0300 Subject: viewer-private#261 (Vivox) Viewer doesn't reconnect to voice chat If state was 'ringing' viewer failed to set mSessionTerminateRequested on cancel so the call kept sort of going --- indra/newview/llvoicevivox.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 3392e4de86..13402513ef 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -2149,7 +2149,6 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session) mIsInChannel = true; mMuteMicDirty = true; - mSessionTerminateRequested = false; while (!sShuttingDown && mVoiceEnabled @@ -5435,8 +5434,8 @@ void LLVivoxVoiceClient::leaveChannel(void) { LL_DEBUGS("Voice") << "leaving channel for teleport/logout" << LL_ENDL; mChannelName.clear(); - sessionTerminate(); } + sessionTerminate(); } void LLVivoxVoiceClient::setMuteMic(bool muted) -- cgit v1.2.3 From c52c25e10db2b86a70929793a5d723c012a37671 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 6 Aug 2024 12:06:40 -0700 Subject: As bugspat upload is broken for dylibs within .dSYM bundles, upload the dylibs directly --- .github/workflows/build.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 506dbff664..21016c1015 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -399,7 +399,7 @@ jobs: run: | mkdir _extracted tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.gz" -C _extracted - - name: Post Mac symbols + - name: Post Mac Executable symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS uses: Bugsplat-Git/symbol-upload@v9.1.1 with: @@ -409,7 +409,18 @@ jobs: application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} directory: _extracted - files: "**/*.dSYM" + files: "**/*.app.dSYM" + - name: Post Mac Dylib symbols + if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS + uses: Bugsplat-Git/symbol-upload@v9.1.1 + with: + username: ${{ env.BUGSPLAT_USER }} + password: ${{ env.BUGSPLAT_PASS }} + database: "SecondLife_Viewer_2018" + application: ${{ needs.build.outputs.viewer_channel }} + version: ${{ needs.build.outputs.viewer_version }} + directory: _extracted + files: "**/*.dylib" release: needs: [setvar, build, sign-and-package-windows, sign-and-package-mac] -- cgit v1.2.3 From ece9cb8022d1c889bfd02ce52f0dd470460d5a21 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 6 Aug 2024 18:41:46 -0700 Subject: Build an xcarchive for mac symbol upload. --- build.sh | 4 ++-- indra/llwebrtc/CMakeLists.txt | 2 +- indra/newview/CMakeLists.txt | 40 ++++++++++++++++------------------------ 3 files changed, 19 insertions(+), 27 deletions(-) diff --git a/build.sh b/build.sh index e09e6f9f5c..ab78b56515 100755 --- a/build.sh +++ b/build.sh @@ -526,8 +526,8 @@ then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then - # e.g. build-darwin-x86_64/newview/Release/Second Life Test.sym.tar.gz - symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.sym.tar.gz" + # e.g. build-darwin-x86_64/symbols/Release/Second Life Test.xarchive.zip + symbol_file="${build_dir}/symbols/${variant}/${viewer_channel}.xarchive.zip" if [[ ! -f "$symbol_file" ]] then # symbol tarball we prep for (e.g.) Breakpad diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index a8d23b461a..e7c7248b0c 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -42,7 +42,7 @@ if (WINDOWS) elseif (DARWIN) target_link_libraries(llwebrtc PRIVATE ll::webrtc) set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" - XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}") + XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}/dSYMs") elseif (LINUX) target_link_libraries(llwebrtc PRIVATE ll::webrtc) endif (WINDOWS) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8ff96f0f3b..000f2e2684 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2085,8 +2085,8 @@ if (DARWIN) set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/$,$,>/${product}.app") set(VIEWER_APP_EXE "${VIEWER_APP_BUNDLE}/Contents/MacOS/${product}") - set(VIEWER_APP_DSYM "${VIEWER_APP_EXE}.dSYM") set(VIEWER_APP_SYMBOLS_ARCHIVE "${VIEWER_APP_BUNDLE}/../${product}.sym.tar.gz") + set(VIEWER_APP_XCARCHIVE "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}.xcarchive.zip") configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist" @@ -2191,32 +2191,24 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE add_dependencies(generate_symbols ${VIEWER_BINARY_NAME}) endif (WINDOWS) if (DARWIN) - set_target_properties(${VIEWER_BINARY_NAME} + # we only need an xcarchive with dSYMs (including the application) + set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" - XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}") - add_custom_command(OUTPUT "${VIEWER_APP_SYMBOLS_ARCHIVE}" - COMMAND "tar" - ARGS - "-cJf" - "${VIEWER_APP_SYMBOLS_ARCHIVE}" - "-C" - "${SYMBOLS_STAGING_DIR}" - "." - DEPENDS "${VIEWER_BINARY_NAME}" - COMMENT "Generating symbols archive for upload to BugSplat" - ) - # Have to create a stamp file, and depend on it, to force CMake to run - # the cleanup step. - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp" - COMMAND rm -rf "${VIEWER_APP_DSYM}" - COMMAND touch "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp" - DEPENDS "${VIEWER_APP_SYMBOLS_ARCHIVE}" - COMMENT "Cleaning up symbols archive" - ) + XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/${product}/dSYMs") + + add_custom_command(OUTPUT "${VIEWER_APP_XCARCHIVE}" + COMMAND "zip" + ARGS + "-r" + "${VIEWER_APP_XCARCHIVE}" + "${product}" + WORKING_DIRECTORY "${SYMBOLS_STAGING_DIR}" + DEPENDS "${VIEWER_BINARY_NAME}" llwebrtc + COMMENT "Generating ${VIEWER_APP_XCARCHIVE} for upload to BugSplat" + ) add_custom_target(generate_symbols DEPENDS - "${VIEWER_APP_SYMBOLS_ARCHIVE}" - "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp" + "${VIEWER_APP_XCARCHIVE}" ) endif (DARWIN) if (LINUX) -- cgit v1.2.3 From b6cd0cd7d0e3086c10c8d98deaeda65b7d95bcb4 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 6 Aug 2024 19:43:26 -0700 Subject: misspelled xcarchive --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index ab78b56515..2a2227657b 100755 --- a/build.sh +++ b/build.sh @@ -527,7 +527,7 @@ then if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then # e.g. build-darwin-x86_64/symbols/Release/Second Life Test.xarchive.zip - symbol_file="${build_dir}/symbols/${variant}/${viewer_channel}.xarchive.zip" + symbol_file="${build_dir}/symbols/${variant}/${viewer_channel}.xcarchive.zip" if [[ ! -f "$symbol_file" ]] then # symbol tarball we prep for (e.g.) Breakpad -- cgit v1.2.3 From fc0e70e77b44a510ad1bf2a34fa04236aa4624a2 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 6 Aug 2024 21:00:48 -0700 Subject: upload xcarchive to bugsplat --- .github/workflows/build.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 21016c1015..c88a23b85e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -395,10 +395,6 @@ jobs: uses: actions/download-artifact@v4 with: name: macOS-symbols - - name: Unpack Mac Symbols - run: | - mkdir _extracted - tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.gz" -C _extracted - name: Post Mac Executable symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS uses: Bugsplat-Git/symbol-upload@v9.1.1 @@ -408,8 +404,8 @@ jobs: database: "SecondLife_Viewer_2018" application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} - directory: _extracted - files: "**/*.app.dSYM" + directory: . + files: "**/*.xcarchive.zip" - name: Post Mac Dylib symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS uses: Bugsplat-Git/symbol-upload@v9.1.1 -- cgit v1.2.3 From b5c9a30e3da8d75b3343a79ba64b7cc81da9991e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 6 Aug 2024 21:13:33 +0300 Subject: viewer#2203 Crash at breakVoiceConnectionCoro bar webrtc's coroutines from necromancy --- indra/newview/llvoicewebrtc.cpp | 69 +++++++++++++++++++++-------------------- indra/newview/llvoicewebrtc.h | 9 +++--- 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 3164886494..f5105f0ca1 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -459,6 +459,7 @@ void LLWebRTCVoiceClient::voiceConnectionCoro() // Could help with voice updates making for smoother // voice when we're busy. llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS); + if (sShuttingDown) return; // 'this' migh already be invalid bool voiceEnabled = mVoiceEnabled; if (!isAgentAvatarValid()) @@ -2186,47 +2187,47 @@ void LLVoiceWebRTCConnection::processIceUpdates() { mOutstandingRequests++; LLCoros::getInstance()->launch("LLVoiceWebRTCConnection::processIceUpdatesCoro", - boost::bind(&LLVoiceWebRTCConnection::processIceUpdatesCoro, this)); + boost::bind(&LLVoiceWebRTCConnection::processIceUpdatesCoro, this->shared_from_this())); } // Ice candidates may be streamed in before or after the SDP offer is available (see below) // This function determines whether candidates are available to send to the Secondlife WebRTC // server via the simulator. If so, and there are no more candidates, this code // will make the cap call to the server sending up the ICE candidates. -void LLVoiceWebRTCConnection::processIceUpdatesCoro() +void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE - if (mShutDown || LLWebRTCVoiceClient::isShuttingDown()) + if (connection->mShutDown || LLWebRTCVoiceClient::isShuttingDown()) { - mOutstandingRequests--; + connection->mOutstandingRequests--; return; } bool iceCompleted = false; LLSD body; - if (!mIceCandidates.empty() || mIceCompleted) + if (!connection->mIceCandidates.empty() || connection->mIceCompleted) { - LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(mRegionID); + LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(connection->mRegionID); if (!regionp || !regionp->capabilitiesReceived()) { LL_DEBUGS("Voice") << "no capabilities for ice gathering; waiting " << LL_ENDL; - mOutstandingRequests--; + connection->mOutstandingRequests--; return; } std::string url = regionp->getCapability("VoiceSignalingRequest"); if (url.empty()) { - mOutstandingRequests--; + connection->mOutstandingRequests--; return; } LL_DEBUGS("Voice") << "region ready to complete voice signaling; url=" << url << LL_ENDL; - if (!mIceCandidates.empty()) + if (!connection->mIceCandidates.empty()) { LLSD candidates = LLSD::emptyArray(); - for (auto &ice_candidate : mIceCandidates) + for (auto &ice_candidate : connection->mIceCandidates) { LLSD body_candidate; body_candidate["sdpMid"] = ice_candidate.mSdpMid; @@ -2235,18 +2236,18 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro() candidates.append(body_candidate); } body["candidates"] = candidates; - mIceCandidates.clear(); + connection->mIceCandidates.clear(); } - else if (mIceCompleted) + else if (connection->mIceCompleted) { LLSD body_candidate; body_candidate["completed"] = true; body["candidate"] = body_candidate; - iceCompleted = mIceCompleted; - mIceCompleted = false; + iceCompleted = connection->mIceCompleted; + connection->mIceCompleted = false; } - body["viewer_session"] = mViewerSession; + body["viewer_session"] = connection->mViewerSession; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( @@ -2261,7 +2262,7 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro() if (LLWebRTCVoiceClient::isShuttingDown()) { - mOutstandingRequests--; + connection->mOutstandingRequests--; return; } @@ -2271,10 +2272,10 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro() if (!status) { // couldn't trickle the candidates, so restart the session. - setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); + connection->setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); } } - mOutstandingRequests--; + connection->mOutstandingRequests--; } @@ -2428,31 +2429,31 @@ void LLVoiceWebRTCConnection::sendData(const std::string &data) // Tell the simulator that we're shutting down a voice connection. // The simulator will pass this on to the Secondlife WebRTC server. -void LLVoiceWebRTCConnection::breakVoiceConnectionCoro() +void LLVoiceWebRTCConnection::breakVoiceConnectionCoro(connectionPtr_t connection) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE LL_DEBUGS("Voice") << "Disconnecting voice." << LL_ENDL; - if (mWebRTCDataInterface) + if (connection->mWebRTCDataInterface) { - mWebRTCDataInterface->unsetDataObserver(this); - mWebRTCDataInterface = nullptr; + connection->mWebRTCDataInterface->unsetDataObserver(connection.get()); + connection->mWebRTCDataInterface = nullptr; } - mWebRTCAudioInterface = nullptr; - LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(mRegionID); + connection->mWebRTCAudioInterface = nullptr; + LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(connection->mRegionID); if (!regionp || !regionp->capabilitiesReceived()) { LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL; - setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); - mOutstandingRequests--; + connection->setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); + connection->mOutstandingRequests--; return; } std::string url = regionp->getCapability("ProvisionVoiceAccountRequest"); if (url.empty()) { - setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); - mOutstandingRequests--; + connection->setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); + connection->mOutstandingRequests--; return; } @@ -2461,7 +2462,7 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro() LLVoiceWebRTCStats::getInstance()->provisionAttemptStart(); LLSD body; body["logout"] = TRUE; - body["viewer_session"] = mViewerSession; + body["viewer_session"] = connection->mViewerSession; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( @@ -2472,15 +2473,15 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro() httpOpts->setWantHeaders(true); - mOutstandingRequests++; + connection->mOutstandingRequests++; // tell the server to shut down the connection as a courtesy. // shutdownConnection will drop the WebRTC connection which will // also shut things down. LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts); - mOutstandingRequests--; - setVoiceConnectionState(VOICE_STATE_SESSION_EXIT); + connection->mOutstandingRequests--; + connection->setVoiceConnectionState(VOICE_STATE_SESSION_EXIT); } // Tell the simulator to tell the Secondlife WebRTC server that we want a voice @@ -2664,7 +2665,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() // VOICE_STATE_SESSION_ESTABLISHED via a callback on a webrtc thread. setVoiceConnectionState(VOICE_STATE_CONNECTION_WAIT); LLCoros::getInstance()->launch("LLVoiceWebRTCConnection::requestVoiceConnectionCoro", - boost::bind(&LLVoiceWebRTCConnection::requestVoiceConnectionCoro, this)); + boost::bind(&LLVoiceWebRTCConnection::requestVoiceConnectionCoro, this->shared_from_this())); break; case VOICE_STATE_CONNECTION_WAIT: @@ -2744,7 +2745,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() case VOICE_STATE_DISCONNECT: setVoiceConnectionState(VOICE_STATE_WAIT_FOR_EXIT); LLCoros::instance().launch("LLVoiceWebRTCConnection::breakVoiceConnectionCoro", - boost::bind(&LLVoiceWebRTCConnection::breakVoiceConnectionCoro, this)); + boost::bind(&LLVoiceWebRTCConnection::breakVoiceConnectionCoro, this->shared_from_this())); break; case VOICE_STATE_WAIT_FOR_EXIT: diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index 8a65ef667c..570425dc3d 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -576,7 +576,8 @@ class LLVoiceWebRTCStats : public LLSingleton class LLVoiceWebRTCConnection : public llwebrtc::LLWebRTCSignalingObserver, - public llwebrtc::LLWebRTCDataObserver + public llwebrtc::LLWebRTCDataObserver, + public boost::enable_shared_from_this { public: LLVoiceWebRTCConnection(const LLUUID ®ionID, const std::string &channelID); @@ -610,7 +611,7 @@ class LLVoiceWebRTCConnection : void processIceUpdates(); - void processIceUpdatesCoro(); + static void processIceUpdatesCoro(connectionPtr_t connection); virtual void setMuteMic(bool muted); virtual void setSpeakerVolume(F32 volume); @@ -677,9 +678,9 @@ class LLVoiceWebRTCConnection : } virtual void requestVoiceConnection() = 0; - void requestVoiceConnectionCoro() { requestVoiceConnection(); } + static void requestVoiceConnectionCoro(connectionPtr_t connection) { connection->requestVoiceConnection(); } - void breakVoiceConnectionCoro(); + static void breakVoiceConnectionCoro(connectionPtr_t connection); LLVoiceClientStatusObserver::EStatusType mCurrentStatus; -- cgit v1.2.3 From 753cf01ef0165e840d90fe9e9b943eb27c2b6f19 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 6 Aug 2024 22:24:38 -0700 Subject: don't need to post dylib as we're using xcarchive --- .github/workflows/build.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c88a23b85e..03dcad2158 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -395,7 +395,7 @@ jobs: uses: actions/download-artifact@v4 with: name: macOS-symbols - - name: Post Mac Executable symbols + - name: Post Mac symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS uses: Bugsplat-Git/symbol-upload@v9.1.1 with: @@ -406,17 +406,6 @@ jobs: version: ${{ needs.build.outputs.viewer_version }} directory: . files: "**/*.xcarchive.zip" - - name: Post Mac Dylib symbols - if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: Bugsplat-Git/symbol-upload@v9.1.1 - with: - username: ${{ env.BUGSPLAT_USER }} - password: ${{ env.BUGSPLAT_PASS }} - database: "SecondLife_Viewer_2018" - application: ${{ needs.build.outputs.viewer_channel }} - version: ${{ needs.build.outputs.viewer_version }} - directory: _extracted - files: "**/*.dylib" release: needs: [setvar, build, sign-and-package-windows, sign-and-package-mac] -- cgit v1.2.3 From ae7f7cd6701ae9fed57c687b03aabad0d954b230 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Aug 2024 09:28:06 +0300 Subject: Replace boost::shared_ptr with std in voice classes --- indra/llcommon/llerrorcontrol.h | 2 +- indra/llinventory/llsettingsdaycycle.cpp | 1 - indra/llinventory/llsettingswater.cpp | 1 - indra/newview/llenvironment.cpp | 2 -- indra/newview/lleventpoll.cpp | 2 -- indra/newview/llfloatereditenvironmentbase.cpp | 2 -- indra/newview/llfloaterfixedenvironment.cpp | 2 -- indra/newview/llsculptidsize.cpp | 2 -- indra/newview/llselectmgr.h | 1 - indra/newview/llsettingsvo.cpp | 1 - indra/newview/llvoiceclient.h | 2 +- indra/newview/llvoicevivox.cpp | 2 +- indra/newview/llvoicewebrtc.cpp | 4 ++-- indra/newview/llvoicewebrtc.h | 14 +++++++------- 14 files changed, 12 insertions(+), 26 deletions(-) diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h index bf5a6df556..cbb703e9e7 100644 --- a/indra/llcommon/llerrorcontrol.h +++ b/indra/llcommon/llerrorcontrol.h @@ -198,7 +198,7 @@ namespace LLError }; /** - * @NOTE: addRecorder() and removeRecorder() uses the boost::shared_ptr to allow for shared ownership + * @NOTE: addRecorder() and removeRecorder() uses the std::shared_ptr to allow for shared ownership * while still ensuring that the allocated memory is eventually freed */ LL_COMMON_API void addRecorder(RecorderPtr); diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp index ef6a187d06..3050cdf953 100644 --- a/indra/llinventory/llsettingsdaycycle.cpp +++ b/indra/llinventory/llsettingsdaycycle.cpp @@ -28,7 +28,6 @@ #include "llsettingsdaycycle.h" #include "llerror.h" #include -#include #include "lltrace.h" #include "llfasttimer.h" #include "v3colorutil.h" diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp index 4cd84970ff..161b8cda25 100644 --- a/indra/llinventory/llsettingswater.cpp +++ b/indra/llinventory/llsettingswater.cpp @@ -27,7 +27,6 @@ #include "llsettingswater.h" #include -#include #include "lltrace.h" #include "llfasttimer.h" #include "v3colorutil.h" diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 3c0a523317..5170e9a68b 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -54,8 +54,6 @@ #include "llregioninfomodel.h" -#include - #include "llatmosphere.h" #include "llagent.h" #include "roles_constants.h" diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 471bb6d478..c05a7fef44 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -40,8 +40,6 @@ #include "llcorehttputil.h" #include "lleventfilter.h" -#include "boost/make_shared.hpp" - namespace LLEventPolling { namespace Details diff --git a/indra/newview/llfloatereditenvironmentbase.cpp b/indra/newview/llfloatereditenvironmentbase.cpp index 109c7a286c..e63032c0d8 100644 --- a/indra/newview/llfloatereditenvironmentbase.cpp +++ b/indra/newview/llfloatereditenvironmentbase.cpp @@ -28,8 +28,6 @@ #include "llfloatereditenvironmentbase.h" -#include - // libs #include "llnotifications.h" #include "llnotificationsutil.h" diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index ad9f83701c..fb26f1b872 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -28,8 +28,6 @@ #include "llfloaterfixedenvironment.h" -#include - // libs #include "llbutton.h" #include "llnotifications.h" diff --git a/indra/newview/llsculptidsize.cpp b/indra/newview/llsculptidsize.cpp index 3bc5ad7616..6be05fb003 100644 --- a/indra/newview/llsculptidsize.cpp +++ b/indra/newview/llsculptidsize.cpp @@ -29,8 +29,6 @@ #include "llvovolume.h" #include "lldrawable.h" #include "llvoavatar.h" -//boost -#include "boost/make_shared.hpp" //........... diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 02c74d0ab0..0f9c76a2a1 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -48,7 +48,6 @@ #include #include #include -#include // boost::make_shared class LLMessageSystem; class LLViewerTexture; diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 76632a83ae..5008061ec8 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -33,7 +33,6 @@ #include #include -#include #include "lltrace.h" #include "llfasttimer.h" #include "v3colorutil.h" diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index c8a65378c6..a263333bd3 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -133,7 +133,7 @@ class LLVoiceP2PIncomingCallInterface virtual void declineInvite() = 0; }; -typedef boost::shared_ptr LLVoiceP2PIncomingCallInterfacePtr; +typedef std::shared_ptr LLVoiceP2PIncomingCallInterfacePtr; ////////////////////////////////// /// @class LLVoiceModuleInterface diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 13402513ef..6be6b1d4f2 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -4973,7 +4973,7 @@ void LLVivoxVoiceClient::hangup() { leaveChannel(); } LLVoiceP2PIncomingCallInterfacePtr LLVivoxVoiceClient::getIncomingCallInterface(const LLSD &voice_call_info) { - return boost::make_shared(voice_call_info); + return std::make_shared(voice_call_info); } bool LLVivoxVoiceClient::answerInvite(const std::string &sessionHandle) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index f5105f0ca1..e5feae17f2 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -1964,8 +1964,8 @@ bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates() for (auto &connection : mWebRTCConnections) { - boost::shared_ptr spatialConnection = - boost::static_pointer_cast(connection); + std::shared_ptr spatialConnection = + std::static_pointer_cast(connection); LLUUID regionID = spatialConnection.get()->getRegionID(); diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index 570425dc3d..f4ea329cb6 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -55,7 +55,7 @@ class LLWebRTCProtocolParser; class LLAvatarName; class LLVoiceWebRTCConnection; -typedef boost::shared_ptr connectionPtr_t; +typedef std::shared_ptr connectionPtr_t; extern const std::string WEBRTC_VOICE_SERVER_TYPE; @@ -252,7 +252,7 @@ public: bool mIsModeratorMuted; LLUUID mRegion; }; - typedef boost::shared_ptr participantStatePtr_t; + typedef std::shared_ptr participantStatePtr_t; participantStatePtr_t findParticipantByID(const std::string &channelID, const LLUUID &id); participantStatePtr_t addParticipantByID(const std::string& channelID, const LLUUID &id, const LLUUID& region); @@ -265,10 +265,10 @@ public: class sessionState { public: - typedef boost::shared_ptr ptr_t; - typedef boost::weak_ptr wptr_t; + typedef std::shared_ptr ptr_t; + typedef std::weak_ptr wptr_t; - typedef boost::function sessionFunc_t; + typedef std::function sessionFunc_t; static void addSession(const std::string &channelID, ptr_t& session); virtual ~sessionState(); @@ -336,7 +336,7 @@ public: sessionFunc_t func); }; - typedef boost::shared_ptr sessionStatePtr_t; + typedef std::shared_ptr sessionStatePtr_t; typedef std::map sessionMap; class estateSessionState : public sessionState @@ -577,7 +577,7 @@ class LLVoiceWebRTCStats : public LLSingleton class LLVoiceWebRTCConnection : public llwebrtc::LLWebRTCSignalingObserver, public llwebrtc::LLWebRTCDataObserver, - public boost::enable_shared_from_this + public std::enable_shared_from_this { public: LLVoiceWebRTCConnection(const LLUUID ®ionID, const std::string &channelID); -- cgit v1.2.3 From 9094d0281d362bd2caab5a34f42222aa1e24d9c2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Aug 2024 09:54:31 +0300 Subject: Adjust some LLVoiceClient functions Feels like I should have made isParticipant and getParticipantList static to minimize singleton dependency/calls --- indra/newview/lloutputmonitorctrl.cpp | 12 +++++++----- indra/newview/llspeakers.cpp | 22 ++++++++++++---------- indra/newview/llvoicechannel.cpp | 6 +++--- indra/newview/llvoicechannel.h | 6 +++--- indra/newview/llvoiceclient.cpp | 10 +++++----- indra/newview/llvoiceclient.h | 8 ++++---- 6 files changed, 34 insertions(+), 30 deletions(-) diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index db43c57139..28433b36f4 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -126,29 +126,31 @@ void LLOutputMonitorCtrl::draw() const F32 LEVEL_1 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL * 2.f / 3.f; const F32 LEVEL_2 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL; + LLVoiceClient* vocie_client = LLVoiceClient::getInstance(); + if (getVisible() && mAutoUpdate && !getIsMuted() && mSpeakerId.notNull()) { - setPower(LLVoiceClient::getInstance()->getCurrentPower(mSpeakerId)); + setPower(vocie_client->getCurrentPower(mSpeakerId)); if(mIsAgentControl) { - setIsTalking(LLVoiceClient::getInstance()->getUserPTTState()); + setIsTalking(vocie_client->getUserPTTState()); } else { - setIsTalking(LLVoiceClient::getInstance()->getIsSpeaking(mSpeakerId)); + setIsTalking(vocie_client->getIsSpeaking(mSpeakerId)); } } if ((mPower == 0.f && !mIsTalking) && mShowParticipantsSpeaking) { std::set participant_uuids; - LLVoiceClient::instance().getParticipantList(participant_uuids); + vocie_client->getParticipantList(participant_uuids); std::set::const_iterator part_it = participant_uuids.begin(); F32 power = 0; for (; part_it != participant_uuids.end(); ++part_it) { - power = LLVoiceClient::instance().getCurrentPower(*part_it); + power = vocie_client->getCurrentPower(*part_it); if (power) { mPower = power; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index b12e8d15fc..cbccc79f4e 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -377,16 +377,17 @@ void LLSpeakerMgr::update(BOOL resort_ok) } // update status of all current speakers - BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); + LLVoiceClient* voice_client = LLVoiceClient::getInstance(); + bool voice_channel_active = (!mVoiceChannel && voice_client->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); speaker_it++) { LLUUID speaker_id = speaker_it->first; LLSpeaker* speakerp = speaker_it->second; - if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id)) + if (voice_channel_active && voice_client->getVoiceEnabled(speaker_id)) { - speakerp->mSpeechVolume = LLVoiceClient::getInstance()->getCurrentPower(speaker_id); - BOOL moderator_muted_voice = LLVoiceClient::getInstance()->getIsModeratorMuted(speaker_id); + speakerp->mSpeechVolume = voice_client->getCurrentPower(speaker_id); + BOOL moderator_muted_voice = voice_client->getIsModeratorMuted(speaker_id); if (moderator_muted_voice != speakerp->mModeratorMutedVoice) { speakerp->mModeratorMutedVoice = moderator_muted_voice; @@ -394,11 +395,11 @@ void LLSpeakerMgr::update(BOOL resort_ok) speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp)); } - if (LLVoiceClient::getInstance()->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice) + if (voice_client->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice) { speakerp->mStatus = LLSpeaker::STATUS_MUTED; } - else if (LLVoiceClient::getInstance()->getIsSpeaking(speaker_id)) + else if (voice_client->getIsSpeaking(speaker_id)) { // reset inactivity expiration if (speakerp->mStatus != LLSpeaker::STATUS_SPEAKING) @@ -481,17 +482,18 @@ void LLSpeakerMgr::update(BOOL resort_ok) void LLSpeakerMgr::updateSpeakerList() { // Are we bound to the currently active voice channel? - if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) + LLVoiceClient* vocie_client = LLVoiceClient::getInstance(); + if ((!mVoiceChannel && vocie_client->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) { std::set participants; - LLVoiceClient::getInstance()->getParticipantList(participants); + vocie_client->getParticipantList(participants); // If we are, add all voice client participants to our list of known speakers for (std::set::iterator participant_it = participants.begin(); participant_it != participants.end(); ++participant_it) { setSpeaker(*participant_it, - LLVoiceClient::getInstance()->getDisplayName(*participant_it), + vocie_client->getDisplayName(*participant_it), LLSpeaker::STATUS_VOICE_ACTIVE, - (LLVoiceClient::getInstance()->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL)); + (vocie_client->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL)); } } else if (mVoiceChannel) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 5a9c0d103f..9b144048f7 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -187,13 +187,13 @@ void LLVoiceChannel::handleError(EStatusType type) setState(STATE_ERROR); } -BOOL LLVoiceChannel::isActive() +bool LLVoiceChannel::isActive() const { // only considered active when currently bound channel matches what our channel return callStarted() && LLVoiceClient::getInstance()->isCurrentChannel(mChannelInfo); } -BOOL LLVoiceChannel::callStarted() +bool LLVoiceChannel::callStarted() const { return mState >= STATE_CALL_STARTED; } @@ -662,7 +662,7 @@ LLVoiceChannelProximal::LLVoiceChannelProximal() : { } -BOOL LLVoiceChannelProximal::isActive() +bool LLVoiceChannelProximal::isActive() const { return callStarted() && LLVoiceClient::getInstance()->inProximalChannel(); } diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index eb16cc22ba..46a3f552cb 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -74,8 +74,8 @@ public: virtual void activate(); virtual void setChannelInfo(const LLSD &channelInfo); virtual void requestChannelInfo(); - virtual BOOL isActive(); - virtual BOOL callStarted(); + virtual bool isActive() const; + virtual bool callStarted() const; // Session name is a UI label used for feedback about which person, // group, or phone number you are talking to @@ -170,7 +170,7 @@ class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton &participants) +void LLVoiceClient::getParticipantList(std::set &participants) const { LLWebRTCVoiceClient::getInstance()->getParticipantList(participants); LLVivoxVoiceClient::getInstance()->getParticipantList(participants); } -bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) +bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) const { return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) || LLVivoxVoiceClient::getInstance()->isParticipant(speaker_id); @@ -718,12 +718,12 @@ void LLVoiceClient::toggleUserPTTState(void) //------------------------------------------- // nearby speaker accessors -BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id) +bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) const { - return isParticipant(id) ? TRUE : FALSE; + return isParticipant(id); } -std::string LLVoiceClient::getDisplayName(const LLUUID& id) +std::string LLVoiceClient::getDisplayName(const LLUUID& id) const { std::string result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id); if (result.empty()) diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index a263333bd3..fdc00a98e8 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -452,8 +452,8 @@ public: ///////////////////////////// // Accessors for data related to nearby speakers - BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar - std::string getDisplayName(const LLUUID& id); + bool getVoiceEnabled(const LLUUID& id) const; // true if we've received data for this avatar + std::string getDisplayName(const LLUUID& id) const; BOOL isOnlineSIP(const LLUUID &id); BOOL isParticipantAvatar(const LLUUID &id); BOOL getIsSpeaking(const LLUUID& id); @@ -463,8 +463,8 @@ public: F32 getUserVolume(const LLUUID& id); ///////////////////////////// - void getParticipantList(std::set &participants); - bool isParticipant(const LLUUID& speaker_id); + void getParticipantList(std::set &participants) const; + bool isParticipant(const LLUUID& speaker_id) const; ////////////////////////// /// @name text chat -- cgit v1.2.3 From f0db41911a4b291d037f8df92f26ec8aec5d274f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Aug 2024 10:06:32 +0300 Subject: viewer-private#262 viewer crashes on exit if the call is not completed --- indra/newview/llvoicewebrtc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index e5feae17f2..ff3c0eccd2 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -1253,7 +1253,7 @@ void LLWebRTCVoiceClient::sessionState::removeParticipant(const LLWebRTCVoiceCli LLWebRTCVoiceClient::getInstance()->notifyParticipantObservers(); } } - if (mHangupOnLastLeave && (participantID != gAgentID) && (mParticipantsByUUID.size() <= 1)) + if (mHangupOnLastLeave && (participantID != gAgentID) && (mParticipantsByUUID.size() <= 1) && LLWebRTCVoiceClient::instanceExists()) { LLWebRTCVoiceClient::getInstance()->notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); } -- cgit v1.2.3 From 399eb2104ec84272fb253c6029517f9f4935e17e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 23 Jul 2024 11:22:09 +0300 Subject: viewer#2043 bugsplat symbol upload update --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index aa504f51d8..68fdc3c2bf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -395,7 +395,7 @@ jobs: password: ${{ env.BUGSPLAT_PASS }} database: "SecondLife_Viewer_2018" channel: ${{ needs.build.outputs.viewer_channel }} - version: ${{ needs.build.outputs.viewer_version }} + version: ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }}) release: needs: [setvar, build, sign-and-package-windows, sign-and-package-mac] -- cgit v1.2.3 From 63a4ad9b98a21b86986385398f7a93043c4f3650 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Aug 2024 14:16:11 -0700 Subject: Add Windows multi-pdb upload capability --- .github/workflows/build.yaml | 17 +++++++++++++++-- build.sh | 2 +- indra/llwebrtc/CMakeLists.txt | 9 +++++++-- indra/newview/CMakeLists.txt | 40 ++++++++++++++++------------------------ 4 files changed, 39 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 03dcad2158..6e5d166847 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -373,15 +373,28 @@ jobs: needs: build runs-on: ubuntu-latest steps: + - name: Download Windows Symbols + if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS + uses: actions/download-artifact@v4 + with: + name: Windows-symbols + - name: Extract viewer pdb + if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS + shell: bash + run: | + mkdir _artifacts + tar -xJf ${{ needs.build.outputs.viewer_channel }}.sym.tar.xz -C _artifacts - name: Post Windows symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: secondlife/viewer-build-util/post-bugsplat-windows@v2 + uses: Bugsplat-Git/symbol-upload@v9.1.1 with: username: ${{ env.BUGSPLAT_USER }} password: ${{ env.BUGSPLAT_PASS }} database: "SecondLife_Viewer_2018" - channel: ${{ needs.build.outputs.viewer_channel }} + application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} + directory: _artifacts + files: "**/*.pdb" post-mac-symbols: env: diff --git a/build.sh b/build.sh index 2a2227657b..1e5e8470eb 100755 --- a/build.sh +++ b/build.sh @@ -170,7 +170,7 @@ pre_build() # This name is consumed by indra/newview/CMakeLists.txt. Make it # absolute because we've had troubles with relative pathnames. abs_build_dir="$(cd "$build_dir"; pwd)" - VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.xz")" + VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/symbols/$variant/${viewer_channel}.tar.xz")" fi # honor autobuild_configure_parameters same as sling-buildscripts diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index e7c7248b0c..c6f77ee848 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -39,10 +39,15 @@ if (WINDOWS) msdmo strmiids iphlpapi) + if (USE_BUGSPLAT) + set_target_properties(llwebrtc PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}") + endif (USE_BUGSPLAT) elseif (DARWIN) target_link_libraries(llwebrtc PRIVATE ll::webrtc) - set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" - XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}/dSYMs") + if (USE_BUGSPLAT) + set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" + XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}/dSYMs") + endif (USE_BUGSPLAT) elseif (LINUX) target_link_libraries(llwebrtc PRIVATE ll::webrtc) endif (WINDOWS) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 000f2e2684..c5f38a832a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2085,8 +2085,6 @@ if (DARWIN) set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/$,$,>/${product}.app") set(VIEWER_APP_EXE "${VIEWER_APP_BUNDLE}/Contents/MacOS/${product}") - set(VIEWER_APP_SYMBOLS_ARCHIVE "${VIEWER_APP_BUNDLE}/../${product}.sym.tar.gz") - set(VIEWER_APP_XCARCHIVE "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}.xcarchive.zip") configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist" @@ -2159,38 +2157,32 @@ if (INSTALL) include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake) endif (INSTALL) -# Note that the conventional VIEWER_SYMBOL_FILE is set by ../../build.sh if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIEWER_SYMBOL_FILE) if (USE_BUGSPLAT) # BugSplat symbol-file generation if (WINDOWS) - # Just pack up a tarball containing only the .pdb file for the - # executable. Because we intend to use cygwin tar, we must render - # VIEWER_SYMBOL_FILE in cygwin path syntax. - execute_process(COMMAND "cygpath" "-u" "${VIEWER_SYMBOL_FILE}" - OUTPUT_VARIABLE VIEWER_SYMBOL_FILE_CYGWIN - OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND "cygpath" "-u" "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" - OUTPUT_VARIABLE PARENT_DIRECTORY_CYGWIN - OUTPUT_STRIP_TRAILING_WHITESPACE) - add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}" - # Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.xz; - # testing a string suffix is painful enough in CMake language that - # we'll continue assuming it until forced to generalize. + set(VIEWER_APP_SYMBOLS_ARCHIVE "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}.sym.tar.xz") + set_target_properties( ${VIEWER_BINARY_NAME} PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}") + + # Just pack up a tarball containing only the .pdb files for the + # executables. + add_custom_command(OUTPUT "${VIEWER_APP_SYMBOLS_ARCHIVE}" COMMAND "tar" ARGS "cJf" - "${VIEWER_SYMBOL_FILE_CYGWIN}" - "-C" - "${PARENT_DIRECTORY_CYGWIN}" - "secondlife-bin.pdb" - DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-bin.pdb" - COMMENT "Packing viewer PDB into ${VIEWER_SYMBOL_FILE_CYGWIN}" + "${VIEWER_CHANNEL}.sym.tar.xz" + "${VIEWER_CHANNEL}" + DEPENDS "${VIEWER_BINARY_NAME}" llwebrtc + WORKING_DIRECTORY "${SYMBOLS_STAGING_DIR}" + COMMENT "Packing viewer PDBs into ${VIEWER_APP_SYMBOLS_ARCHIVE}" ) - add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}" ${VIEWER_BINARY_NAME}) - add_dependencies(generate_symbols ${VIEWER_BINARY_NAME}) + add_custom_target(generate_symbols DEPENDS "${VIEWER_APP_SYMBOLS_ARCHIVE}") + add_dependencies(generate_symbols ${VIEWER_BINARY_NAME} llwebrtc) + endif (WINDOWS) if (DARWIN) + set(VIEWER_APP_XCARCHIVE "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}.xcarchive.zip") + # we only need an xcarchive with dSYMs (including the application) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES -- cgit v1.2.3 From f6f3d7e0480c9c695abf6c48f553ad0e01121e78 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Aug 2024 14:24:00 -0700 Subject: spacing issue --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6e5d166847..2a174e5d2c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -382,7 +382,7 @@ jobs: if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS shell: bash run: | - mkdir _artifacts + mkdir _artifacts tar -xJf ${{ needs.build.outputs.viewer_channel }}.sym.tar.xz -C _artifacts - name: Post Windows symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS -- cgit v1.2.3 From e0737b142362e16c78deac38c11bb24ddbe695bc Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Aug 2024 15:11:03 -0700 Subject: misnamed file --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 1e5e8470eb..93babd9226 100755 --- a/build.sh +++ b/build.sh @@ -170,7 +170,7 @@ pre_build() # This name is consumed by indra/newview/CMakeLists.txt. Make it # absolute because we've had troubles with relative pathnames. abs_build_dir="$(cd "$build_dir"; pwd)" - VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/symbols/$variant/${viewer_channel}.tar.xz")" + VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/symbols/$variant/${viewer_channel}.sym.tar.xz")" fi # honor autobuild_configure_parameters same as sling-buildscripts -- cgit v1.2.3 From 530bc2975315240f6f5dda753b48790364a6312b Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Aug 2024 16:33:00 -0700 Subject: build debug symbols for llwebrtc even for release --- .github/workflows/build.yaml | 2 +- indra/llwebrtc/CMakeLists.txt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2a174e5d2c..ecd3f22a35 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -383,7 +383,7 @@ jobs: shell: bash run: | mkdir _artifacts - tar -xJf ${{ needs.build.outputs.viewer_channel }}.sym.tar.xz -C _artifacts + tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts - name: Post Windows symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS uses: Bugsplat-Git/symbol-upload@v9.1.1 diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index c6f77ee848..e3404b3a23 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -31,7 +31,11 @@ add_library (llwebrtc SHARED ${llwebrtc_SOURCE_FILES}) set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h) if (WINDOWS) - target_link_libraries(llwebrtc PRIVATE ll::webrtc + set_target_properties(llwebrtc + PROPERTIES + LINK_FLAGS "/debug /LARGEADDRESSAWARE" + ) + target_link_libraries(llwebrtc PRIVATE ll::webrtc secur32 winmm dmoguids -- cgit v1.2.3 From 60003cf077866401a809905474d3369c7795109a Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Aug 2024 19:09:19 -0700 Subject: include viewer exe in uploaded symbols --- .github/workflows/build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ecd3f22a35..72cdf01634 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -373,6 +373,11 @@ jobs: needs: build runs-on: ubuntu-latest steps: + - name: Download viewer exe + uses: actions/download-artifact@v4 + with: + name: Windows-app + path: _artifacts - name: Download Windows Symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS uses: actions/download-artifact@v4 @@ -382,7 +387,6 @@ jobs: if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS shell: bash run: | - mkdir _artifacts tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts - name: Post Windows symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS @@ -394,7 +398,7 @@ jobs: application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} directory: _artifacts - files: "**/*.pdb" + files: "**/{SecondLifeViewer.exe,*.pdb}" post-mac-symbols: env: -- cgit v1.2.3 From 83390094f10e0f7069676bf2bd09bd1401ca891c Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 7 Aug 2024 20:57:05 -0700 Subject: test llwebrtc.dll for additional symbols --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 72cdf01634..d3a3c2ed6e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -398,7 +398,7 @@ jobs: application: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} directory: _artifacts - files: "**/{SecondLifeViewer.exe,*.pdb}" + files: "**/{SecondLifeViewer.exe,llwebrtc.dll,*.pdb}" post-mac-symbols: env: -- cgit v1.2.3 From f1f3aa42e8fcb3e1a511c08a23c50aaf291199dc Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 8 Aug 2024 09:34:48 -0700 Subject: CR fixes --- .github/workflows/build.yaml | 2 +- indra/cmake/Linking.cmake | 2 +- indra/llwebrtc/CMakeLists.txt | 4 ++-- indra/newview/CMakeLists.txt | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 72cdf01634..c998f42905 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -390,7 +390,7 @@ jobs: tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts - name: Post Windows symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: Bugsplat-Git/symbol-upload@v9.1.1 + uses: Bugsplat-Git/symbol-upload@v10 with: username: ${{ env.BUGSPLAT_USER }} password: ${{ env.BUGSPLAT_PASS }} diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index a5b8767923..1d757abeff 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -19,7 +19,7 @@ if (WINDOWS OR DARWIN ) endif() else() set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$,$,>) - set(SYMBOLS_STAGING_DIR ${CMAKE_BINARY_DIR}/symbols/$,$,>) + set(SYMBOLS_STAGING_DIR ${CMAKE_BINARY_DIR}/symbols/$,$,>/${VIEWER_CHANNEL}) endif() if( DARWIN ) diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index e3404b3a23..30aaec1265 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -44,13 +44,13 @@ if (WINDOWS) strmiids iphlpapi) if (USE_BUGSPLAT) - set_target_properties(llwebrtc PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}") + set_target_properties(llwebrtc PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}") endif (USE_BUGSPLAT) elseif (DARWIN) target_link_libraries(llwebrtc PRIVATE ll::webrtc) if (USE_BUGSPLAT) set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" - XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}/dSYMs") + XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs") endif (USE_BUGSPLAT) elseif (LINUX) target_link_libraries(llwebrtc PRIVATE ll::webrtc) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c5f38a832a..517b25def5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2161,8 +2161,8 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE if (USE_BUGSPLAT) # BugSplat symbol-file generation if (WINDOWS) - set(VIEWER_APP_SYMBOLS_ARCHIVE "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}.sym.tar.xz") - set_target_properties( ${VIEWER_BINARY_NAME} PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}") + set(VIEWER_APP_SYMBOLS_ARCHIVE "${SYMBOLS_STAGING_DIR}.sym.tar.xz") + set_target_properties( ${VIEWER_BINARY_NAME} PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}") # Just pack up a tarball containing only the .pdb files for the # executables. @@ -2173,7 +2173,7 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE "${VIEWER_CHANNEL}.sym.tar.xz" "${VIEWER_CHANNEL}" DEPENDS "${VIEWER_BINARY_NAME}" llwebrtc - WORKING_DIRECTORY "${SYMBOLS_STAGING_DIR}" + WORKING_DIRECTORY "${SYMBOLS_STAGING_DIR}/.." COMMENT "Packing viewer PDBs into ${VIEWER_APP_SYMBOLS_ARCHIVE}" ) add_custom_target(generate_symbols DEPENDS "${VIEWER_APP_SYMBOLS_ARCHIVE}") @@ -2181,21 +2181,21 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE endif (WINDOWS) if (DARWIN) - set(VIEWER_APP_XCARCHIVE "${SYMBOLS_STAGING_DIR}/${VIEWER_CHANNEL}.xcarchive.zip") + set(VIEWER_APP_XCARCHIVE "${SYMBOLS_STAGING_DIR}.xcarchive.zip") # we only need an xcarchive with dSYMs (including the application) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" - XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/${product}/dSYMs") + XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs") add_custom_command(OUTPUT "${VIEWER_APP_XCARCHIVE}" COMMAND "zip" ARGS "-r" "${VIEWER_APP_XCARCHIVE}" - "${product}" - WORKING_DIRECTORY "${SYMBOLS_STAGING_DIR}" + "${VIEWER_CHANNEL}" + WORKING_DIRECTORY "${SYMBOLS_STAGING_DIR}/.." DEPENDS "${VIEWER_BINARY_NAME}" llwebrtc COMMENT "Generating ${VIEWER_APP_XCARCHIVE} for upload to BugSplat" ) -- cgit v1.2.3 From cdc83801c5377c1f7a2c677b6d2e52f1e5c6d366 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 8 Aug 2024 10:32:40 -0700 Subject: bugsplat symbol-upload does not use vMAJOR tags --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3295e5b401..bfa7c5d921 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -390,7 +390,7 @@ jobs: tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts - name: Post Windows symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: Bugsplat-Git/symbol-upload@v10 + uses: Bugsplat-Git/symbol-upload@v10.0.0 with: username: ${{ env.BUGSPLAT_USER }} password: ${{ env.BUGSPLAT_PASS }} -- cgit v1.2.3 From d46c444aee3fa1b3623d8d94151af1bfdae815b1 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Thu, 8 Aug 2024 12:03:53 -0700 Subject: Use the secondlife-3p fork of symbol upload, which has vMAJOR tags --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3295e5b401..ebbb9dea88 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -390,7 +390,7 @@ jobs: tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts - name: Post Windows symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: Bugsplat-Git/symbol-upload@v10 + uses: secondlife-3p/symbol-upload@v10 with: username: ${{ env.BUGSPLAT_USER }} password: ${{ env.BUGSPLAT_PASS }} @@ -414,7 +414,7 @@ jobs: name: macOS-symbols - name: Post Mac symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: Bugsplat-Git/symbol-upload@v9.1.1 + uses: secondlife-3p/symbol-upload@v10 with: username: ${{ env.BUGSPLAT_USER }} password: ${{ env.BUGSPLAT_PASS }} -- cgit v1.2.3 From 4e0819b2dc2f062a68cc32d5b1ec22214fb1fd28 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Aug 2024 09:09:00 +0300 Subject: viewer-private#259 Chat names get mixed up in voice calls Obsolete channel was uses as a participant provider --- indra/newview/llvoicevivox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 6be6b1d4f2..cf27801065 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5097,7 +5097,9 @@ void LLVivoxVoiceClient::processChannels(bool process) bool LLVivoxVoiceClient::isCurrentChannel(const LLSD &channelInfo) { - if (!mProcessChannels || (channelInfo.has("voice_server_type") && channelInfo["voice_server_type"].asString() != VIVOX_VOICE_SERVER_TYPE)) + if (!mProcessChannels + || (channelInfo.has("voice_server_type") && channelInfo["voice_server_type"].asString() != VIVOX_VOICE_SERVER_TYPE) + || mSessionTerminateRequested) { return false; } -- cgit v1.2.3 From 227b212dc67998098d09b7f15e852ed6cd7ac83a Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Fri, 9 Aug 2024 11:59:31 -0700 Subject: Teleport to a region with a different voice server type causes failure in voice When teleporting, the viewer 'hides' voice, effectively disabling it, until the teleport has completed. It does this by instructing the voice module to hide and then unhide. The problem was, it would instruct one voice module for one voice server type to hide, and then after teleport, it would instruct the other voice module for the other voice server type to unhide, resulting in one voice module being hidden. When the user transitions back to a region with the initial voice module, it's hidden, hence voice doesn't work. The solution is to hide/unhide both voice modules. --- indra/newview/llvoiceclient.cpp | 6 ++---- indra/newview/llvoicevivox.h | 3 ++- indra/newview/llvoicewebrtc.h | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 495d521894..5132b9bb07 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -281,10 +281,8 @@ void LLVoiceClient::setNonSpatialVoiceModule(const std::string &voice_server_typ void LLVoiceClient::setHidden(bool hidden) { - if (mSpatialVoiceModule) - { - mSpatialVoiceModule->setHidden(hidden); - } + LLWebRTCVoiceClient::getInstance()->setHidden(hidden); + LLVivoxVoiceClient::getInstance()->setHidden(hidden); } void LLVoiceClient::terminate() diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 64c2c87db6..f3e24df281 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -89,6 +89,8 @@ public: // Returns true if vivox has successfully logged in and is not in error state bool isVoiceWorking() const override; + void setHidden(bool hidden) override; // virtual + ///////////////////// /// @name Tuning //@{ @@ -760,7 +762,6 @@ private: LLSD getAudioSessionChannelInfo(); std::string getAudioSessionHandle(); - void setHidden(bool hidden) override; //virtual void sendPositionAndVolumeUpdate(void); void sendCaptureAndRenderDevices(); diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index f4ea329cb6..f699bd6df9 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -88,6 +88,7 @@ public: std::string sipURIFromID(const LLUUID &id) const override; LLSD getP2PChannelInfoTemplate(const LLUUID& id) const override; + void setHidden(bool hidden) override; // virtual /////////////////// /// @name Logging @@ -480,8 +481,6 @@ private: LLSD getAudioSessionChannelInfo(); - void setHidden(bool hidden) override; //virtual - void enforceTether(); void updateNeighboringRegions(); -- cgit v1.2.3 From 848d0cb27d4d37078c2f2d52bcb142a215d5cd26 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 1 Aug 2024 12:40:10 +0300 Subject: viewer#2163 Crash at getReflectionProbeIsDynamic --- indra/newview/llreflectionmap.cpp | 4 ++-- indra/newview/llviewerobject.h | 4 ++++ indra/newview/llvovolume.h | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index 31fd6f3f07..8d164b6883 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -220,7 +220,7 @@ F32 LLReflectionMap::getNearClip() if (mViewerObject && mViewerObject->getVolume()) { - ret = ((LLVOVolume*)mViewerObject)->getReflectionProbeNearClip(); + ret = mViewerObject->getReflectionProbeNearClip(); } else if (mGroup) { @@ -240,7 +240,7 @@ bool LLReflectionMap::getIsDynamic() mViewerObject && mViewerObject->getVolume()) { - return ((LLVOVolume*)mViewerObject)->getReflectionProbeIsDynamic(); + return mViewerObject->getReflectionProbeIsDynamic(); } return false; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 09584d22a8..b6846c6716 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -266,7 +266,11 @@ public: virtual bool isRiggedMesh() const { return false; } virtual bool hasLightTexture() const { return false; } virtual bool isReflectionProbe() const { return false; } + virtual F32 getReflectionProbeAmbiance() const { return 0.f; } + virtual F32 getReflectionProbeNearClip() const { return 0.f; } virtual bool getReflectionProbeIsBox() const { return false; } + virtual bool getReflectionProbeIsDynamic() const { return false; }; + virtual bool getReflectionProbeIsMirror() const { return false; }; // This method returns true if the object is over land owned by // the agent, one of its groups, or it encroaches and diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 07e02e042c..6241bf42d6 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -304,11 +304,11 @@ public: bool setReflectionProbeIsMirror(bool is_mirror); bool isReflectionProbe() const override; - F32 getReflectionProbeAmbiance() const; - F32 getReflectionProbeNearClip() const; + F32 getReflectionProbeAmbiance() const override; + F32 getReflectionProbeNearClip() const override; bool getReflectionProbeIsBox() const override; - bool getReflectionProbeIsDynamic() const; - bool getReflectionProbeIsMirror() const; + bool getReflectionProbeIsDynamic() const override; + bool getReflectionProbeIsMirror() const override; // Flexible Objects U32 getVolumeInterfaceID() const; -- cgit v1.2.3 From 048340ec1f2fd82a0fc877383d1476ec7c3c7a00 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 29 Jul 2024 21:19:57 +0300 Subject: viewer#2142 Crash at LLOutfitGalleryItem::setDefaultImage --- indra/newview/llinventorygallery.cpp | 104 ++++++++++++++++++++--------------- indra/newview/llinventorygallery.h | 1 + indra/newview/lloutfitgallery.cpp | 44 ++++++++++++--- indra/newview/lloutfitgallery.h | 3 +- 4 files changed, 101 insertions(+), 51 deletions(-) diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index c69f797868..b99dbd9eb7 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -221,9 +221,10 @@ void LLInventoryGallery::setRootFolder(const LLUUID cat_id) for (const LLUUID& id : mSelectedItemIDs) { - if (mItemMap[id]) + LLInventoryGalleryItem* item = getItem(id); + if (item) { - mItemMap[id]->setSelected(false); + item->setSelected(false); } } @@ -348,7 +349,7 @@ void LLInventoryGallery::initGallery() mScrollPanel->addChild(mGalleryPanel); for (int i = 0; i < n; i++) { - addToGallery(mItemMap[cats[i]]); + addToGallery(getItem(cats[i])); } reArrangeRows(); mGalleryCreated = true; @@ -656,6 +657,16 @@ LLInventoryGalleryItem* LLInventoryGallery::buildGalleryItem(std::string name, L return gitem; } +LLInventoryGalleryItem* LLInventoryGallery::getItem(const LLUUID& id) const +{ + auto it = mItemMap.find(id); + if (it != mItemMap.end()) + { + return it->second; + } + return nullptr; +} + void LLInventoryGallery::buildGalleryPanel(int row_count) { LLPanel::Params params; @@ -1006,14 +1017,15 @@ void LLInventoryGallery::updateItemThumbnail(LLUUID item_id) thumbnail_id = getOutfitImageID(item_id); } - if (mItemMap[item_id]) + LLInventoryGalleryItem* item = getItem(item_id); + if (item) { - mItemMap[item_id]->setLoadImmediately(mLoadThumbnailsImmediately); - mItemMap[item_id]->setThumbnail(thumbnail_id); + item->setLoadImmediately(mLoadThumbnailsImmediately); + item->setThumbnail(thumbnail_id); - bool passes_filter = checkAgainstFilters(mItemMap[item_id], mFilterSubString); - if((mItemMap[item_id]->isHidden() && passes_filter) - || (!mItemMap[item_id]->isHidden() && !passes_filter)) + bool passes_filter = checkAgainstFilters(item, mFilterSubString); + if((item->isHidden() && passes_filter) + || (!item->isHidden() && !passes_filter)) { reArrangeRows(); } @@ -1169,7 +1181,7 @@ void LLInventoryGallery::moveUp(MASK mask) if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1) { - LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID]; + LLInventoryGalleryItem* item = getItem(mLastInteractedUUID); if (item) { if (mask == MASK_NONE || mask == MASK_CONTROL) @@ -1214,7 +1226,7 @@ void LLInventoryGallery::moveDown(MASK mask) if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1) { - LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID]; + LLInventoryGalleryItem* item = getItem(mLastInteractedUUID); if (item) { if (mask == MASK_NONE || mask == MASK_CONTROL) @@ -1259,11 +1271,7 @@ void LLInventoryGallery::moveLeft(MASK mask) if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1) { - LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID]; - if (mask == MASK_SHIFT) - { - item = mItemMap[mLastInteractedUUID]; - } + LLInventoryGalleryItem* item = getItem(mLastInteractedUUID); if (item) { // Might be better to get item from panel @@ -1307,7 +1315,7 @@ void LLInventoryGallery::moveRight(MASK mask) if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1) { - LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID]; + LLInventoryGalleryItem* item = getItem(mLastInteractedUUID); if (item) { S32 n = mItemIndexMap[item]; @@ -1373,8 +1381,8 @@ void LLInventoryGallery::toggleSelectionRangeFromLast(const LLUUID target) { return; } - LLInventoryGalleryItem* last_item = mItemMap[mLastInteractedUUID]; - LLInventoryGalleryItem* next_item = mItemMap[target]; + LLInventoryGalleryItem* last_item = getItem(mLastInteractedUUID); + LLInventoryGalleryItem* next_item = getItem(target); if (last_item && next_item) { S32 last_idx = mItemIndexMap[last_item]; @@ -1417,9 +1425,10 @@ void LLInventoryGallery::onFocusLost() for (const LLUUID& id : mSelectedItemIDs) { - if (mItemMap[id]) + LLInventoryGalleryItem* item = getItem(id); + if (item) { - mItemMap[id]->setSelected(false); + item->setSelected(false); } } } @@ -1435,9 +1444,10 @@ void LLInventoryGallery::onFocusReceived() LLInventoryGalleryItem* focus_item = NULL; for (const LLUUID& id : mSelectedItemIDs) { - if (mItemMap[id] && !mItemMap[id]->isHidden()) + LLInventoryGalleryItem* item = getItem(id); + if (item && !item->isHidden()) { - focus_item = mItemMap[id]; + focus_item = item; focus_item->setSelected(true); } } @@ -1478,9 +1488,10 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_ { for (const LLUUID& id : mSelectedItemIDs) { - if (mItemMap[id]) + LLInventoryGalleryItem* item = getItem(id); + if (item) { - mItemMap[id]->setSelected(false); + item->setSelected(false); } } mSelectedItemIDs.clear(); @@ -1499,9 +1510,10 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_ return; } - if (mItemMap[item_id]) + LLInventoryGalleryItem* item = getItem(item_id); + if (item) { - mItemMap[item_id]->setSelected(true); + item->setSelected(true); } mSelectedItemIDs.push_back(item_id); signalSelectionItemID(item_id); @@ -1527,9 +1539,10 @@ void LLInventoryGallery::addItemSelection(const LLUUID& item_id, bool scroll_to_ return; } - if (mItemMap[item_id]) + LLInventoryGalleryItem* item = getItem(item_id); + if (item) { - mItemMap[item_id]->setSelected(true); + item->setSelected(true); } mSelectedItemIDs.push_back(item_id); signalSelectionItemID(item_id); @@ -1552,18 +1565,20 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_ selection_deque::iterator found = std::find(mSelectedItemIDs.begin(), mSelectedItemIDs.end(), item_id); if (found != mSelectedItemIDs.end()) { - if (mItemMap[item_id]) + LLInventoryGalleryItem* item = getItem(item_id); + if (item) { - mItemMap[item_id]->setSelected(false); + item->setSelected(false); } mSelectedItemIDs.erase(found); result = false; } else { - if (mItemMap[item_id]) + LLInventoryGalleryItem* item = getItem(item_id); + if (item) { - mItemMap[item_id]->setSelected(true); + item->setSelected(true); } mSelectedItemIDs.push_back(item_id); signalSelectionItemID(item_id); @@ -1580,7 +1595,7 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_ void LLInventoryGallery::scrollToShowItem(const LLUUID& item_id) { - LLInventoryGalleryItem* item = mItemMap[item_id]; + LLInventoryGalleryItem* item = getItem(item_id); if(item) { const LLRect visible_content_rect = mScrollPanel->getVisibleContentRect(); @@ -1610,7 +1625,7 @@ LLInventoryGalleryItem* LLInventoryGallery::getFirstSelectedItem() if (mSelectedItemIDs.size() > 0) { selection_deque::iterator iter = mSelectedItemIDs.begin(); - return mItemMap[*iter]; + return getItem(*iter); } return NULL; } @@ -1768,9 +1783,10 @@ void LLInventoryGallery::paste() { for (const LLUUID& id : mSelectedItemIDs) { - if (mItemMap[id]) + LLInventoryGalleryItem* item = getItem(id); + if (item) { - mItemMap[id]->setSelected(false); + item->setSelected(false); } } mSelectedItemIDs.clear(); @@ -2108,9 +2124,10 @@ void LLInventoryGallery::pasteAsLink() { for (const LLUUID& id : mSelectedItemIDs) { - if (mItemMap[id]) + LLInventoryGalleryItem* item = getItem(id); + if (item) { - mItemMap[id]->setSelected(false); + item->setSelected(false); } } mSelectedItemIDs.clear(); @@ -2433,10 +2450,10 @@ void LLInventoryGallery::onGesturesChanged() void LLInventoryGallery::deselectItem(const LLUUID& category_id) { // Reset selection if the item is selected. - LLInventoryGalleryItem* item = mItemMap[category_id]; + LLInventoryGalleryItem* item = getItem(category_id); if (item && item->isSelected()) { - mItemMap[category_id]->setSelected(false); + item->setSelected(false); setFocus(true); // Todo: support multiselect // signalSelectionItemID(LLUUID::null); @@ -2453,9 +2470,10 @@ void LLInventoryGallery::clearSelection() { for (const LLUUID& id: mSelectedItemIDs) { - if (mItemMap[id]) + LLInventoryGalleryItem* item = getItem(id); + if (item) { - mItemMap[id]->setSelected(false); + item->setSelected(false); } } if (!mSelectedItemIDs.empty()) diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index afc7bdc9f8..59d08d19ed 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -228,6 +228,7 @@ private: void updateGalleryWidth(); LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, time_t creation_date, bool is_link, bool is_worn); + LLInventoryGalleryItem* getItem(const LLUUID& id) const; void buildGalleryPanel(int row_count); void reshapeGalleryPanel(int row_count); diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 96be917019..22420e8896 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -128,7 +128,7 @@ void LLOutfitGallery::onOpen(const LLSD& info) mScrollPanel->addChild(mGalleryPanel); for (int i = 0; i < n; i++) { - addToGallery(mOutfitMap[cats[i]]); + addToGallery(getItem(cats[i])); } reArrangeRows(); mGalleryCreated = true; @@ -377,7 +377,7 @@ void LLOutfitGallery::onOutfitsRemovalConfirmation(const LLSD& notification, con void LLOutfitGallery::scrollToShowItem(const LLUUID& item_id) { - LLOutfitGalleryItem* item = mOutfitMap[item_id]; + LLOutfitGalleryItem* item = getItem(item_id); if (item) { const LLRect visible_content_rect = mScrollPanel->getVisibleContentRect(); @@ -524,6 +524,10 @@ LLPanel* LLOutfitGallery::addToRow(LLPanel* row_stack, LLOutfitGalleryItem* item void LLOutfitGallery::addToGallery(LLOutfitGalleryItem* item) { + if (!item) + { + return; + } if(item->isHidden()) { mHiddenItems.push_back(item); @@ -631,9 +635,19 @@ LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name, LLUUID return gitem; } -LLOutfitGalleryItem* LLOutfitGallery::getSelectedItem() +LLOutfitGalleryItem* LLOutfitGallery::getSelectedItem() const +{ + return getItem(mSelectedOutfitUUID); +} + +LLOutfitGalleryItem* LLOutfitGallery::getItem(const LLUUID& id) const { - return mOutfitMap[mSelectedOutfitUUID]; + auto it = mOutfitMap.find(id); + if (it != mOutfitMap.end()) + { + return it->second; + } + return nullptr; } void LLOutfitGallery::buildGalleryPanel(int row_count) @@ -1264,7 +1278,15 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id) } if (asset_id.notNull()) { - photo_loaded |= mOutfitMap[category_id]->setImageAssetId(asset_id); + LLOutfitGalleryItem* item = getItem(category_id); + if (item) + { + photo_loaded |= item->setImageAssetId(asset_id); + } + else + { + photo_loaded = true; + } // Rename links if (!mOutfitRenamePending.isNull() && mOutfitRenamePending.asString() == item_name) { @@ -1290,13 +1312,21 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id) } if (!photo_loaded) { - mOutfitMap[category_id]->setDefaultImage(); + LLOutfitGalleryItem* item = getItem(category_id); + if (item) + { + item->setDefaultImage(); + } } } } else { - mOutfitMap[category_id]->setImageAssetId(asset_id); + LLOutfitGalleryItem* item = getItem(category_id); + if (item) + { + item->setImageAssetId(asset_id); + } } } diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index d921a7fe72..819d09dcf5 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -135,7 +135,8 @@ private: void updateGalleryWidth(); LLOutfitGalleryItem* buildGalleryItem(std::string name, LLUUID outfit_id); - LLOutfitGalleryItem* getSelectedItem(); + LLOutfitGalleryItem* getSelectedItem() const; + LLOutfitGalleryItem* getItem(const LLUUID& id) const; void onTextureSelectionChanged(LLInventoryItem* itemp); -- cgit v1.2.3 From b01b53b2fea478476e67252ff5a276f943f9ae47 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 24 Jul 2024 20:21:11 +0200 Subject: #2103 BugSplat Crash #1497033: LLViewerTextureList::getImage --- indra/newview/llvovolume.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 71f3c2a3aa..2f03531f1d 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5642,7 +5642,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } // HACK -- brute force this check every time a drawable gets rebuilt - for (S32 i = 0; i < drawablep->getNumFaces(); ++i) + S32 num_tex = llmin(vobj->getNumTEs(), drawablep->getNumFaces()); + for (S32 i = 0; i < num_tex; ++i) { vobj->updateTEMaterialTextures(i); } -- cgit v1.2.3 From cd188352700fd4d3b686c25f2307f4bd9179132f Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:02:31 -0400 Subject: Fix nullptr crash in LLFloaterIMContainer::onAddButtonClicked --- indra/newview/llfloaterimcontainer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index add389748f..08e13276b3 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -988,11 +988,14 @@ void LLFloaterIMContainer::onAddButtonClicked() { LLView * button = findChild("conversations_pane_buttons_expanded")->findChild("add_btn"); LLFloater* root_floater = gFloaterView->getParentFloater(this); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button); - - if (picker && root_floater) + if (button && root_floater) { - root_floater->addDependentFloater(picker); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button); + + if (picker) + { + root_floater->addDependentFloater(picker); + } } } -- cgit v1.2.3 From ac75cd98fc526f2f2945093b611ee6e321ceecfa Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:02:09 -0400 Subject: Fix null region pointer crash in LLIMView --- indra/newview/llimview.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 05b1fec8e5..8a428c45d0 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3040,13 +3040,16 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload gIMMgr->addSession(correct_session_name, type, session_id, payload["voice_channel_info"]); - std::string url = gAgent.getRegion()->getCapability( + std::string url = gAgent.getRegionCapability( "ChatSessionRequest"); if (voice) { - LLCoros::instance().launch("chatterBoxInvitationCoro", - boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type, payload["voice_channel_info"])); + if(!url.empty()) + { + LLCoros::instance().launch("chatterBoxInvitationCoro", + boost::bind(&chatterBoxInvitationCoro, url, session_id, inv_type, payload["voice_channel_info"])); + } // send notification message to the corresponding chat if (payload["notify_box_type"].asString() == "VoiceInviteGroup" || payload["notify_box_type"].asString() == "VoiceInviteAdHoc") @@ -4061,9 +4064,12 @@ public: // Send request for chat history, if enabled. if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory")) { - std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); - LLCoros::instance().launch("chatterBoxHistoryCoro", - boost::bind(&chatterBoxHistoryCoro, url, session_id, "", "", 0)); + std::string url = gAgent.getRegionCapability("ChatSessionRequest"); + if (!url.empty()) + { + LLCoros::instance().launch("chatterBoxHistoryCoro", + boost::bind(&chatterBoxHistoryCoro, url, session_id, "", "", 0)); + } } } } -- cgit v1.2.3 From 68316fd0fd776d80934548fbadd90da4d88f954a Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:01:24 -0400 Subject: Fix nullptr crash in LLInvFVBridge::getClipboardEntries --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 81d738cf42..33d0ac891d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -961,7 +961,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } } - if (obj->getType() != LLAssetType::AT_CATEGORY) + if (obj && obj->getType() != LLAssetType::AT_CATEGORY) { items.push_back(std::string("Paste Separator")); } -- cgit v1.2.3 From 8de48c426049a4af7f4635fd09ed5976a9087f5e Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:00:58 -0400 Subject: Fix nullptr crash in LLLandmarksPanel::canItemBeModified --- indra/newview/llpanellandmarks.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 99133d1fb3..25631f1e04 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -959,12 +959,12 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold // then ask LLFolderView permissions - LLFolderView* root_folder = mCurrentSelectedList->getRootFolder(); + LLFolderView* root_folder = mCurrentSelectedList ? mCurrentSelectedList->getRootFolder() : nullptr; if ("copy" == command_name) { // we shouldn't be able to copy folders from My Inventory Panel - return can_be_modified && root_folder->canCopy(); + return can_be_modified && root_folder && root_folder->canCopy(); } else if ("collapse" == command_name) { @@ -981,7 +981,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold if ("cut" == command_name) { - can_be_modified = root_folder->canCut(); + can_be_modified = root_folder && root_folder->canCut(); } else if ("rename" == command_name) { @@ -993,7 +993,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold } else if("paste" == command_name) { - can_be_modified = root_folder->canPaste(); + can_be_modified = root_folder && root_folder->canPaste(); } else { -- cgit v1.2.3 From cc77728ad76e3d9a7df66b159431fd62f39f0ecc Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 11:00:37 -0400 Subject: Fix nullptr crash in LLLandmarksPanel::isActionEnabled --- indra/newview/llpanellandmarks.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 25631f1e04..fb7ccbfe4c 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -647,10 +647,18 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const if ("collapse_all" == command_name) { + if (!mCurrentSelectedList) + { + return false; + } return has_expanded_folders(mCurrentSelectedList->getRootFolder()); } else if ("expand_all" == command_name) { + if (!mCurrentSelectedList) + { + return false; + } return has_collapsed_folders(mCurrentSelectedList->getRootFolder()); } else if ("sort_by_date" == command_name) -- cgit v1.2.3 From 9e379a5578f56dca05b303707e150c2de04c0c43 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 10:59:59 -0400 Subject: Fix nullptr crash in LLInventoryPanel::itemChanged --- indra/newview/llinventorypanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 9dc13bcf09..442da455ef 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -643,7 +643,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve } // Select any newly created object that has the auto rename at top of folder root set. - if(mFolderRoot.get()->getRoot()->needsAutoRename()) + if(mFolderRoot.get() && mFolderRoot.get()->getRoot()->needsAutoRename()) { setSelection(item_id, false); } -- cgit v1.2.3 From 04fdc4f2c098dc8a5a87ffa6b85652cc8c8dad1b Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 10:59:35 -0400 Subject: Fix nullptr crash in handleVSyncChanged --- indra/newview/llviewercontrol.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index cd6e780aa8..862bb3dfa9 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -263,12 +263,15 @@ static bool handleAnisotropicChanged(const LLSD& newvalue) static bool handleVSyncChanged(const LLSD& newvalue) { LLPerfStats::tunables.vsyncEnabled = newvalue.asBoolean(); - gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean()); - - if (newvalue.asBoolean()) + if (gViewerWindow && gViewerWindow->getWindow()) { - U32 current_target = gSavedSettings.getU32("TargetFPS"); - gSavedSettings.setU32("TargetFPS", std::min((U32)gViewerWindow->getWindow()->getRefreshRate(), current_target)); + gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean()); + + if (newvalue.asBoolean()) + { + U32 current_target = gSavedSettings.getU32("TargetFPS"); + gSavedSettings.setU32("TargetFPS", std::min((U32)gViewerWindow->getWindow()->getRefreshRate(), current_target)); + } } return true; -- cgit v1.2.3 From 983e7772b45e061f283d3c37418bf5d2961336db Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 10:59:07 -0400 Subject: Fix crash in LLViewerWindow::handleDragNDrop --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cfa12bf178..48439765e4 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1271,7 +1271,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi LLTextureEntry *te = obj->getTE(object_face); // can modify URL if we can modify the object or we have navigate permissions - bool allow_modify_url = obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ); + bool allow_modify_url = obj->permModify() || (te && obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT )); if (te && allow_modify_url ) { -- cgit v1.2.3 From fe76026a3fea79522083864019026e6bf01777df Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 22 Jul 2024 10:58:33 -0400 Subject: Fix nullptr crash in LLScrollListCtrl::getSelectedItemLabel --- indra/llui/llscrolllistctrl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 74a9641836..1d9564d107 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1479,7 +1479,11 @@ const std::string LLScrollListCtrl::getSelectedItemLabel(S32 column) const item = getFirstSelected(); if (item) { - return item->getColumn(column)->getValue().asString(); + auto col = item->getColumn(column); + if(col) + { + return col->getValue().asString(); + } } return LLStringUtil::null; -- cgit v1.2.3 From 9e4185bf75edbbf313735be56b1aaefcf0d31299 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 21 Jul 2024 20:10:21 -0400 Subject: Fix rare shutdown crash in gCacheName --- indra/llmessage/llcachename.cpp | 33 ++++++++++++++++----------------- indra/llmessage/llcachename.h | 7 ++++--- indra/newview/llfloateravatarpicker.cpp | 2 +- indra/newview/llinventorybridge.cpp | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 63ac46722a..64f660d0ce 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -53,7 +53,6 @@ const U32 PENDING_TIMEOUT_SECS = 5 * 60; // Globals LLCacheName* gCacheName = NULL; -std::map LLCacheName::sCacheName; /// --------------------------------------------------------------------------- /// class LLCacheNameEntry @@ -215,7 +214,7 @@ public: Impl(LLMessageSystem* msg); ~Impl(); - bool getName(const LLUUID& id, std::string& first, std::string& last); + bool getName(const LLUUID& id, std::string& first, std::string& last, std::map& default_names); boost::signals2::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback); void addPending(const LLUUID& id, const LLHost& host); @@ -247,9 +246,9 @@ LLCacheName::LLCacheName(LLMessageSystem* msg) LLCacheName::LLCacheName(LLMessageSystem* msg, const LLHost& upstream_host) : impl(* new Impl(msg)) { - sCacheName["waiting"] = "(Loading...)"; - sCacheName["nobody"] = "(nobody)"; - sCacheName["none"] = "(none)"; + mCacheName["waiting"] = "(Loading...)"; + mCacheName["nobody"] = "(nobody)"; + mCacheName["none"] = "(none)"; setUpstream(upstream_host); } @@ -274,7 +273,7 @@ LLCacheName::Impl::Impl(LLMessageSystem* msg) LLCacheName::Impl::~Impl() { - for_each(mCache.begin(), mCache.end(), DeletePairedPointer()); + std::for_each(mCache.begin(), mCache.end(), DeletePairedPointer()); mCache.clear(); for_each(mReplyQueue.begin(), mReplyQueue.end(), DeletePointer()); mReplyQueue.clear(); @@ -402,11 +401,11 @@ void LLCacheName::exportFile(std::ostream& ostr) } -bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last) +bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last, std::map& default_names) { if(id.isNull()) { - first = sCacheName["nobody"]; + first = default_names["nobody"]; last.clear(); return true; } @@ -420,7 +419,7 @@ bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin } else { - first = sCacheName["waiting"]; + first = default_names["waiting"]; last.clear(); if (!isRequestPending(id)) { @@ -434,8 +433,8 @@ bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin // static void LLCacheName::localizeCacheName(std::string key, std::string value) { - if (key!="" && value!= "" ) - sCacheName[key]=value; + if (!key.empty() && !value.empty()) + mCacheName[key]=value; else LL_WARNS()<< " Error localizing cache key " << key << " To "<< value< sCacheName; + void localizeCacheName(std::string key, std::string value); + private: + std::map mCacheName; class Impl; Impl& impl; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 6087e6c0ee..08a54b7369 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -300,7 +300,7 @@ void LLFloaterAvatarPicker::populateNearMe() if (!LLAvatarNameCache::get(av, &av_name)) { element["columns"][0]["column"] = "name"; - element["columns"][0]["value"] = LLCacheName::getDefaultName(); + element["columns"][0]["value"] = gCacheName->getDefaultName(); all_loaded = false; } else diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 33d0ac891d..bfa8e39b70 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6289,7 +6289,7 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act if (item && (item->getCreatorUUID() != gAgent.getID()) && (!item->getCreatorUUID().isNull())) { - std::string callingcard_name = LLCacheName::getDefaultName(); + std::string callingcard_name = gCacheName->getDefaultName(); LLAvatarName av_name; if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name)) { -- cgit v1.2.3 From c65bbadb2f6bc6828c149e3c468473a8c12d094c Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 21 Jul 2024 20:10:02 -0400 Subject: Fix rare shutdown crash in LLViewerObjectList --- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerobject.cpp | 10 +++++----- indra/newview/llviewerobjectlist.cpp | 24 +++++++++++------------- indra/newview/llviewerobjectlist.h | 14 +++++++------- 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5a32f9654d..0d5482dcd1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3602,7 +3602,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) U32 local_id; mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); - LLViewerObjectList::getUUIDFromLocal(id, local_id, ip, port); + gObjectList.getUUIDFromLocal(id, local_id, ip, port); if (id == LLUUID::null) { LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index e108f9c268..9ad2474e9b 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1940,14 +1940,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if(mesgsys != NULL) { - LLViewerObjectList::getUUIDFromLocal(parent_uuid, + gObjectList.getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort()); } else { - LLViewerObjectList::getUUIDFromLocal(parent_uuid, + gObjectList.getUUIDFromLocal(parent_uuid, parent_id, mRegionp->getHost().getAddress(), mRegionp->getHost().getPort()); @@ -2062,7 +2062,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // Debugging for suspected problems with local ids. //LLUUID parent_uuid; - //LLViewerObjectList::getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort() ); + //gObjectList.getUUIDFromLocal(parent_uuid, parent_id, mesgsys->getSenderIP(), mesgsys->getSenderPort() ); //if (parent_uuid != cur_parentp->getID() ) //{ // LL_ERRS() << "Local ID match but UUID mismatch of viewer object" << LL_ENDL; @@ -2085,14 +2085,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if(mesgsys != NULL) { - LLViewerObjectList::getUUIDFromLocal(parent_uuid, + gObjectList.getUUIDFromLocal(parent_uuid, parent_id, gMessageSystem->getSenderIP(), gMessageSystem->getSenderPort()); } else { - LLViewerObjectList::getUUIDFromLocal(parent_uuid, + gObjectList.getUUIDFromLocal(parent_uuid, parent_id, mRegionp->getHost().getAddress(), mRegionp->getHost().getPort()); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 08a1ba0f9b..bfbb701a8e 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -99,8 +99,6 @@ extern LLPipeline gPipeline; // Statics for object lookup tables. U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. -std::map LLViewerObjectList::sIPAndPortToIndex; -std::map LLViewerObjectList::sIndexAndLocalIDToUUID; LLViewerObjectList::LLViewerObjectList() { @@ -138,17 +136,17 @@ void LLViewerObjectList::getUUIDFromLocal(LLUUID &id, { U64 ipport = (((U64)ip) << 32) | (U64)port; - U32 index = sIPAndPortToIndex[ipport]; + U32 index = mIPAndPortToIndex[ipport]; if (!index) { index = sSimulatorMachineIndex++; - sIPAndPortToIndex[ipport] = index; + mIPAndPortToIndex[ipport] = index; } U64 indexid = (((U64)index) << 32) | (U64)local_id; - id = get_if_there(sIndexAndLocalIDToUUID, indexid, LLUUID::null); + id = get_if_there(mIndexAndLocalIDToUUID, indexid, LLUUID::null); } U64 LLViewerObjectList::getIndex(const U32 local_id, @@ -157,7 +155,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id, { U64 ipport = (((U64)ip) << 32) | (U64)port; - U32 index = sIPAndPortToIndex[ipport]; + U32 index = mIPAndPortToIndex[ipport]; if (!index) { @@ -177,14 +175,14 @@ bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) U32 ip = objectp->getRegion()->getHost().getAddress(); U32 port = objectp->getRegion()->getHost().getPort(); U64 ipport = (((U64)ip) << 32) | (U64)port; - U32 index = sIPAndPortToIndex[ipport]; + U32 index = mIPAndPortToIndex[ipport]; // LL_INFOS() << "Removing object from table, local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL; U64 indexid = (((U64)index) << 32) | (U64)local_id; - std::map::iterator iter = sIndexAndLocalIDToUUID.find(indexid); - if (iter == sIndexAndLocalIDToUUID.end()) + std::map::iterator iter = mIndexAndLocalIDToUUID.find(indexid); + if (iter == mIndexAndLocalIDToUUID.end()) { return false; } @@ -192,7 +190,7 @@ bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) // Found existing entry if (iter->second == objectp->getID()) { // Full UUIDs match, so remove the entry - sIndexAndLocalIDToUUID.erase(iter); + mIndexAndLocalIDToUUID.erase(iter); return true; } // UUIDs did not match - this would zap a valid entry, so don't erase it @@ -210,17 +208,17 @@ void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, { U64 ipport = (((U64)ip) << 32) | (U64)port; - U32 index = sIPAndPortToIndex[ipport]; + U32 index = mIPAndPortToIndex[ipport]; if (!index) { index = sSimulatorMachineIndex++; - sIPAndPortToIndex[ipport] = index; + mIPAndPortToIndex[ipport] = index; } U64 indexid = (((U64)index) << 32) | (U64)local_id; - sIndexAndLocalIDToUUID[indexid] = id; + mIndexAndLocalIDToUUID[indexid] = id; //LL_INFOS() << "Adding object to table, full ID " << id // << ", local ID " << local_id << ", ip " << ip << ":" << port << LL_ENDL; diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index f0f236d6ae..ebdfd0d369 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -171,18 +171,18 @@ public: // used to discount stats from this frame bool mWasPaused; - static void getUUIDFromLocal(LLUUID &id, + void getUUIDFromLocal(LLUUID &id, const U32 local_id, const U32 ip, const U32 port); - static void setUUIDAndLocal(const LLUUID &id, + void setUUIDAndLocal(const LLUUID &id, const U32 local_id, const U32 ip, const U32 port); // Requires knowledge of message system info! - static bool removeFromLocalIDTable(const LLViewerObject* objectp); + bool removeFromLocalIDTable(const LLViewerObject* objectp); // Used ONLY by the orphaned object code. - static U64 getIndex(const U32 local_id, const U32 ip, const U32 port); + U64 getIndex(const U32 local_id, const U32 ip, const U32 port); S32 mNumUnknownUpdates; S32 mNumDeadObjectUpdates; @@ -216,9 +216,9 @@ protected: S32 mCurLazyUpdateIndex; static U32 sSimulatorMachineIndex; - static std::map sIPAndPortToIndex; + std::map mIPAndPortToIndex; - static std::map sIndexAndLocalIDToUUID; + std::map mIndexAndLocalIDToUUID; friend class LLViewerObject; @@ -257,7 +257,7 @@ extern LLViewerObjectList gObjectList; */ inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) { - std::map >::iterator iter = mUUIDObjectMap.find(id); + auto iter = mUUIDObjectMap.find(id); if(iter != mUUIDObjectMap.end()) { return iter->second; -- cgit v1.2.3 From 04f95e78e38a682d4933ead0403e78507cbe79a6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 18 Jul 2024 18:14:22 +0300 Subject: viewer#2061 Crash in ~LLScriptEdCore() --- indra/newview/llpreviewscript.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index c2188ea638..b7c929f0b5 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -414,7 +414,13 @@ LLScriptEdCore::~LLScriptEdCore() if (script_search && script_search->getEditorCore() == this) { script_search->closeFloater(); - delete script_search; + // closeFloater can delete instance since it's not reusable nor single instance + // so make sure instance is still there before deleting + script_search = LLFloaterScriptSearch::getInstance(); + if (script_search) + { + delete script_search; + } } delete mLiveFile; -- cgit v1.2.3 From 9a8b2186e745f77e7f62c4cae6c620d8275c166e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 13 Jun 2024 18:37:28 +0300 Subject: viewer#1750 Crash at LLGLTFMaterial::operator= --- indra/newview/lllocalbitmaps.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 6ab5e05b7d..49abc7ab7d 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -671,15 +671,16 @@ void LLLocalBitmap::updateGLTFMaterials(LLUUID old_id, LLUUID new_id) if (override_mat) { // do not create a new material, reuse existing pointer - LLFetchedGLTFMaterial* render_mat = (LLFetchedGLTFMaterial*)entry->getGLTFRenderMaterial(); + LLFetchedGLTFMaterial* render_mat = dynamic_cast(entry->getGLTFRenderMaterial()); if (render_mat) { - llassert(dynamic_cast(entry->getGLTFRenderMaterial()) != nullptr); - { - *render_mat = *fetched_mat; - } + *render_mat = *fetched_mat; render_mat->applyOverride(*override_mat); } + else + { + LL_WARNS_ONCE() << "Failed to apply local material override, render material not found" << LL_ENDL; + } } } } -- cgit v1.2.3 From 105dc12980c8b90600a7a422985d067f4acbd794 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Fri, 9 Aug 2024 19:51:13 +0300 Subject: Fix spaces in indra/newview/lllocalbitmaps.cpp Co-authored-by: Andrey Lihatskiy --- indra/newview/lllocalbitmaps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 49abc7ab7d..ce0c460f5b 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -679,7 +679,7 @@ void LLLocalBitmap::updateGLTFMaterials(LLUUID old_id, LLUUID new_id) } else { - LL_WARNS_ONCE() << "Failed to apply local material override, render material not found" << LL_ENDL; + LL_WARNS_ONCE() << "Failed to apply local material override, render material not found" << LL_ENDL; } } } -- cgit v1.2.3 From ac330f63fd7ac655bbd06ce5d4ed65430aa2f42a Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Fri, 9 Aug 2024 17:18:07 -0700 Subject: fix build.sh whitespace --- build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 93babd9226..5dfb4b6a74 100755 --- a/build.sh +++ b/build.sh @@ -199,14 +199,14 @@ package_llphysicsextensions_tpv() tpv_status=0 # nat 2016-12-21: without HAVOK, can't build PhysicsExtensions_TPV. if [ "$variant" = "Release" -a "${HAVOK:-}" != "OFF" ] - then + then tpvconfig="$build_dir/packages/llphysicsextensions/autobuild-tpv.xml" test -r "$tpvconfig" || fatal "No llphysicsextensions_tpv autobuild configuration found" # SL-19942: autobuild ignores -c switch if AUTOBUILD_CONFIGURATION set unset AUTOBUILD_CONFIGURATION "$autobuild" build --quiet --config-file "$(native_path "$tpvconfig")" -c Tpv \ || fatal "failed to build llphysicsextensions_tpv" - + # capture the package file name for use in upload later... PKGTMP=`mktemp -t pgktpv.XXXXXX` cleanup="$cleanup ; rm $PKGTMP* 2>/dev/null" @@ -239,7 +239,7 @@ build() || fatal "failed building $variant" echo true >"$build_dir"/build_ok end_section "autobuild $variant" - + begin_section "extensions $variant" # Run build extensions if [ -d ${build_dir}/packages/build-extensions ] @@ -312,7 +312,7 @@ begin_section "select viewer channel" # Look for a branch-specific viewer_channel setting # changeset_branch is set in the sling-buildscripts viewer_build_branch=$(echo -n "${changeset_branch:-$(repo_branch ${BUILDSCRIPTS_SRC:-$(pwd)})}" | tr -Cs 'A-Za-z0-9_' '_' | sed -E 's/^_+//; s/_+$//') -if [ -n "$viewer_build_branch" ] +if [ -n "$viewer_build_branch" ] then branch_viewer_channel_var="${viewer_build_branch}_viewer_channel" if [ -n "${!branch_viewer_channel_var}" ] @@ -434,7 +434,7 @@ do record_event "configure for $variant failed: build skipped" fi - if ! $succeeded + if ! $succeeded then record_event "remaining variants skipped due to $variant failure" break @@ -499,7 +499,7 @@ then fi done end_section "Upload Debian Repository" - + else record_event "debian build not enabled" fi -- cgit v1.2.3 From c8f0cdd1a9cc28d684022a24496aa243d4be47f4 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 12 Aug 2024 18:07:44 +0200 Subject: #2257 BugSplat Crash #1503682: SecondLifeViewer!LLFloaterIMSessionTab::enableDisableCallBtn(438) --- indra/newview/llfloaterimsessiontab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 0ed84c381f..049f4aec92 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -433,7 +433,7 @@ void LLFloaterIMSessionTab::draw() void LLFloaterIMSessionTab::enableDisableCallBtn() { - if (LLVoiceClient::instanceExists() && mVoiceButton) + if (!LLApp::isExiting() && LLVoiceClient::instanceExists() && mVoiceButton) { mVoiceButton->setEnabled( mSessionID.notNull() -- cgit v1.2.3 From 47fc1d2f2af8e432b618915224c6bea29069e332 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Mon, 12 Aug 2024 11:32:19 -0700 Subject: [WebRTC] allow quad channel microphones/inputs Issue #257 - bugsplat crash. In the debug version of WebRTC, it makes an explicit check that the number of channels for an input device is between 1 and 2. The release version allows more, and should downmix if 1 channel is asked for. This fix bumps up the max channels allowed to 8. --- autobuild.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 289da031eb..384da7cd37 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2909,11 +2909,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - baabb11f324be350253b1fb58cf262c1aa19fa70 + f4f4f05a4eaa14efc17a51b4d3f43b0834fec2a2 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-darwin64-10190042668.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.68-debug/webrtc-m114.5735.08.68-debug.10356186505-darwin64-10356186505.tar.zst name darwin64 @@ -2923,11 +2923,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - a13776c8f99f8975665be66ff8b51a80ba46c718 + 1419766891f2d3a70e3231bf8fed874ad8e4dcac hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-linux64-10190042668.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.68-debug/webrtc-m114.5735.08.68-debug.10356186505-linux64-10356186505.tar.zst name linux64 @@ -2937,11 +2937,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 965ef5d65a14191a52ee9ec6a9a8a1d2ce3f2ffb + 1f4cb5cbffdcb846de012d336cdbbc74ec5b2919 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-windows64-10190042668.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.68-debug/webrtc-m114.5735.08.68-debug.10356186505-windows64-10356186505.tar.zst name windows64 @@ -2954,7 +2954,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors copyright Copyright (c) 2011, The WebRTC project authors. All rights reserved. version - m114.5735.08.67-debug.10190042668 + m114.5735.08.68-debug.10356186505 name webrtc vcs_branch -- cgit v1.2.3 From 06846d78b50b8acd773b4c5bda0b4ed88f212a9c Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 12 Aug 2024 21:26:35 +0200 Subject: #2263 BugSplat Crash #1503400: SecondLifeViewer!LLDrawable::getFace(320) --- indra/newview/llflexibleobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 7ed62d68bd..009b9e2829 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -775,7 +775,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) } } - if (volume->mDrawable.isNull()) + if (volume->mDrawable.isNull() || volume->mDrawable->isDead()) { return TRUE; // No update to complete } -- cgit v1.2.3 From 2e2f10f7dd1756251bb311cbc2ea872020d864c6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 12 Aug 2024 18:56:37 +0300 Subject: Remove unused setting BrowserWebSecurityDisabled --- indra/newview/llviewermedia.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 66182684ad..49a4e27194 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1753,9 +1753,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ bool javascript_enabled = gSavedSettings.getBOOL("BrowserJavascriptEnabled"); media_source->setJavascriptEnabled(javascript_enabled || clean_browser); - // collect 'web security disabled' (see Chrome --web-security-disabled) setting from prefs and send to embedded browser - bool web_security_disabled = gSavedSettings.getBOOL("BrowserWebSecurityDisabled"); - media_source->setWebSecurityDisabled(web_security_disabled || clean_browser); + media_source->setWebSecurityDisabled(clean_browser); // collect setting indicates if local file access from file URLs is allowed from prefs and send to embedded browser bool file_access_from_file_urls = gSavedSettings.getBOOL("BrowserFileAccessFromFileUrls"); -- cgit v1.2.3 From e086437f12db31cb2dcc2e8fdf12794cc802cc0d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 13 Aug 2024 08:55:23 +0300 Subject: viewer-private#262 webrtc crashes on shutdown removeObserver failed to remove an im session floater --- indra/newview/llconversationview.cpp | 20 ++++++++----------- indra/newview/llfloaterimsession.cpp | 9 ++++----- indra/newview/llfloaterimsessiontab.cpp | 8 +++++++- indra/newview/llfloaterimsessiontab.h | 1 + indra/newview/llpanelgroup.cpp | 7 ++----- indra/newview/llpanelpeople.cpp | 14 ++++--------- indra/newview/llpanelprofile.cpp | 5 +---- indra/newview/llspeakingindicatormanager.cpp | 7 ++----- indra/newview/llvoicechannel.cpp | 11 ++++------ indra/newview/llvoiceclient.cpp | 30 ++++++++++++++++++++++------ indra/newview/llvoiceclient.h | 12 +++++------ 11 files changed, 63 insertions(+), 61 deletions(-) diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 117dab8d58..03eb9f0652 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -98,10 +98,7 @@ LLConversationViewSession::~LLConversationViewSession() if (mVoiceClientObserver) { - if (LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver); - } + LLVoiceClient::removeObserver(mVoiceClientObserver); delete mVoiceClientObserver; } @@ -259,16 +256,15 @@ BOOL LLConversationViewSession::postBuild() icon->setVisible(true); mSpeakingIndicator->setSpeakerId(gAgentID, LLUUID::null, true); mIsInActiveVoiceChannel = true; - if(LLVoiceClient::instanceExists()) + + if (mVoiceClientObserver) { - if (mVoiceClientObserver) - { - LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver); - delete mVoiceClientObserver; - } - mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this); - LLVoiceClient::getInstance()->addObserver(mVoiceClientObserver); + LLVoiceClient::removeObserver(mVoiceClientObserver); + delete mVoiceClientObserver; } + mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this); + LLVoiceClient::addObserver(mVoiceClientObserver); + break; } default: diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index b782515c14..f954e72376 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -287,10 +287,8 @@ void LLFloaterIMSession::sendMsg(const std::string& msg) LLFloaterIMSession::~LLFloaterIMSession() { mVoiceChannelStateChangeConnection.disconnect(); - if(LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } + + LLVoiceClient::removeObserver(this); LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); @@ -366,7 +364,7 @@ BOOL LLFloaterIMSession::postBuild() childSetAction("voice_call_btn", boost::bind(&LLFloaterIMSession::onCallButtonClicked, this)); - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::addObserver(this); //*TODO if session is not initialized yet, add some sort of a warning message like "starting session...blablabla" //see LLFloaterIMPanel for how it is done (IB) @@ -537,6 +535,7 @@ void LLFloaterIMSession::boundVoiceChannel() LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); if(voice_channel) { + mVoiceChannelStateChangeConnection.disconnect(); mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback( boost::bind(&LLFloaterIMSession::onVoiceChannelStateChanged, this, _1, _2)); diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 049f4aec92..081288fae5 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -433,7 +433,7 @@ void LLFloaterIMSessionTab::draw() void LLFloaterIMSessionTab::enableDisableCallBtn() { - if (!LLApp::isExiting() && LLVoiceClient::instanceExists() && mVoiceButton) + if (LLVoiceClient::instanceExists() && mVoiceButton) { mVoiceButton->setEnabled( mSessionID.notNull() @@ -546,6 +546,12 @@ void LLFloaterIMSessionTab::closeFloater(bool app_quitting) super::closeFloater(app_quitting); } +void LLFloaterIMSessionTab::deleteAllChildren() +{ + super::deleteAllChildren(); + mVoiceButton = NULL; +} + std::string LLFloaterIMSessionTab::appendTime() { std::string timeStr = "[" + LLTrans::getString("TimeHour") + "]:" diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index 00b43f499b..006b92e54b 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -82,6 +82,7 @@ public: /*virtual*/ void setVisible(BOOL visible); /*virtual*/ void setFocus(BOOL focus); /*virtual*/ void closeFloater(bool app_quitting = false); + /*virtual*/ void deleteAllChildren(); // Handle the left hand participant list widgets void addConversationViewParticipant(LLConversationItem* item, bool update_view = true); diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 372f1a9d20..1ab8265d83 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -98,10 +98,7 @@ LLPanelGroup::LLPanelGroup() LLPanelGroup::~LLPanelGroup() { LLGroupMgr::getInstance()->removeObserver(this); - if(LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } + LLVoiceClient::removeObserver(this); } void LLPanelGroup::onOpen(const LLSD& key) @@ -194,7 +191,7 @@ BOOL LLPanelGroup::postBuild() mJoinText = panel_general->getChild("join_cost_text"); } - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::addObserver(this); return TRUE; } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 24f3ad88cc..9b0a52d3e9 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -338,7 +338,7 @@ public: LLAvatarTracker::instance().addObserver(this); // For notification when SIP online status changes. - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::addObserver(this); mInvObserver = new LLInventoryFriendCardObserver(this); } @@ -346,10 +346,7 @@ public: { // will be deleted by ~LLInventoryModel //delete mInvObserver; - if (LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } + LLVoiceClient::removeObserver(this); LLAvatarTracker::instance().removeObserver(this); } @@ -577,10 +574,7 @@ LLPanelPeople::~LLPanelPeople() delete mFriendListUpdater; delete mRecentListUpdater; - if(LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } + LLVoiceClient::removeObserver(this); } void LLPanelPeople::onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LLSD& param, LLAvatarList* avatar_list) @@ -721,7 +715,7 @@ BOOL LLPanelPeople::postBuild() // Must go after setting commit callback and initializing all pointers to children. mTabContainer->selectTabByName(NEARBY_TAB_NAME); - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::addObserver(this); // call this method in case some list is empty and buttons can be in inconsistent state updateButtons(); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 151e137b1d..a1d4c7c658 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -702,10 +702,7 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife() LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this); } - if (LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this); - } + LLVoiceClient::removeObserver((LLVoiceClientStatusObserver*)this); if (mAvatarNameCacheConnection.connected()) { diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index f16ab3b25a..34bed8a269 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -182,7 +182,7 @@ void SpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speaker SpeakingIndicatorManager::SpeakingIndicatorManager() { LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&SpeakingIndicatorManager::sOnCurrentChannelChanged, this, _1)); - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::addObserver(this); } SpeakingIndicatorManager::~SpeakingIndicatorManager() @@ -193,10 +193,7 @@ void SpeakingIndicatorManager::cleanupSingleton() { // Don't use LLVoiceClient::getInstance() here without a check, // singleton MAY have already been destroyed. - if (LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } + LLVoiceClient::removeObserver(this); } void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 9b144048f7..8cda7c76da 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -81,10 +81,7 @@ LLVoiceChannel::~LLVoiceChannel() { sCurrentVoiceChannel = NULL; // Must check instance exists here, the singleton MAY have already been destroyed. - if(LLVoiceClient::instanceExists()) - { - LLVoiceClient::getInstance()->removeObserver(this); - } + LLVoiceClient::removeObserver(this); } sVoiceChannelMap.erase(mSessionID); @@ -219,7 +216,7 @@ void LLVoiceChannel::deactivate() LLVoiceClient::getInstance()->setUserPTTState(false); } } - LLVoiceClient::getInstance()->removeObserver(this); + LLVoiceClient::removeObserver(this); if (sCurrentVoiceChannel == this) { @@ -259,7 +256,7 @@ void LLVoiceChannel::activate() setState(STATE_CALL_STARTED); } - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::addObserver(this); //do not send earlier, channel should be initialized, should not be in STATE_NO_CHANNEL_INFO state sCurrentVoiceChannelChangedSignal(this->mSessionID); @@ -751,7 +748,7 @@ void LLVoiceChannelProximal::deactivate() { setState(STATE_HUNG_UP); } - LLVoiceClient::getInstance()->removeObserver(this); + LLVoiceClient::removeObserver(this); LLVoiceClient::getInstance()->activateSpatialChannel(false); } diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 5132b9bb07..d1b482dce7 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -796,8 +796,14 @@ void LLVoiceClient::addObserver(LLVoiceClientStatusObserver* observer) void LLVoiceClient::removeObserver(LLVoiceClientStatusObserver* observer) { - LLVivoxVoiceClient::getInstance()->removeObserver(observer); - LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + if (LLVivoxVoiceClient::instanceExists()) + { + LLVivoxVoiceClient::getInstance()->removeObserver(observer); + } + if (LLWebRTCVoiceClient::instanceExists()) + { + LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + } } void LLVoiceClient::addObserver(LLFriendObserver* observer) @@ -808,8 +814,14 @@ void LLVoiceClient::addObserver(LLFriendObserver* observer) void LLVoiceClient::removeObserver(LLFriendObserver* observer) { - LLVivoxVoiceClient::getInstance()->removeObserver(observer); - LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + if (LLVivoxVoiceClient::instanceExists()) + { + LLVivoxVoiceClient::getInstance()->removeObserver(observer); + } + if (LLWebRTCVoiceClient::instanceExists()) + { + LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + } } void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) @@ -820,8 +832,14 @@ void LLVoiceClient::addObserver(LLVoiceClientParticipantObserver* observer) void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer) { - LLVivoxVoiceClient::getInstance()->removeObserver(observer); - LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + if (LLVivoxVoiceClient::instanceExists()) + { + LLVivoxVoiceClient::getInstance()->removeObserver(observer); + } + if (LLWebRTCVoiceClient::instanceExists()) + { + LLWebRTCVoiceClient::getInstance()->removeObserver(observer); + } } std::string LLVoiceClient::sipURIFromID(const LLUUID &id) const diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index fdc00a98e8..19dd34f5e0 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -482,12 +482,12 @@ public: void onRegionChanged(); - void addObserver(LLVoiceClientStatusObserver* observer); - void removeObserver(LLVoiceClientStatusObserver* observer); - void addObserver(LLFriendObserver* observer); - void removeObserver(LLFriendObserver* observer); - void addObserver(LLVoiceClientParticipantObserver* observer); - void removeObserver(LLVoiceClientParticipantObserver* observer); + static void addObserver(LLVoiceClientStatusObserver* observer); + static void removeObserver(LLVoiceClientStatusObserver* observer); + static void addObserver(LLFriendObserver* observer); + static void removeObserver(LLFriendObserver* observer); + static void addObserver(LLVoiceClientParticipantObserver* observer); + static void removeObserver(LLVoiceClientParticipantObserver* observer); std::string sipURIFromID(const LLUUID &id) const; LLSD getP2PChannelInfoTemplate(const LLUUID& id) const; -- cgit v1.2.3 From bf3e2e2b172dffbe745092a062f48bb6bc8b269f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 13 Aug 2024 11:22:03 +0300 Subject: viewer-private#262 webrtc crashes on shutdown #2 --- indra/newview/llvoicewebrtc.cpp | 50 ++++++++++++++++++++++++++++++++--------- indra/newview/llvoicewebrtc.h | 6 +++-- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index ff3c0eccd2..1ee1e69b79 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -237,12 +237,27 @@ LLWebRTCVoiceClient::LLWebRTCVoiceClient() : //--------------------------------------------------- LLWebRTCVoiceClient::~LLWebRTCVoiceClient() +{ +} + +void LLWebRTCVoiceClient::cleanupSingleton() { if (mAvatarNameCacheConnection.connected()) { mAvatarNameCacheConnection.disconnect(); } + sShuttingDown = true; + if (mSession) + { + mSession->shutdownAllConnections(); + } + if (mNextSession) + { + mNextSession->shutdownAllConnections(); + } + cleanUp(); + sessionState::clearSessions(); } //--------------------------------------------------- @@ -656,6 +671,10 @@ void LLWebRTCVoiceClient::OnDevicesChanged(const llwebrtc::LLWebRTCVoiceDeviceLi void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDeviceList &render_devices, const llwebrtc::LLWebRTCVoiceDeviceList &capture_devices) { + if (sShuttingDown) + { + return; + } LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); @@ -1704,7 +1723,7 @@ void LLWebRTCVoiceClient::predSetUserMute(const LLWebRTCVoiceClient::sessionStat //------------------------------------------------------------------------ // Sessions -std::map LLWebRTCVoiceClient::sessionState::mSessions; +std::map LLWebRTCVoiceClient::sessionState::sSessions; LLWebRTCVoiceClient::sessionState::sessionState() : @@ -1791,13 +1810,19 @@ void LLWebRTCVoiceClient::sessionState::addSession( const std::string & channelID, LLWebRTCVoiceClient::sessionState::ptr_t& session) { - mSessions[channelID] = session; + sSessions[channelID] = session; } LLWebRTCVoiceClient::sessionState::~sessionState() { LL_DEBUGS("Voice") << "Destroying session CHANNEL=" << mChannelID << LL_ENDL; + if (!mShuttingDown) + { + shutdownAllConnections(); + } + mWebRTCConnections.clear(); + removeAllParticipants(); } @@ -1807,8 +1832,8 @@ LLWebRTCVoiceClient::sessionState::ptr_t LLWebRTCVoiceClient::sessionState::matc sessionStatePtr_t result; // *TODO: My kingdom for a lambda! - std::map::iterator it = mSessions.find(channel_id); - if (it != mSessions.end()) + std::map::iterator it = sSessions.find(channel_id); + if (it != sSessions.end()) { result = (*it).second; } @@ -1817,17 +1842,17 @@ LLWebRTCVoiceClient::sessionState::ptr_t LLWebRTCVoiceClient::sessionState::matc void LLWebRTCVoiceClient::sessionState::for_each(sessionFunc_t func) { - std::for_each(mSessions.begin(), mSessions.end(), boost::bind(for_eachPredicate, _1, func)); + std::for_each(sSessions.begin(), sSessions.end(), boost::bind(for_eachPredicate, _1, func)); } void LLWebRTCVoiceClient::sessionState::reapEmptySessions() { std::map::iterator iter; - for (iter = mSessions.begin(); iter != mSessions.end();) + for (iter = sSessions.begin(); iter != sSessions.end();) { if (iter->second->isEmpty()) { - iter = mSessions.erase(iter); + iter = sSessions.erase(iter); } else { @@ -1873,6 +1898,11 @@ LLWebRTCVoiceClient::sessionStatePtr_t LLWebRTCVoiceClient::addSession(const std } } +void LLWebRTCVoiceClient::sessionState::clearSessions() +{ + sSessions.clear(); +} + LLWebRTCVoiceClient::sessionStatePtr_t LLWebRTCVoiceClient::findP2PSession(const LLUUID &agent_id) { sessionStatePtr_t result = sessionState::matchSessionByChannelID(agent_id.asString()); @@ -1912,14 +1942,14 @@ void LLWebRTCVoiceClient::sessionState::processSessionStates() { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE - auto iter = mSessions.begin(); - while (iter != mSessions.end()) + auto iter = sSessions.begin(); + while (iter != sSessions.end()) { if (!iter->second->processConnectionStates() && iter->second->mShuttingDown) { // if the connections associated with a session are gone, // and this session is shutting down, remove it. - iter = mSessions.erase(iter); + iter = sSessions.erase(iter); } else { diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index f699bd6df9..48c50a1ea3 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -70,6 +70,7 @@ class LLWebRTCVoiceClient : public LLSingleton, virtual ~LLWebRTCVoiceClient(); public: + void cleanupSingleton() override; /// @name LLVoiceModuleInterface virtual implementations /// @see LLVoiceModuleInterface //@{ @@ -300,6 +301,7 @@ public: static void for_each(sessionFunc_t func); static void reapEmptySessions(); + static void clearSessions(); bool isEmpty() { return mWebRTCConnections.empty(); } @@ -319,7 +321,7 @@ public: participantUUIDMap mParticipantsByUUID; static bool hasSession(const std::string &sessionID) - { return mSessions.find(sessionID) != mSessions.end(); } + { return sSessions.find(sessionID) != sSessions.end(); } bool mHangupOnLastLeave; // notify observers after the session becomes empty. bool mNotifyOnFirstJoin; // notify observers when the first peer joins. @@ -330,7 +332,7 @@ public: private: - static std::map mSessions; // canonical list of outstanding sessions. + static std::map sSessions; // canonical list of outstanding sessions. static void for_eachPredicate(const std::pair &a, -- cgit v1.2.3 From ab86e77818e76bdf3ef660b9fa964217265be3e7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 13 Aug 2024 19:31:48 +0300 Subject: viewer-private#260 The 'Speak' button looks disabled during IM voice chat p2p channels was reusing obsolete channel info --- indra/newview/llimview.cpp | 5 +++++ indra/newview/llvoicechannel.cpp | 12 ++++++++++++ indra/newview/llvoicechannel.h | 4 +++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d3f013c67c..17b5af74d2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3857,6 +3857,11 @@ bool LLIMMgr::startCall(const LLUUID& session_id, LLVoiceChannel::EDirection dir { voice_channel->setChannelInfo(voice_channel_info); } + else if (voice_channel->getState() < LLVoiceChannel::STATE_READY) + { + // restart if there wa an error or it was hang up + voice_channel->resetChannelInfo(); + } voice_channel->setCallDirection(direction); voice_channel->activate(); return true; diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 8cda7c76da..7f578171af 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -115,6 +115,12 @@ void LLVoiceChannel::setChannelInfo(const LLSD &channelInfo) } } +void LLVoiceChannel::resetChannelInfo() +{ + mChannelInfo = LLSD(); + mState = STATE_NO_CHANNEL_INFO; +} + void LLVoiceChannel::onChange(EStatusType type, const LLSD& channelInfo, bool proximal) { LL_DEBUGS("Voice") << "Incoming channel info: " << channelInfo << LL_ENDL; @@ -915,6 +921,12 @@ void LLVoiceChannelP2P::setChannelInfo(const LLSD& channel_info) } } +void LLVoiceChannelP2P::resetChannelInfo() +{ + mChannelInfo = LLVoiceClient::getInstance()->getP2PChannelInfoTemplate(mOtherUserID); + mState = STATE_NO_CHANNEL_INFO; // we have template, not full info +} + void LLVoiceChannelP2P::setState(EState state) { LL_INFOS("Voice") << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << LL_ENDL; diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 46a3f552cb..95fd247ca6 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -72,7 +72,8 @@ public: virtual void handleError(EStatusType status); virtual void deactivate(); virtual void activate(); - virtual void setChannelInfo(const LLSD &channelInfo); + virtual void setChannelInfo(const LLSD& channelInfo); + virtual void resetChannelInfo(); virtual void requestChannelInfo(); virtual bool isActive() const; virtual bool callStarted() const; @@ -189,6 +190,7 @@ class LLVoiceChannelP2P : public LLVoiceChannelGroup void requestChannelInfo() override; void deactivate() override; void setChannelInfo(const LLSD& channel_info) override; + void resetChannelInfo() override; protected: void setState(EState state) override; -- cgit v1.2.3 From 4e6143f0ef7f356fb4b94747517eba4f9f06bb7a Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Tue, 13 Aug 2024 19:41:53 -0700 Subject: don't fatal error on AudioDeviceStop --- autobuild.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 384da7cd37..a6b852f2fd 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2909,11 +2909,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - f4f4f05a4eaa14efc17a51b4d3f43b0834fec2a2 + 194b4f5957c9f003c46e61a434e23a7c3d1180d6 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.68-debug/webrtc-m114.5735.08.68-debug.10356186505-darwin64-10356186505.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-darwin64-10377605436.tar.zst name darwin64 @@ -2923,11 +2923,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 1419766891f2d3a70e3231bf8fed874ad8e4dcac + 38e0c7d30b4c40eb04e60ab199440b847cc7c6cf hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.68-debug/webrtc-m114.5735.08.68-debug.10356186505-linux64-10356186505.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-linux64-10377605436.tar.zst name linux64 @@ -2937,11 +2937,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - 1f4cb5cbffdcb846de012d336cdbbc74ec5b2919 + 053fb5c873df9192e34cddcf2db1c5fdcff76ba1 hash_algorithm sha1 url - https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.68-debug/webrtc-m114.5735.08.68-debug.10356186505-windows64-10356186505.tar.zst + https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.70-debug/webrtc-m114.5735.08.70-debug.10377605436-windows64-10377605436.tar.zst name windows64 @@ -2954,7 +2954,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors copyright Copyright (c) 2011, The WebRTC project authors. All rights reserved. version - m114.5735.08.68-debug.10356186505 + m114.5735.08.70-debug.10377605436 name webrtc vcs_branch -- cgit v1.2.3 From b36dacce33b074cd758f0e6f314924bcc50f817f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 14 Aug 2024 18:14:20 +0300 Subject: viewer#2204 crash at connectionStateMachine --- indra/newview/llvoicewebrtc.cpp | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 1ee1e69b79..06baea4ba2 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -2397,6 +2397,12 @@ void LLVoiceWebRTCConnection::OnPeerConnectionClosed() setVoiceConnectionState(VOICE_STATE_CLOSED); mOutstandingRequests--; } + else if (LLWebRTCVoiceClient::isShuttingDown()) + { + // disconnect was initialized by llwebrtc::terminate() instead of connectionStateMachine + LL_INFOS("Voice") << "Peer connection has closed, but state is " << mVoiceConnectionState << LL_ENDL; + setVoiceConnectionState(VOICE_STATE_CLOSED); + } }); } @@ -2511,7 +2517,11 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro(connectionPtr_t connectio LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts); connection->mOutstandingRequests--; - connection->setVoiceConnectionState(VOICE_STATE_SESSION_EXIT); + + if (connection->getVoiceConnectionState() == VOICE_STATE_WAIT_FOR_EXIT) + { + connection->setVoiceConnectionState(VOICE_STATE_SESSION_EXIT); + } } // Tell the simulator to tell the Secondlife WebRTC server that we want a voice @@ -2773,9 +2783,18 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() break; case VOICE_STATE_DISCONNECT: - setVoiceConnectionState(VOICE_STATE_WAIT_FOR_EXIT); - LLCoros::instance().launch("LLVoiceWebRTCConnection::breakVoiceConnectionCoro", - boost::bind(&LLVoiceWebRTCConnection::breakVoiceConnectionCoro, this->shared_from_this())); + if (!LLWebRTCVoiceClient::isShuttingDown()) + { + setVoiceConnectionState(VOICE_STATE_WAIT_FOR_EXIT); + LLCoros::instance().launch("LLVoiceWebRTCConnection::breakVoiceConnectionCoro", + boost::bind(&LLVoiceWebRTCConnection::breakVoiceConnectionCoro, this->shared_from_this())); + } + else + { + // llwebrtc::terminate() is already shuting down the connection. + setVoiceConnectionState(VOICE_STATE_WAIT_FOR_CLOSE); + mOutstandingRequests++; + } break; case VOICE_STATE_WAIT_FOR_EXIT: @@ -2785,7 +2804,11 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() { setVoiceConnectionState(VOICE_STATE_WAIT_FOR_CLOSE); mOutstandingRequests++; - mWebRTCPeerConnectionInterface->shutdownConnection(); + if (!LLWebRTCVoiceClient::isShuttingDown()) + { + mWebRTCPeerConnectionInterface->shutdownConnection(); + } + // else was already posted by llwebrtc::terminate(). break; case VOICE_STATE_WAIT_FOR_CLOSE: break; -- cgit v1.2.3 From 8897ebeb6a0f1d96c7150385a01cb03cd0c43f50 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 14 Aug 2024 14:38:37 -0700 Subject: Voice dot not always visible after crossing region boundaries. For issue #2064 The connection to the voice server was not upgraded/downgraded to primary/secondary when crossing region boundaries, so the server sent the wrong value and the viewer chose not to display a voice dot. --- indra/newview/llvoicewebrtc.cpp | 26 +++++++++++++++++++++++++- indra/newview/llvoicewebrtc.h | 3 ++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 06baea4ba2..84d1e767f8 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -2150,8 +2150,21 @@ LLVoiceWebRTCConnection::LLVoiceWebRTCConnection(const LLUUID ®ionID, const s mOutstandingRequests(0), mChannelID(channelID), mRegionID(regionID), + mPrimary(false), mRetryWaitPeriod(0) { + if (isSpatial()) + { + if (gAgent.getRegion()) + { + mPrimary = (regionID == gAgent.getRegion()->getRegionID()); + } + } + else + { + mPrimary = true; + } + // retries wait a short period...randomize it so // all clients don't try to reconnect at once. mRetryWaitSecs = ((F32) rand() / (RAND_MAX)) + 0.5; @@ -2755,6 +2768,17 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() { mRetryWaitPeriod = 0; mRetryWaitSecs = ((F32) rand() / (RAND_MAX)) + 0.5; + LLUUID agentRegionID; + if (isSpatial() && gAgent.getRegion()) + { + + bool primary = (mRegionID == gAgent.getRegion()->getRegionID()); + if (primary != mPrimary) + { + mPrimary = primary; + sendJoin(); + } + } // we'll stay here as long as the session remains up. if (mShutDown) @@ -3023,7 +3047,7 @@ void LLVoiceWebRTCConnection::sendJoin() Json::Value root = Json::objectValue; Json::Value join_obj = Json::objectValue; LLUUID regionID = gAgent.getRegion()->getRegionID(); - if ((regionID == mRegionID) || !isSpatial()) + if (mPrimary) { join_obj["p"] = true; } diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index 48c50a1ea3..324b4c5b9c 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -622,7 +622,7 @@ class LLVoiceWebRTCConnection : bool connectionStateMachine(); - virtual bool isSpatial() = 0; + virtual bool isSpatial() { return false; } LLUUID getRegionID() { return mRegionID; } @@ -686,6 +686,7 @@ class LLVoiceWebRTCConnection : LLVoiceClientStatusObserver::EStatusType mCurrentStatus; LLUUID mRegionID; + bool mPrimary; LLUUID mViewerSession; std::string mChannelID; -- cgit v1.2.3 From 661b6d12a0b4c249ca698f03e17a6ceeabde09c4 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Wed, 14 Aug 2024 15:22:15 -0700 Subject: Don't call virtual functions in a derived class constructor --- indra/newview/llvoicewebrtc.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 84d1e767f8..919b541efe 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -2150,20 +2150,9 @@ LLVoiceWebRTCConnection::LLVoiceWebRTCConnection(const LLUUID ®ionID, const s mOutstandingRequests(0), mChannelID(channelID), mRegionID(regionID), - mPrimary(false), + mPrimary(true), mRetryWaitPeriod(0) { - if (isSpatial()) - { - if (gAgent.getRegion()) - { - mPrimary = (regionID == gAgent.getRegion()->getRegionID()); - } - } - else - { - mPrimary = true; - } // retries wait a short period...randomize it so // all clients don't try to reconnect at once. @@ -3065,6 +3054,10 @@ LLVoiceWebRTCSpatialConnection::LLVoiceWebRTCSpatialConnection(const LLUUID ® LLVoiceWebRTCConnection(regionID, channelID), mParcelLocalID(parcelLocalID) { + if (gAgent.getRegion()) + { + mPrimary = (regionID == gAgent.getRegion()->getRegionID()); + } } LLVoiceWebRTCSpatialConnection::~LLVoiceWebRTCSpatialConnection() -- cgit v1.2.3 From 3ca4bb6bf7ba1367e06705da3968174ff9448d7d Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 15 Aug 2024 15:56:53 +0200 Subject: #2307 BugSplat Crash #1504734: LLViewerTexture::getNumFaces() --- indra/newview/llviewertexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9aee1c0caf..03dca1e5f3 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -834,7 +834,7 @@ S32 LLViewerTexture::getTotalNumFaces() const S32 LLViewerTexture::getNumFaces(U32 ch) const { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); - return mNumFaces[ch]; + return ch < LLRender::NUM_TEXTURE_CHANNELS ? mNumFaces[ch] : 0; } -- cgit v1.2.3 From 10ef293bc93230437d8aa3b17fcc1bfdc78f6ba8 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 15 Aug 2024 17:46:58 +0200 Subject: BugSplat Crash #1504587: std::vector::empty() --- indra/llcommon/lltracethreadrecorder.cpp | 45 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp index be3e585ef8..375cb050cc 100644 --- a/indra/llcommon/lltracethreadrecorder.cpp +++ b/indra/llcommon/lltracethreadrecorder.cpp @@ -159,7 +159,8 @@ AccumulatorBufferGroup* ThreadRecorder::activate( AccumulatorBufferGroup* record ThreadRecorder::active_recording_list_t::iterator ThreadRecorder::bringUpToDate( AccumulatorBufferGroup* recording ) { #if LL_TRACE_ENABLED - if (mActiveRecordings.empty()) return mActiveRecordings.end(); + if (mActiveRecordings.empty()) + return mActiveRecordings.end(); mActiveRecordings.back()->mPartialRecording.sync(); BlockTimer::updateTimes(); @@ -202,7 +203,7 @@ ThreadRecorder::active_recording_list_t::iterator ThreadRecorder::bringUpToDate( #endif } -void ThreadRecorder::deactivate( AccumulatorBufferGroup* recording ) +void ThreadRecorder::deactivate(AccumulatorBufferGroup* recording) { #if LL_TRACE_ENABLED active_recording_list_t::iterator recording_it = bringUpToDate(recording); @@ -228,9 +229,10 @@ void ThreadRecorder::deactivate( AccumulatorBufferGroup* recording ) #endif } -ThreadRecorder::ActiveRecording::ActiveRecording( AccumulatorBufferGroup* target ) +ThreadRecorder::ActiveRecording::ActiveRecording(AccumulatorBufferGroup* target) : mTargetRecording(target) -{} +{ +} void ThreadRecorder::ActiveRecording::movePartialToTarget() { @@ -243,30 +245,30 @@ void ThreadRecorder::ActiveRecording::movePartialToTarget() // called by child thread -void ThreadRecorder::addChildRecorder( class ThreadRecorder* child ) +void ThreadRecorder::addChildRecorder(ThreadRecorder* child) { #if LL_TRACE_ENABLED - { LLMutexLock lock(&mChildListMutex); - mChildThreadRecorders.push_back(child); - } + LLMutexLock lock(&mChildListMutex); + mChildThreadRecorders.push_back(child); #endif } // called by child thread -void ThreadRecorder::removeChildRecorder( class ThreadRecorder* child ) +void ThreadRecorder::removeChildRecorder(ThreadRecorder* child) { #if LL_TRACE_ENABLED - { LLMutexLock lock(&mChildListMutex); - mChildThreadRecorders.remove(child); - } + LLMutexLock lock(&mChildListMutex); + mChildThreadRecorders.remove(child); #endif } void ThreadRecorder::pushToParent() { #if LL_TRACE_ENABLED - { LLMutexLock lock(&mSharedRecordingMutex); - LLTrace::get_thread_recorder()->bringUpToDate(&mThreadRecordingBuffers); + if (ThreadRecorder* recorder = LLTrace::get_thread_recorder()) + { + LLMutexLock lock(&mSharedRecordingMutex); + recorder->bringUpToDate(&mThreadRecordingBuffers); mSharedRecordingBuffers.append(mThreadRecordingBuffers); mThreadRecordingBuffers.reset(); } @@ -278,15 +280,14 @@ void ThreadRecorder::pullFromChildren() { #if LL_TRACE_ENABLED LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS; - if (mActiveRecordings.empty()) return; - - { LLMutexLock lock(&mChildListMutex); - + if (!mActiveRecordings.empty()) + { + LLMutexLock lock(&mChildListMutex); AccumulatorBufferGroup& target_recording_buffers = mActiveRecordings.back()->mPartialRecording; target_recording_buffers.sync(); for (LLTrace::ThreadRecorder* rec : mChildThreadRecorders) - { LLMutexLock lock(&(rec->mSharedRecordingMutex)); - + { + LLMutexLock lock(&(rec->mSharedRecordingMutex)); target_recording_buffers.merge(rec->mSharedRecordingBuffers); rec->mSharedRecordingBuffers.reset(); } @@ -294,13 +295,11 @@ void ThreadRecorder::pullFromChildren() #endif } - -void set_master_thread_recorder( ThreadRecorder* recorder ) +void set_master_thread_recorder(ThreadRecorder* recorder) { sMasterThreadRecorder = recorder; } - ThreadRecorder* get_master_thread_recorder() { return sMasterThreadRecorder; -- cgit v1.2.3 From 1ff30757bc3ccc4b2ac26f04bdc2ca99f25d694d Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Fri, 16 Aug 2024 13:16:39 -0700 Subject: Log WebRTC devices on webrtc initialization. --- indra/newview/llvoicewebrtc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 093b16eaad..387016f9af 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -269,6 +269,7 @@ void LLWebRTCVoiceClient::init(LLPumpIO* pump) mWebRTCDeviceInterface = llwebrtc::getDeviceInterface(); mWebRTCDeviceInterface->setDevicesObserver(this); mMainQueue = LL::WorkQueue::getInstance("mainloop"); + refreshDeviceLists(); } void LLWebRTCVoiceClient::terminate() @@ -637,7 +638,7 @@ void LLWebRTCVoiceClient::clearCaptureDevices() void LLWebRTCVoiceClient::addCaptureDevice(const LLVoiceDevice& device) { - LL_DEBUGS("Voice") << "display: '" << device.display_name << "' device: '" << device.full_name << "'" << LL_ENDL; + LL_INFOS("Voice") << "Voice Capture Device: '" << device.display_name << "' (" << device.full_name << ")" << LL_ENDL; mCaptureDevices.push_back(device); } @@ -706,7 +707,7 @@ void LLWebRTCVoiceClient::clearRenderDevices() void LLWebRTCVoiceClient::addRenderDevice(const LLVoiceDevice& device) { - LL_DEBUGS("Voice") << "display: '" << device.display_name << "' device: '" << device.full_name << "'" << LL_ENDL; + LL_INFOS("Voice") << "Voice Render Device: '" << device.display_name << "' (" << device.full_name << ")" << LL_ENDL; mRenderDevices.push_back(device); } -- cgit v1.2.3 From 7cc3ff55b97b94a3b52daebfe072eb22192c710b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 16 Aug 2024 19:27:48 +0300 Subject: viewer#2296 Don't show 'are you sure you want to leave the call' when shutting down --- indra/llui/llfloater.cpp | 8 ++++++++ indra/llui/llfloater.h | 1 + indra/newview/llfloaterimcontainer.cpp | 6 +++--- indra/newview/llfloaterimcontainer.h | 2 +- indra/newview/llfloaterimsession.cpp | 8 +++++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index e6ecf3c283..f29f9286c9 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1926,6 +1926,14 @@ void LLFloater::onClickClose( LLFloater* self ) self->onClickCloseBtn(); } +// static +void LLFloater::onClickClose(LLFloater* self, bool app_quitting) +{ + if (!self) + return; + self->onClickCloseBtn(app_quitting); +} + void LLFloater::onClickCloseBtn(bool app_quitting) { closeFloater(false); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 3d75c42f60..9be2240f6f 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -363,6 +363,7 @@ public: // } static void onClickClose(LLFloater* floater); + static void onClickClose(LLFloater* floater, bool app_quitting); static void onClickMinimize(LLFloater* floater); static void onClickTearOff(LLFloater* floater); static void onClickDock(LLFloater* floater); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 08e13276b3..cf66507a66 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -2432,7 +2432,7 @@ void LLFloaterIMContainer::closeHostedFloater() onClickCloseBtn(); } -void LLFloaterIMContainer::closeAllConversations() +void LLFloaterIMContainer::closeAllConversations(bool app_quitting) { std::vector ids; for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++) @@ -2447,7 +2447,7 @@ void LLFloaterIMContainer::closeAllConversations() for (std::vector::const_iterator it = ids.begin(); it != ids.end(); ++it) { LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it); - LLFloater::onClickClose(conversationFloater); + LLFloater::onClickClose(conversationFloater, app_quitting); } } @@ -2470,7 +2470,7 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { if(app_quitting) { - closeAllConversations(); + closeAllConversations(app_quitting); onClickCloseBtn(app_quitting); } else diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index e11445d779..d1cfd3442c 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -117,7 +117,7 @@ public: void assignResizeLimits(); virtual bool handleKeyHere(KEY key, MASK mask ); /*virtual*/ void closeFloater(bool app_quitting = false); - void closeAllConversations(); + void closeAllConversations(bool app_quitting); void closeSelectedConversations(const uuid_vec_t& ids); /*virtual*/ bool isFrontmost(); diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index a2a3dac442..557b3f27c5 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -138,8 +138,14 @@ void LLFloaterIMSession::onTearOffClicked() } // virtual -void LLFloaterIMSession::onClickCloseBtn(bool) +void LLFloaterIMSession::onClickCloseBtn(bool app_qutting) { + if (app_qutting) + { + LLFloaterIMSessionTab::onClickCloseBtn(); + return; + } + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(mSessionID); if (session != NULL) -- cgit v1.2.3