SL-19204 Crash at removeObserver

A lot of reports about crashes in voice's removeObserver with no indication of the cause, all MAC specific. By this point terminate should have been called and mVoiceModule should be null, yet callstaks suggest it isn't.

Commit clears LLVoiceClient beforehand to avoid the issue entirely, but issue lies elsewhere and 'voice' crash is just a symptom.
meow-7.2.2
Andrey Kleshchev 2023-02-17 00:49:32 +02:00
parent d998bcbfb5
commit 8032b2d72e
3 changed files with 6 additions and 1 deletions

View File

@ -2164,6 +2164,7 @@ bool LLAppViewer::cleanup()
LLSelectMgr::deleteSingleton();
LLViewerEventRecorder::deleteSingleton();
LLWorld::deleteSingleton();
LLVoiceClient::deleteSingleton();
// It's not at first obvious where, in this long sequence, a generic cleanup
// call OUGHT to go. So let's say this: as we migrate cleanup from

View File

@ -346,7 +346,10 @@ public:
{
// will be deleted by ~LLInventoryModel
//delete mInvObserver;
LLVoiceClient::getInstance()->removeObserver(this);
if (LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->removeObserver(this);
}
LLAvatarTracker::instance().removeObserver(this);
}

View File

@ -142,6 +142,7 @@ LLVoiceClient::LLVoiceClient(LLPumpIO *pump)
LLVoiceClient::~LLVoiceClient()
{
llassert(!mVoiceModule);
}
void LLVoiceClient::init(LLPumpIO *pump)