History

Crash reporter moved to separate library

UAL moved back to networking

Dale Glass committed 3 years ago

Commit 4dcc2881 parent 6ec276c16 files · +337 −306Browse files

Showing the changes to interface/src/Application.cpp (1 of 16 files). Show all

Unified · Split

interface/src/Application.cpp+26−15
@@ -179,7 +179,7 @@ · 178 unmodified lines
179179 #include "avatar/AvatarPackager.h"
180180 #include "avatar/MyCharacterController.h"
181181 #include "CrashRecoveryHandler.h"
182−#include "CrashHandler.h"
182+#include "crash-handler/CrashHandler.h"
183183 #include "DiscoverabilityManager.h"
184184 #include "GLCanvas.h"
185185 #include "InterfaceDynamicFactory.h"
@@ -407,8 +407,10 @@ public: · 221 unmodified lines
407407 }
408408
409409 void deadlockDetectionCrash() {
410− setCrashAnnotation("_mod_faulting_tid", std::to_string((uint64_t)_mainThreadID));
411− setCrashAnnotation("deadlock", "1");
410+ auto &ch = CrashHandler::getInstance();
411+
412+ ch.setAnnotation("_mod_faulting_tid", std::to_string((uint64_t)_mainThreadID));
413+ ch.setAnnotation("deadlock", "1");
412414 uint32_t* crashTrigger = nullptr;
413415 *crashTrigger = 0xDEAD10CC;
414416 }
@@ -1054,9 +1056,11 @@ Application::Application( · 639 unmodified lines
10541056 {
10551057 // identify gpu as early as possible to help identify OpenGL initialization errors.
10561058 auto gpuIdent = GPUIdent::getInstance();
1057− setCrashAnnotation("sentry[contexts][gpu][name]", gpuIdent->getName().toStdString());
1058− setCrashAnnotation("sentry[contexts][gpu][version]", gpuIdent->getDriver().toStdString());
1059− setCrashAnnotation("gpu_memory", std::to_string(gpuIdent->getMemory()));
1059+ auto &ch = CrashHandler::getInstance();
1060+
1061+ ch.setAnnotation("sentry[contexts][gpu][name]", gpuIdent->getName().toStdString());
1062+ ch.setAnnotation("sentry[contexts][gpu][version]", gpuIdent->getDriver().toStdString());
1063+ ch.setAnnotation("gpu_memory", std::to_string(gpuIdent->getMemory()));
10601064 }
10611065
10621066 // make sure the debug draw singleton is initialized on the main thread.
@@ -1166,13 +1170,15 @@ Application::Application( · 103 unmodified lines
11661170 _logger->setSessionID(accountManager->getSessionID());
11671171 #endif
11681172
1169− setCrashAnnotation("metaverse_session_id", accountManager->getSessionID().toString().toStdString());
1170− setCrashAnnotation("main_thread_id", std::to_string((size_t)QThread::currentThreadId()));
1173+ auto &ch = CrashHandler::getInstance();
1174+
1175+ ch.setAnnotation("metaverse_session_id", accountManager->getSessionID().toString().toStdString());
1176+ ch.setAnnotation("main_thread_id", std::to_string((size_t)QThread::currentThreadId()));
11711177
11721178 if (steamClient) {
11731179 qCDebug(interfaceapp) << "[VERSION] SteamVR buildID:" << steamClient->getSteamVRBuildID();
11741180 }
1175− setCrashAnnotation("steam", property(hifi::properties::STEAM).toBool() ? "1" : "0");
1181+ ch.setAnnotation("steam", property(hifi::properties::STEAM).toBool() ? "1" : "0");
11761182
11771183 qCDebug(interfaceapp) << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
11781184 qCDebug(interfaceapp) << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
@@ -1236,7 +1242,8 @@ Application::Application( · 57 unmodified lines
12361242 connect(&domainHandler, SIGNAL(domainURLChanged(QUrl)), SLOT(domainURLChanged(QUrl)));
12371243 connect(&domainHandler, SIGNAL(redirectToErrorDomainURL(QUrl)), SLOT(goToErrorDomainURL(QUrl)));
12381244 connect(&domainHandler, &DomainHandler::domainURLChanged, [](QUrl domainURL){
1239− setCrashAnnotation("domain", domainURL.toString().toStdString());
1245+ auto &ch = CrashHandler::getInstance();
1246+ ch.setAnnotation("domain", domainURL.toString().toStdString());
12401247 });
12411248 connect(&domainHandler, SIGNAL(resetting()), SLOT(resettingDomain()));
12421249 connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle()));
@@ -1348,8 +1355,9 @@ Application::Application( · 105 unmodified lines
13481355 setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM));
13491356 }
13501357
1351− setCrashAnnotation("display_plugin", displayPlugin->getName().toStdString());
1352− setCrashAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");
1358+ auto &ch = CrashHandler::getInstance();
1359+ ch.setAnnotation("display_plugin", displayPlugin->getName().toStdString());
1360+ ch.setAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");
13531361 });
13541362 }
13551363 connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateSystemTabletMode);
@@ -1388,7 +1396,8 @@ Application::Application( · 32 unmodified lines
13881396
13891397 connect(myAvatar.get(), &MyAvatar::skeletonModelURLChanged, [](){
13901398 QUrl avatarURL = qApp->getMyAvatar()->getSkeletonModelURL();
1391− setCrashAnnotation("avatar", avatarURL.toString().toStdString());
1399+ auto &ch = CrashHandler::getInstance();
1400+ ch.setAnnotation("avatar", avatarURL.toString().toStdString());
13921401 });
13931402
13941403 // Inititalize sample before registering
@@ -2698,7 +2707,8 @@ void Application::updateHeartbeat() const { · 1303 unmodified lines
26982707 }
26992708
27002709 void Application::onAboutToQuit() {
2701− setCrashAnnotation("shutdown", "1");
2710+ auto &ch = CrashHandler::getInstance();
2711+ ch.setAnnotation("shutdown", "1");
27022712
27032713 // quickly save AvatarEntityData before the EntityTree is dismantled
27042714 getMyAvatar()->saveAvatarEntityDataToSettings();
@@ -7147,7 +7157,8 @@ void Application::updateWindowTitle() const { · 4442 unmodified lines
71477157 QString metaverseUsername = accountManager->getAccountInfo().getUsername();
71487158 QString domainUsername = domainAccountManager->getUsername();
71497159
7150− setCrashAnnotation("sentry[user][username]", metaverseUsername.toStdString());
7160+ auto &ch = CrashHandler::getInstance();
7161+ ch.setAnnotation("sentry[user][username]", metaverseUsername.toStdString());
71517162
71527163 QString currentPlaceName;
71537164 if (isServerlessMode()) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t