UAL moved back to networking
Showing the changes to interface/src/Application.cpp (1 of 16 files). Show all
Unified · Split
| @@ -179,7 +179,7 @@ · 178 unmodified lines | ||
| 179 | 179 | #include "avatar/AvatarPackager.h" |
| 180 | 180 | #include "avatar/MyCharacterController.h" |
| 181 | 181 | #include "CrashRecoveryHandler.h" |
| 182 | −#include "CrashHandler.h" | |
| 182 | +#include "crash-handler/CrashHandler.h" | |
| 183 | 183 | #include "DiscoverabilityManager.h" |
| 184 | 184 | #include "GLCanvas.h" |
| 185 | 185 | #include "InterfaceDynamicFactory.h" |
| @@ -407,8 +407,10 @@ public: · 221 unmodified lines | ||
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | 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"); | |
| 412 | 414 | uint32_t* crashTrigger = nullptr; |
| 413 | 415 | *crashTrigger = 0xDEAD10CC; |
| 414 | 416 | } |
| @@ -1054,9 +1056,11 @@ Application::Application( · 639 unmodified lines | ||
| 1054 | 1056 | { |
| 1055 | 1057 | // identify gpu as early as possible to help identify OpenGL initialization errors. |
| 1056 | 1058 | 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())); | |
| 1060 | 1064 | } |
| 1061 | 1065 | |
| 1062 | 1066 | // make sure the debug draw singleton is initialized on the main thread. |
| @@ -1166,13 +1170,15 @@ Application::Application( · 103 unmodified lines | ||
| 1166 | 1170 | _logger->setSessionID(accountManager->getSessionID()); |
| 1167 | 1171 | #endif |
| 1168 | 1172 | |
| 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())); | |
| 1171 | 1177 | |
| 1172 | 1178 | if (steamClient) { |
| 1173 | 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 | 1183 | qCDebug(interfaceapp) << "[VERSION] Build sequence:" << qPrintable(applicationVersion()); |
| 1178 | 1184 | qCDebug(interfaceapp) << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION; |
| @@ -1236,7 +1242,8 @@ Application::Application( · 57 unmodified lines | ||
| 1236 | 1242 | connect(&domainHandler, SIGNAL(domainURLChanged(QUrl)), SLOT(domainURLChanged(QUrl))); |
| 1237 | 1243 | connect(&domainHandler, SIGNAL(redirectToErrorDomainURL(QUrl)), SLOT(goToErrorDomainURL(QUrl))); |
| 1238 | 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 | 1248 | connect(&domainHandler, SIGNAL(resetting()), SLOT(resettingDomain())); |
| 1242 | 1249 | connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle())); |
| @@ -1348,8 +1355,9 @@ Application::Application( · 105 unmodified lines | ||
| 1348 | 1355 | setPreferredCursor(Cursor::Manager::getIconName(Cursor::Icon::SYSTEM)); |
| 1349 | 1356 | } |
| 1350 | 1357 | |
| 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"); | |
| 1353 | 1361 | }); |
| 1354 | 1362 | } |
| 1355 | 1363 | connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateSystemTabletMode); |
| @@ -1388,7 +1396,8 @@ Application::Application( · 32 unmodified lines | ||
| 1388 | 1396 | |
| 1389 | 1397 | connect(myAvatar.get(), &MyAvatar::skeletonModelURLChanged, [](){ |
| 1390 | 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 | 1403 | // Inititalize sample before registering |
| @@ -2698,7 +2707,8 @@ void Application::updateHeartbeat() const { · 1303 unmodified lines | ||
| 2698 | 2707 | } |
| 2699 | 2708 | |
| 2700 | 2709 | void Application::onAboutToQuit() { |
| 2701 | − setCrashAnnotation("shutdown", "1"); | |
| 2710 | + auto &ch = CrashHandler::getInstance(); | |
| 2711 | + ch.setAnnotation("shutdown", "1"); | |
| 2702 | 2712 | |
| 2703 | 2713 | // quickly save AvatarEntityData before the EntityTree is dismantled |
| 2704 | 2714 | getMyAvatar()->saveAvatarEntityDataToSettings(); |
| @@ -7147,7 +7157,8 @@ void Application::updateWindowTitle() const { · 4442 unmodified lines | ||
| 7147 | 7157 | QString metaverseUsername = accountManager->getAccountInfo().getUsername(); |
| 7148 | 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 | 7163 | QString currentPlaceName; |
| 7153 | 7164 | if (isServerlessMode()) { |