summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMike <contact@mikelittman.me>2026-10-22 12:20:17 -0400
committerGitHub <noreply@github.com>2026-10-23 00:20:17 +0800
commit5b52af0bf830de6732bc587f5932c0209f6c337a (patch)
treeb9708b676d7d790951391abc24d289955834cc2e /indra/newview
parent32721d1421819fcd8ca0776421e147d59dad60ab (diff)
Fix remaining Apple audio, depth, and speaking-indicator crashes (#39)
Stop the OpenAL wind path from spinning when unqueue fails. Allocate Apple depth buffers with the unsized format and skip deferred lighting when that allocation left the target empty. Remove every registration of a speaking indicator, including a null one.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp25
-rw-r--r--indra/newview/pipeline.cpp7
2 files changed, 27 insertions, 5 deletions
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index aa3eaba21d..70d8d64ae0 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -147,6 +147,10 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i
LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << "|"<< speaking_indicator << ", session: " << session_id << LL_ENDL;
+ if (!speaking_indicator)
+ {
+ return;
+ }
ensureInstanceDoesNotExist(speaking_indicator);
@@ -167,15 +171,20 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i
void SpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator)
{
LL_DEBUGS("SpeakingIndicator") << "Unregistering indicator: " << speaker_id << "|"<< speaking_indicator << LL_ENDL;
- speaking_indicators_mmap_t::iterator it;
- it = mSpeakingIndicators.find(speaker_id);
- for (;it != mSpeakingIndicators.end(); ++it)
+ // The same control can be registered under more than one speaker id.
+ // Removing only the current id leaves a dangling pointer that crashes
+ // the next time that speaker's indicators are switched. See EXT-4782.
+ speaking_indicators_mmap_t::iterator it = mSpeakingIndicators.begin();
+ while (it != mSpeakingIndicators.end())
{
if (it->second == speaking_indicator)
{
LL_DEBUGS("SpeakingIndicator") << "Unregistered." << LL_ENDL;
- mSpeakingIndicators.erase(it);
- break;
+ it = mSpeakingIndicators.erase(it);
+ }
+ else
+ {
+ ++it;
}
}
}
@@ -253,6 +262,10 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea
{
was_found = true;
LLSpeakingIndicator* indicator = (*it_indicator).second;
+ if (!indicator)
+ {
+ continue;
+ }
was_switched_on = was_switched_on || switch_on;
if (indicator) indicator->switchIndicator(switch_on);
@@ -279,6 +292,8 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea
void SpeakingIndicatorManager::ensureInstanceDoesNotExist(LLSpeakingIndicator* const speaking_indicator)
{
LL_DEBUGS("SpeakingIndicator") << "Searching for an registered indicator instance: " << speaking_indicator << LL_ENDL;
+ // The same LLOutputMonitorCtrl can be registered under several speaker ids.
+ // Every copy has to be removed before it is registered again. See EXT-4782.
speaking_indicators_mmap_t::iterator it = mSpeakingIndicators.begin();
while (it != mSpeakingIndicators.end())
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bccff55a2c..2b45892ff4 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8906,6 +8906,13 @@ void LLPipeline::renderDeferredLighting()
LLRenderTarget *screen_target = &mRT->screen;
LLRenderTarget* deferred_light_target = &mRT->deferredLight;
+ // A failed depth allocation leaves these targets with no textures.
+ // Binding them logs the empty-target warnings and then faults in the GL driver.
+ if (screen_target->getNumTextures() == 0)
+ {
+ return;
+ }
+
{
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("deferred");
LLViewerCamera *camera = LLViewerCamera::getInstance();