SL-18219 Crash getting and sending render info on exit

There might be other causes for sendRenderInfoToRegion and getRenderInfoFromRegion, crashing, but in some cases viewer was shutting down
meow-7.2.2
Andrey Kleshchev 2022-11-22 23:08:47 +02:00
parent e231b6d8d3
commit 87664fa35d
4 changed files with 5 additions and 5 deletions

View File

@ -1730,7 +1730,8 @@ bool LLAppViewer::cleanup()
{
if (!isSecondInstance())
{
LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv"));
std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv");
LLSceneMonitor::instance().dumpToFile(dump_path);
}
LLSceneMonitor::deleteSingleton();
}

View File

@ -364,11 +364,10 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi
}
}
// static
// Called every frame - send render weight requests to every region
void LLAvatarRenderInfoAccountant::idle()
{
if (mRenderInfoScanTimer.hasExpired())
if (mRenderInfoScanTimer.hasExpired() && !LLApp::isExiting())
{
LL_DEBUGS("AvatarRenderInfo") << "Scanning regions for render info updates"
<< LL_ENDL;

View File

@ -515,7 +515,7 @@ void LLSceneMonitor::fetchQueryResult()
}
//dump results to a file _scene_xmonitor_results.csv
void LLSceneMonitor::dumpToFile(std::string file_name)
void LLSceneMonitor::dumpToFile(const std::string &file_name)
{
if (!hasResults()) return;

View File

@ -61,7 +61,7 @@ public:
bool needsUpdate() const;
const LLTrace::ExtendablePeriodicRecording* getRecording() const {return &mSceneLoadRecording;}
void dumpToFile(std::string file_name);
void dumpToFile(const std::string &file_name);
bool hasResults() const { return mSceneLoadRecording.getResults().getDuration() != S32Seconds(0);}
void reset();