summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-19 00:03:19 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-19 00:03:42 +0200
commit969ed536806dce1fe2fa8fc9b312f1c80e671d84 (patch)
tree3e8c7e74cbecf7aefe250b03a72651dd781bf8ed /indra/newview/llappviewermacosx.cpp
parentf462037b8e3474115a1f039ce0cd56c98e320227 (diff)
parentc99e3167ed8549bc13d7df03b1e12dc15b0a080f (diff)
Merge branch 'release/2025.03' into release/2025.04
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r--indra/newview/llappviewermacosx.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 4162c0479a..aab6d00573 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -172,6 +172,8 @@ CrashMetadataSingleton::CrashMetadataSingleton()
// Note: we depend on being able to read the static_debug_info.log file
// from the *previous* run before we overwrite it with the new one for
// *this* run. LLAppViewer initialization must happen in the Right Order.
+
+ // Todo: consider converting static file into bugspalt attributes file
staticDebugPathname = *gViewerAppPtr->getStaticDebugFile();
std::ifstream static_file(staticDebugPathname);
LLSD info;
@@ -215,7 +217,32 @@ CrashMetadataSingleton::CrashMetadataSingleton()
}
}
}
+
+ // Populate bugsplat attributes
+ LLXMLNodePtr out_node = new LLXMLNode("XmlCrashContext", false);
+
+ out_node->createChild("OS", false)->setValue(OSInfo);
+ out_node->createChild("AppState", false)->setValue(info["StartupState"].asString());
+ out_node->createChild("GraphicsCard", false)->setValue(info["GraphicsCard"].asString());
+ out_node->createChild("GLVersion", false)->setValue(info["GLInfo"]["GLVersion"].asString());
+ out_node->createChild("GLRenderer", false)->setValue(info["GLInfo"]["GLRenderer"].asString());
+ out_node->createChild("RAM", false)->setValue(info["RAMInfo"]["Physical"].asString());
+
+ if (!out_node->isNull())
+ {
+ attributesPathname = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "CrashContext.xml");
+ LLFILE* fp = LLFile::fopen(attributesPathname, "w");
+
+ if (fp != NULL)
+ {
+ LLXMLNode::writeHeaderToFile(fp);
+ out_node->writeToFile(fp);
+
+ fclose(fp);
+ }
+ }
}
+ // else Todo: consider fillig at least some values, like OS
}
// Avoid having to compile all of our LLSingleton machinery in Objective-C++.