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
179#include "avatar/AvatarPackager.h"179#include "avatar/AvatarPackager.h"
180#include "avatar/MyCharacterController.h"180#include "avatar/MyCharacterController.h"
181#include "CrashRecoveryHandler.h"181#include "CrashRecoveryHandler.h"
182#include "CrashHandler.h"182#include "crash-handler/CrashHandler.h"
183#include "DiscoverabilityManager.h"183#include "DiscoverabilityManager.h"
184#include "GLCanvas.h"184#include "GLCanvas.h"
185#include "InterfaceDynamicFactory.h"185#include "InterfaceDynamicFactory.h"
@@ -407,8 +407,10 @@ public: · 221 unmodified lines
407 }407 }
408 408
409 void deadlockDetectionCrash() {409 void deadlockDetectionCrash() {
410 setCrashAnnotation("_mod_faulting_tid", std::to_string((uint64_t)_mainThreadID));410 auto &ch = CrashHandler::getInstance();
411 setCrashAnnotation("deadlock", "1");411
412 ch.setAnnotation("_mod_faulting_tid", std::to_string((uint64_t)_mainThreadID));
413 ch.setAnnotation("deadlock", "1");
412 uint32_t* crashTrigger = nullptr;414 uint32_t* crashTrigger = nullptr;
413 *crashTrigger = 0xDEAD10CC;415 *crashTrigger = 0xDEAD10CC;
414 }416 }
@@ -1054,9 +1056,11 @@ Application::Application( · 639 unmodified lines
1054 {1056 {
1055 // identify gpu as early as possible to help identify OpenGL initialization errors.1057 // identify gpu as early as possible to help identify OpenGL initialization errors.
1056 auto gpuIdent = GPUIdent::getInstance();1058 auto gpuIdent = GPUIdent::getInstance();
1057 setCrashAnnotation("sentry[contexts][gpu][name]", gpuIdent->getName().toStdString());1059 auto &ch = CrashHandler::getInstance();
1058 setCrashAnnotation("sentry[contexts][gpu][version]", gpuIdent->getDriver().toStdString());1060
1059 setCrashAnnotation("gpu_memory", std::to_string(gpuIdent->getMemory()));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()));
1060 }1064 }
1061 1065
1062 // make sure the debug draw singleton is initialized on the main thread.1066 // make sure the debug draw singleton is initialized on the main thread.
@@ -1166,13 +1170,15 @@ Application::Application( · 103 unmodified lines
1166 _logger->setSessionID(accountManager->getSessionID());1170 _logger->setSessionID(accountManager->getSessionID());
1167#endif1171#endif
1168 1172
1169 setCrashAnnotation("metaverse_session_id", accountManager->getSessionID().toString().toStdString());1173 auto &ch = CrashHandler::getInstance();
1170 setCrashAnnotation("main_thread_id", std::to_string((size_t)QThread::currentThreadId()));1174
1175 ch.setAnnotation("metaverse_session_id", accountManager->getSessionID().toString().toStdString());
1176 ch.setAnnotation("main_thread_id", std::to_string((size_t)QThread::currentThreadId()));
1171 1177
1172 if (steamClient) {1178 if (steamClient) {
1173 qCDebug(interfaceapp) << "[VERSION] SteamVR buildID:" << steamClient->getSteamVRBuildID();1179 qCDebug(interfaceapp) << "[VERSION] SteamVR buildID:" << steamClient->getSteamVRBuildID();
1174 }1180 }
1175 setCrashAnnotation("steam", property(hifi::properties::STEAM).toBool() ? "1" : "0");1181 ch.setAnnotation("steam", property(hifi::properties::STEAM).toBool() ? "1" : "0");
1176 1182
1177 qCDebug(interfaceapp) << "[VERSION] Build sequence:" << qPrintable(applicationVersion());1183 qCDebug(interfaceapp) << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
1178 qCDebug(interfaceapp) << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;1184 qCDebug(interfaceapp) << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
@@ -1236,7 +1242,8 @@ Application::Application( · 57 unmodified lines
1236 connect(&domainHandler, SIGNAL(domainURLChanged(QUrl)), SLOT(domainURLChanged(QUrl)));1242 connect(&domainHandler, SIGNAL(domainURLChanged(QUrl)), SLOT(domainURLChanged(QUrl)));
1237 connect(&domainHandler, SIGNAL(redirectToErrorDomainURL(QUrl)), SLOT(goToErrorDomainURL(QUrl)));1243 connect(&domainHandler, SIGNAL(redirectToErrorDomainURL(QUrl)), SLOT(goToErrorDomainURL(QUrl)));
1238 connect(&domainHandler, &DomainHandler::domainURLChanged, [](QUrl domainURL){1244 connect(&domainHandler, &DomainHandler::domainURLChanged, [](QUrl domainURL){
1239 setCrashAnnotation("domain", domainURL.toString().toStdString());1245 auto &ch = CrashHandler::getInstance();
1246 ch.setAnnotation("domain", domainURL.toString().toStdString());
1240 });1247 });
1241 connect(&domainHandler, SIGNAL(resetting()), SLOT(resettingDomain()));1248 connect(&domainHandler, SIGNAL(resetting()), SLOT(resettingDomain()));
1242 connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle()));1249 connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle()));
@@ -1348,8 +1355,9 @@ Application::Application( · 105 unmodified lines
1348 setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM));1355 setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM));
1349 }1356 }
1350 1357
1351 setCrashAnnotation("display_plugin", displayPlugin->getName().toStdString());1358 auto &ch = CrashHandler::getInstance();
1352 setCrashAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");1359 ch.setAnnotation("display_plugin", displayPlugin->getName().toStdString());
1360 ch.setAnnotation("hmd", displayPlugin->isHmd() ? "1" : "0");
1353 });1361 });
1354 }1362 }
1355 connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateSystemTabletMode);1363 connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateSystemTabletMode);
@@ -1388,7 +1396,8 @@ Application::Application( · 32 unmodified lines
1388 1396
1389 connect(myAvatar.get(), &MyAvatar::skeletonModelURLChanged, [](){1397 connect(myAvatar.get(), &MyAvatar::skeletonModelURLChanged, [](){
1390 QUrl avatarURL = qApp->getMyAvatar()->getSkeletonModelURL();1398 QUrl avatarURL = qApp->getMyAvatar()->getSkeletonModelURL();
1391 setCrashAnnotation("avatar", avatarURL.toString().toStdString());1399 auto &ch = CrashHandler::getInstance();
1400 ch.setAnnotation("avatar", avatarURL.toString().toStdString());
1392 });1401 });
1393 1402
1394 // Inititalize sample before registering1403 // Inititalize sample before registering
@@ -2698,7 +2707,8 @@ void Application::updateHeartbeat() const { · 1303 unmodified lines
2698}2707}
2699 2708
2700void Application::onAboutToQuit() {2709void Application::onAboutToQuit() {
2701 setCrashAnnotation("shutdown", "1");2710 auto &ch = CrashHandler::getInstance();
2711 ch.setAnnotation("shutdown", "1");
2702 2712
2703 // quickly save AvatarEntityData before the EntityTree is dismantled2713 // quickly save AvatarEntityData before the EntityTree is dismantled
2704 getMyAvatar()->saveAvatarEntityDataToSettings();2714 getMyAvatar()->saveAvatarEntityDataToSettings();
@@ -7147,7 +7157,8 @@ void Application::updateWindowTitle() const { · 4442 unmodified lines
7147 QString metaverseUsername = accountManager->getAccountInfo().getUsername();7157 QString metaverseUsername = accountManager->getAccountInfo().getUsername();
7148 QString domainUsername = domainAccountManager->getUsername();7158 QString domainUsername = domainAccountManager->getUsername();
7149 7159
7150 setCrashAnnotation("sentry[user][username]", metaverseUsername.toStdString());7160 auto &ch = CrashHandler::getInstance();
7161 ch.setAnnotation("sentry[user][username]", metaverseUsername.toStdString());
7151 7162
7152 QString currentPlaceName;7163 QString currentPlaceName;
7153 if (isServerlessMode()) {7164 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