From 4a6975a94404f995b7bf2ce1a6cab5ab6e276d95 Mon Sep 17 00:00:00 2001 From: minerjr Date: Fri, 17 Oct 2025 22:01:17 -0300 Subject: [PATCH] FIRE-36022 - Removing my USB headset crashes entire viewer Commented out a block of new code recently added which was also being called by one of the callback functions. This had the side effect of having 2 LLWebRTCDevicesObserver listening to the hardware removal events and cause both to trigger events at the same time, which may be the source of the queue being locked up in a race condition. Was able to reproduce issue 2x without code change by moving mouse around a lot while on rezing and then pulling USB headset out of the USB port. Direct motherboard USB port seemed to work the best as could not trigger while headset was in USB hub. --- indra/llwebrtc/llwebrtc.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index d5182b16e7..68aa4f4971 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -339,7 +339,12 @@ void LLWebRTCImpl::init() nullptr /* video_decoder_factory */, nullptr /* audio_mixer */, mAudioProcessingModule); - mWorkerThread->PostTask( + // [FIRE-36022] - Removing my USB headset crashes entire viewer + // It seems that this code is also called by one of the other callback functions + // and ends up creating a 2nd observer,which when there was a hardware change, + // would cause multiple messages to be dumped to the queue at the same time and + // cause a possible race condition/spin lock issue. + /* mWorkerThread->PostTask( [this]() { if (mDeviceModule) @@ -348,7 +353,8 @@ void LLWebRTCImpl::init() updateDevices(); } }); - + */ + // [FIRE-36022] } void LLWebRTCImpl::terminate()